-
Notifications
You must be signed in to change notification settings - Fork 269
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support spherical coordinates #981
Comments
Other nice-to-have features:
|
I started working on this issue and I'm trying to understand how the SDF element I tracked down some background on that element that I'll summarize here for future reference: I believe that tag was added to the SDFormat spec in the context of gazebosim/gazebo-classic#1959:
I'm still looking into it; I may either ignore that element for now (and forever?), or port part of that Gazebo 11 branch to Ignition Math. |
you're right, it looks like we never started using the |
Thanks for the input, @scpeters . I looked a bit at proj and it seems to be pretty powerful. I think we definitely should leave the architecture flexible in case we want to integrate it later, but for now, I was thinking of keeping it simple and using the class that we already have. My current idea:
In the future, if we need more precision than what Ignition Math is providing and want to integrate Let me know what you think of this 2-step approach. |
The SDFormat spec provides the //world/spherical_coordinates element which allows defining latitude and longitude for the origin of a simulated world. We should support that in Ignition Gazebo.
Desired behavior
It should be possible to query the pose of any entity in the world in spherical coordinates, using as reference the coordinates set at startup. For example, for this world:
Developers should be able to query:
Alternatives considered
We could choose not to include spherical coordinates as part of the core simulator and leave it up to each plugin to figure it out. But since the SDF spec supports it and several plugins can benefit from it, I think it's worth it providing core functionality for it.
Implementation suggestion
Gazebo Classic supports that through a gazebo::common::SphericalCoordinates object belonging to
gazebo::physics::World
, which is populated here. All other classes that want to make use of spherical coordinates can query that.That class has been ported to Ignition Math: ignition::math::SphericalCoordinates, which we can use here.
I'd suggest:
<spherical_coordinates>
intosdf::World
component::SphericalCoordinates
that wrapsignition::math::SphericalCoordinates
World
entity when parsing the SDFUtil.hh
that returns the spherical coordinates for any entity according to its pose and the world's componentAdditional context
We should make sure we don't inherit issue gazebosim/gazebo-classic#2022 from Gazebo classic. We may also want to address gazebosim/gz-math#51.
The text was updated successfully, but these errors were encountered: