Robotics StackExchange | Archived questions

gazebo freezes with gazebo_ros_control, libgazebo_ros_control

I have a model file which uses

<gazebo>
  <plugin name="gazebo_ros_control" filename="libgazebo_ros_control.so">
    <robotSimType>gazebo_ros_control/DefaultRobotHWSim</robotSimType>
    <robotNamespace>/rrbot</robotNamespace>
  </plugin>
</gazebo>

Without these lines, the file loads fine, using this launch file line:

<node name="urdf_spawner" pkg="gazebo_ros" type="spawn_model" args="-x 0 -y 0 -z 1 -file $(find 
keyboard_control_arm)/urdf/output.urdf -urdf -model beam_balance" respawn="false" output="screen" />

With these lines, gazebo freezes (gzserver and gzclient). I don't have anything else in my launch file except empty world.launch. What could be going wrong?

Asked by acenturyandabit on 2021-09-26 01:02:22 UTC

Comments

Answers

The answer turned out to be: You NEED to put the model file urdf raw text as a parameter under /robot_description, so that gazebo_ros_control plugin knows what your robot is up to. Something like

<param name="robot_description" textfile="$(find your_pkg)/urdf/your_urdf.urdf" />

Hope that saves someone four hours!

Asked by acenturyandabit on 2021-09-26 01:08:21 UTC

Comments