Gazebo | Ignition | Community
Ask Your Question
0

Why do I see issues with Gazebo rendering when far from origin?

asked 2021-07-26 14:52:14 -0500

user300 gravatar image

updated 2021-08-05 04:48:54 -0500

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?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2021-09-30 16:53:07 -0500

tfoote gravatar image

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.

edit flag offensive delete link more
0

answered 2021-08-09 15:39:20 -0500

mz gravatar image

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/g... , 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.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2021-07-26 14:52:14 -0500

Seen: 201 times

Last updated: Sep 30 '21