ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

how to simulate odom with Gazebo

asked 2022-06-05 16:45:11 -0600

niklongstone gravatar image

hi,

I've got my urdf file with differential drive. The file is very similar to this

I would like to simulate Odom values while using Nav2 and ros2 foxy. I am following the Nav2 guide but it is not clear if the Odom topics it is automatically populated via the diff_drive gazebo plugin or if I need to create a fake node.

If I need to create a fake node to publish Odom values why the urdf have odom statements in it.

Final question, is Ignition better than Gazebo?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
1

answered 2022-06-05 20:00:03 -0600

diff_drive gazebo plugin should be able publish it for you, you can remap the topic depending on your needs, you do not need to write another node. See example file on how to place the plugin tags here

If you are placing it under urdf, you need to wrap <gazebo> </gazebo> tags around the plugin.

Final question, is Ignition better than Gazebo?

Speaking really coarsely, yes, it is supposed to be since its the next generation of Gazebo

edit flag offensive delete link more

Comments

So why if I use this repo: https://github.com/ros-planning/navig... I don't see any odom topic. I am not expecting a topic in ros2 but at least I should see one in gazebo.

niklongstone gravatar image niklongstone  ( 2022-06-06 06:45:17 -0600 )edit

You can’t see a topic in gazebo. Do a ros2 topic list and see if there is odom under the /demo namespace

Fetullah Atas gravatar image Fetullah Atas  ( 2022-06-06 07:20:48 -0600 )edit

Not sure what went wrong. I've restarted few times Gazebo and now topics are published. Then it happened again that topic were not published, it looks like some bug when Gazebo spans.

niklongstone gravatar image niklongstone  ( 2022-06-06 12:41:31 -0600 )edit

Question Tools

Stats

Asked: 2022-06-05 16:45:11 -0600

Seen: 388 times

Last updated: Jun 05 '22