Issue with Gazebo simulation

Hi All, Support,

Gazebo empty world.launch launched successfully and I can see magni model in RVIZ with sonars and laser scan is active, so I’m just trying to add a map to it (see below) ’ and I’m just trying to use the controller that is spawned to move magni in my map , it some how jumps here and there , and crawls like a spider when I move forward and backward…,

what am I missing here?

I added a map at the bottom,

Hi @wai.mak ,

I’m not sure about this specific simulation. I know that the position in the map depends on the localization algorithm. It can be related to the performance of the nodes (if they are too heavy), you could check the CPU usage, for example.

But if the computer is fine with the process, then it can be related to how it’s processing the data and updating the position belief of the robot.

Could you provide more details about it?

Sorry that I can’t help much on this specific, but only with the platform in general



thanks for trying to help, here are more details on what I’m trying to achieve but fail,

I’m following the guide here: Running Magni in Simulation | Learn Ubiquity Robots and ROS

and the last step was to run this: ```
roslaunch magni_gazebo empty_world.launch which runs fine, RVIZ and gazebo,

but because it is empty world in both RVIZ and Gazebo, I’m just trying to add my map to RVIZ and wishing to try move/navigate Magni on it,

This is the line I added to empty_world.launch (as you can see above screenshot) to run a mapserver node with a sample map,

And the map seems to appear fine in RVIZ but when I try to move magni with /cmd_vel topic , I tried to move it forward and Magni jumps around in the map like out of control,

Please assist

Could it happen because the robot is trying to localize itself by detecting the walls and obstacles present in the original map?

And navigating around the empty world, the data doesn’t match

I think it won’t work properly, depending on the navigation system. If it was navigating using odometry only, maybe it could work, but in real robots, they use to rely also on object detector sensors (like sonar and laser)


that could be a possibility since it is empty in Gazebo besides just a map in RVIZ, so are you suggesting me to load in the actual 3D environment into Gazebo and have magni move in it? have you done it before and can you show me how to load a sample environment?

I didn’t try with this specific simulation, but have an example using gmapping

Not sure if it’s applicable to a different robot, but the thing is that I’m using a world with obstacles and map is generated, but also the robot is localizing itself in the map


Ok I see that you run bug1.launch at first, and I can see the walls and obstacles being loaded into Gazebo, how did you do that? when I open the bug1.launch file, is a small file with just a couples of line, I just want to know how the walls are being created along with the obstacles being put in to Gazebo at first?

And secondly, how does the robot appear within Gazebo? and being inside that loaded environment

The obstacles are included in the .world file that can be found within the simulation package

The robot is spawned with the spawn launch file, also included in the main launch file.

Check the files included in the small launch file, they contain more instructions to compose the whole environment

1 Like

Marvelous! It’s exactly on what I’m after,
and finally I had spawned my robot into a world within Gazebo, thank you!

My question now is: what tool did you use to create your world02 ? for instance, how did you create the custom world in other words?

because I want to create a custom world based on a real physical location and simulate the robot in there,

1 Like

Great it worked!

You can use gazebo itself.

Modify the obstacles using the GUI and use the “save as…” option to create a new copy

Make sure you don’t save the world file with the robot inside, because you want to spawn it using ROS commands!

ok I see, in how you created your world , are the dimensions of the walls, obstacles and the whole area in real world measurements (in meters)?

reason I ask is because once it works ok in simulation, I want to bring it to the actual physical location for testing,

Yes, they are in meters.

We have some other series where you can check more about gazebo and models.


great, thanks for the links,

and how did you spawn the objects below in your gazebo world randomly?


in your ROS Development studio, simulation option up the top


why mine one does not have it ?

Hi All, Robot Ignite Support,

Any reason why every time I try to turn a corner (sent a 2D Nav Goal to the corner of the map), it get stuck and the laser goes bizarre and detects a different direction? sees the map in a different direction as well (as image below)

and everytime, I had to set a 2D pose and then send another shorter distance goal and then it goes back to normal but then when I send a goal that is further away…, it fails again and sometimes it fails on the side of the wall and does not rotate (because it thinks it will have a collision doing a rotate recovery…)

Please help, this is really an issue for my bot…

Hi @wai.mak ,

The objects are not spawn randomly, the world was created like that.
All the objects position are configured in this file.

The simulation has to be launched from the shells now, this is an old version of ROSDS

Just use the regular roslaunch <pkg> <launchfile> command


Hi ,

ok that’s strange then, because when I load say world03 and world02 for instance, I dont see any obstacles inside the walls, …, its empty inside (no witches heads…) …, in your youtube link, witches heads were placed inside say world01 everywhere, …

Please advice or have I missed something again… ?? the files I downloaded from
\Gmapping part13 demo Gazebo world\simulation_ws\src\my_worlds\worlds

For ROSDS, so the youtube link that I saw is an old version ?
and new version only has shells ?

Just thinking the version you were using in youtube looks better and more handy in loading launch files etc…