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.git
and 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.xacro
to add<material>
tags to each link- The file starts with a
robot
tag with the nameslidebot
, like any other xacro - Use
<gazebo reference="linkname">
to augment an existing link with gazebo-specific properites- Any tags within the
gazebo
tag 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
xacro
to convert yourxacro
file into aurdf
- Use the
spawn_urdf
node from thegazebo_ros
package to spawn your model in gazebo - Modify the
see_robot.launch
file to start gazebo in a paused state and spawn the model in a gazebo world