Gazebo and ROS
Objective
You will be taking a urdf model of a robot and
and adding it to gazebo, along with a gazebo world.
Instructions
- Clone
https://github.com/m-elwin/me495_urdf.gitand checkout the xacro branch- You can directly clone it with
https://github.com/m-elwin/me495_urdf.git -b xacro
- You can directly clone it with
- Start gazebo (
rosrun gazebo_ros gazebo), add some items to the world, and save the world within the me495_urdf package - Write a file
urdf/slidebot.gazebo.xacroto add<material>tags to each link- The file starts with a
robottag with the nameslidebot, like any other xacro - Use
<gazebo reference="linkname">to augment an existing link with gazebo-specific properites- Any tags within the
gazebotag are effectively added to the link
- Any tags within the
- An example material in gazebo is
<material>Gazebo/Black</material>
- The file starts with a
- In
urdf/slidebot.urdf.xacro, be sure to<xacro:include filename="<The slidebot.gazebo.xacro file" - Use
xacroto convert yourxacrofile into aurdf - Use the
spawn_urdfnode from thegazebo_rospackage to spawn your model in gazebo - Modify the
see_robot.launchfile to start gazebo in a paused state and spawn the model in a gazebo world