Activity
- Clone
https://github.com/m-elwin/me495_urdf.git
- In addition to being used for this activity, the file contains a few examples of xacro files and launch files.
- See how the robot moves in rviz.
- Change the launchfile so it no longer loads the
rviz
configuration.
- Then, when rviz loads, set it up to see the robot.
- There is also another robot that can be loaded from the launchfile try to load that as well
- Rename
slidebot.urdf
to slidebot.urdf.xacro
(mv slidebot.urdf slidebot.urdf.xacro
)
- Modify it so that it is a valid xacro file (adding
xmlns:xacro="http://wiki.ros.org/wiki/xacro"
to the robot tag)
- Create a parameter called
base_radius
and use it as the radius of the base
sphere
- Declare this parameter directly as a
xacro:property
- Make the length of the arm 10 times the radius of the
base
sphere using a formula in xacro
- Using the information here xacro YAML
load the
base_radius
from a yaml
file instead of declaring it directly in the xacro
file.
- Use a
xacro:macro
to add a link to the arm that is the same as the
current arm
link but on the opposite side of the body