7 -DOF(7 degrees of freedom)
TOOLS:
urdf
A ros package using .xml file to illustrate a robot model.
labels
- link : To build a link for robots.
<link name="<name>">
<inertial> ... </inertial>
<visual>...</visual> //visual for the link in real world
<collision>...</collision> // For area to detect for possible collision
</link>
- joint: Used to connect two links
<joint name=''<name>''>
<parent link="link1"/>
<child link="link2"/>
...
</joint>
Note : For coordinates; the joints are located in parent link coordinate, the child coordinate is the link coordinate.
3. robot: To illustrate the robot name, joints, links
<robot name="<name>">
<link> ... </link>
<joint> ... </joint>
</robot>
- gazebo: If gazebo simulators is used then use gazebo tag to include referenced parts.
<gazebo reference="link_name">
<material>Gazebo/Black</material>
</gazebo>
Turn to urdf XML for more labels.
Before the start:
First, make sure urdf and xacro are installed
sudo apt-get install ros-melodic-urdf
sudo apt-get install ros-melodic-xacro
Then, in any of your work space, create a new working package depending on
roscpp urdf xacro rviz geometry_msgs tf
Two ways to define a Robot
- urdf : Easy to understand, like xml file using tag to define.
- xacro: Looks like urdf, could define a macro and using parameters to replace macros. Macros could have arithmetical operations but pow and modular are not supported.
// xacro to urdf inside the launch file
<param name="robot_description" command="$(find xacro)/xacro --inorder $(find your_ros_pkg)/xacro/your.xacro"
/>
During the projects
- To check the urdf file and generate arm structure.
check_urdf name.urdf
urdf_to_graphiz name.urdf
evince arm.pdf