Robotics StackExchange | Archived questions

Joint Controller does not move robot arm in Gazebo (but works in RViz)

Hello All,

My problem is that when publishing a message to the joint state controller, I can see the robot moves it's arms in RViz but not in Gazebo. Can anyone help me figure out what is wrong? Going through similar questions, it seems like the jointstatepublisher and the libgazeboroscontrol.so plugins have to be added, and I did so.

I have this:

<plugin name="ros_control" filename="libgazebo_ros_control.so">
  <!--robotNamespace>/</robotNamespace-->
  <!--robotSimType>gazebo_ros_control/DefaultRobotHWSim</robotSimType-->
</plugin>

and this:

<node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher">
    <param name="use_gui" value="true"/>
</node>

in my urdf and launch files.

Yet, when changing the joints with the joint-publisher-gui, the changes are reflected in RViz but not in gazebo.

Thank you,

Iyantiram

Asked by Iyantiram on 2020-05-07 16:58:23 UTC

Comments

Answers

Hello, I am fairly new to Gazebo as well, so please take my answer with a pinch of salt. Essentially, the joint state publisher will not publish the right joint states of the robots, and publishes values only for your 'fake' RViz simulation.

You need to create a controllers.yaml file, specifying your joints and the joint state publisher, and spawn a controller_manager and robot state publisher to reflect it in Gazebo.

I found this video to be very helpful. I followed the steps here to get my setup to work.

Asked by Shrutheesh R Iyer on 2020-05-18 03:00:14 UTC

Comments

நன்றி Thanks for the link. Will update my question if I get it working.

Asked by Iyantiram on 2020-06-07 19:39:15 UTC