Discussion - Concept Design Gazebo (Making a Mobile Robot Pt 3)

Blog Post

This is the discussion topic for the video and blog post linked above. Please keep all replies relevant to the content, otherwise create a new topic.

When I try to visualize the robot moving from gazebo in rviz, I add a transform and try and set the global fixed frame to odom but it does not show up. My only options are base_footprint, base_link, caster_wheel, and chassis. In addition to odom missing, I am also missing both wheels in the drop down.

BUT if I have rviz open prior to launching gazebo odom shows up.

Any thoughts on why the order of launching rviz then gazebo seems to matter?

1 Like

@Steven @JoshNewans Have you found any solution for it

@sampath_ganesh No, I am still using the work around of running Rviz first.

Yeah me either unfortunately. Just hoping an update magically fixes it at some point…

im also unable to find odom in the Rviz2.
i tried copying all required files from updated git profile but still not able to get the odom in the Rviz

I have another issue. Everything works fine except the last one bit. When i try to launch gazebo with the obstacles, they just don’t show up in the simulation. Do i need to download/create a my.world file first or is it just a bug?

hi, i’m trying to add another pair of wheel instead of caster wheel, and the rviz model work just fine. however in gazebo the second pair doesn’t show up. Anyone knows why so?
the second part of the question is, if i want the new pair just to “follow” the vehicle, what should i change in gazebo_control file?

Yeah you will need to create your own world file (which I think I cover in the video? I haven’t got time to check now). Or you could download one like this.

Hmm, if the other pair does not turn (e.g. ackermann steering) then you will encounter some issues due to friction but it should still kind of work. Are you thinking these other wheels will be driven or free-spinning?

Make sure you have unique names for all your joints and links and they are located in the correct spot (I suppose you say it is fine in RViz). They don’t show up in the model tree on the left side of Gazebo?

no the wheels don’t turn. and though they’ll be driven afterwards for simplification i want to simulate them as free-spinning. it’s actually thought as kid of a truck to the main robot.

That’s correct, they don’t show up in the model tree only in gazebo. Here are the two cases of the parts 2&3:

  1. I can launch rsp launch file with joint_state_publisher_gui and everything works correctly in rviz
  2. If i launch sim file, then the second pair of wheel doesn’t show up in gazebo, though in terminal all the links are started. If i start the rviz in that case the whole “truck”-part is white unless i start the joint_state_publisher_gui. After that it is visualized correctly in rviz (but still not in gazebo)

i can’t find any infos about the plugin you are using here. any help?

Make sure that everything is spelled correctly. It’s bit of a pain in the arse to go through everything but I had a ‘no transform from wheel link to odom’ error and found out that I had put in <publish_wheel_transform> instead of <publish_wheel_tf>. I have made a few silly mistakes like that so definitely worth going over all the code and make sure that everything is correct as they’re easy mistakes to make.

hello i downloaded the repository and i’m facing similar issues, i’m unable to move the robot at all through teleop_twist, i’m using ros2 foxy on ubuntu 20.04 LTS any ideas?

for additional info it is publishing the commands but its not doing anything
(I found out that it spits out “Controller manager not available” in the terminal)

did u find a solution ??

Hi all,
Use this xacro in the file gazebo_control.xacro
The problem is due to the incorrect tag usage in the original code. The incorrect tags have been commented and substituted with correct ones.

All the Best !

https://classic.gazebosim.org/tutorials?tut=ros_gzplugins See the section Differential Drive

<?xml version="1.0"?>
<robot xmlns:xacro="http://www.ros.org/wiki/xacro" name="jim_bot1">

        <plugin name='differential_drive_controller' filename='libgazebo_ros_diff_drive.so'>
            <!-- Plugin update rate in Hz -->

            <!-- Wheel Information -->

            <!-- Limits -->

            <!-- Output -->
            <!-- <odometry_frame>odom</odometry_frame> -->

            <!-- <robot_base_frame>base_link</robot_base_frame> -->
            <!-- <publish_odom_tf>true</publish_odom_tf> -->
            <!-- <publish_wheel_tf>true</publish_wheel_tf> -->

We should not forget to use Joint_State_Publisher Node!!!

Hi all, I have a problem . When i run teleop_twist_keyboard and press u i o key but nothing happened in gazebo . I can’t move the robot .

my diff_drive can’t sub to /cmd_vel . Please help