Why do I see issues with Gazebo rendering when far from origin?
We are using Gazebo as our virtual world and running ROS2 nodes for our state solver. Gazebo's physics engine is not currently being used. Only models and ray sensors are being utilized in gazebo. We are updating the position of models in the Gazebo world with a Model Plugin. When the world map is centered at 0,0,0, the visualization of the simulation in Gazebo looks smooth. If we run starting it at a location far from the origin (4000000, 300000, 0)m the rendering skips and lags when updating. The model is composed of multiple links that are joined with revolute and fixed joints.The plugin updates the position of the parent link using setWorldPose but in the visualization the various links misalign and look as if they are updating their location at different times.
Is this an issue from being far away from the origin? Possibly related to how the setWorldPose function works?
I have the camera set to follow the model, during the simulation?
Asked by user300 on 2021-07-26 14:52:14 UTC
Answers
I don't know much about Gazebo's inner processes, and I've only used SetWorldPose in the context of teleporting a fixed robot. I searched around in the source code and saw in https://github.com/osrf/gazebo/blob/gazebo11/gazebo/gui/model/JointMaker.cc , that SetWorldPose() is followed by a SetVisualMoved() specific to that class. One guess coming out of that, is that it might be worth checking whether only the visuals are wrong, or that the physical locations are also not being updated. You might be able to print the joint positions and the visual positions to check that.
Asked by mz on 2021-08-09 15:39:20 UTC
Comments
An example of a fully georeferenced worlds can be found in the uav_testing repository. Where we've setup worlds where drones can fly with realistic global localization.
Asked by tfoote on 2021-09-30 16:53:07 UTC
Comments