Gazebo | Ignition | Community
Ask Your Question

Client crashes when using "orbital" distances

asked 2021-08-12 20:37:28 -0500

shonigmann gravatar image

I am trying to simulate things at large (e.g. "orbital" distances, up to ~10^11 m), and the client crashes as soon as any changes to the gui camera are made (e.g. trying to move the trackball position or orbit around a followed model. I get the following error, indicating that some function is trying to set a NaN value, but not much else.

[INFO] [gazebo_spawner]: process has finished cleanly [pid 2177018]
[gzclient   -2] gzclient: /build/ogre-1.9-kiU5_5/ogre-1.9-1.9.0+dfsg1/OgreMain/src/OgreNode.cpp:405: virtual void Ogre::Node::setPosition(const Ogre::Vector3&): Assertion `!pos.isNaN() && "Invalid vector supplied as parameter"' failed.
[gzclient   -2] Aborted (core dumped)
[ERROR] [gzclient   -2]: process has died [pid 2177016, exit code 134, cmd 'gzclient   '].

My best guess is that the float values used by Ogre and other parts of the Gazebo client are overflowing. That said, I would have expected a standard 32bit float to support values up to ~10^38 m, so perhaps I've misdiagnosed the issue.

Scaling things down seems to avoid this particular error, but it's not ideal from my perspective. It would be nice to either be able to change the units used by the renderer (e.g. to km or Mm) or to somehow compile Gazebo to use double precision. Are either of those possible?

Is anyone aware of this issue and of any fixes?


edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2021-12-13 17:00:12 -0500

shonigmann gravatar image

Unfortunately, it looks like supporting 64bit floats on the renderer/client side would be non-trivial.

Instead, we have found the preferred approach to be changing the frame of reference of the simulation to center about the vehicle, and using scaled models of celestial bodies at scaled distances. NASA's Intelligent Robotics Group has published a plugin that does just this on their github (here)

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2021-08-12 20:37:28 -0500

Seen: 55 times

Last updated: Dec 13 '21