Skip to main content

robco_description

Legacy documentation

This section documents the robco_ros2 integration as shipped with RobFlow 7.x. It has not been updated for RobFlow 8, and the interface is not available in current systems.

note

For a tutorial on how to create a URDF file for a specific Robot configuration, please see Creating a URDF file.

The robco_description package provides a URDF library with xacro macros for all RobCo Robot modules. This way, any module configuration can be easily represented. For example, the following URDF file:

<robot name="robco" xmlns:xacro="http://www.ros.org/wiki/xacro">
<xacro:include filename="$(find robco_description)/urdf/robco_modules.xacro" />
<xacro:include filename="$(find robco_description)/urdf/robco.ros2_control.xacro" />

<!-- Module type IDs: 304, 301, 318, 300, 300, 8, 300, 300, 800 -->
<xacro:robco_module_0304 name="joint0" next="joint1" />
<xacro:robco_module_0301 name="joint1" next="link0" />
<xacro:robco_module_0318 name="link0" next="joint2" />
<xacro:robco_module_0300 name="joint2" next="joint3" />
<xacro:robco_module_0300 name="joint3" next="link1" />
<xacro:robco_module_0008 name="link1" next="joint4" />
<xacro:robco_module_0300 name="joint4" next="joint5" />
<xacro:robco_module_0300 name="joint5" next="tool" />
<xacro:robco_module_0800 name="tool" />
</robot>

yields this Robot configuration:

Demo URDF visualized in rviz2

ros2_control support

The ros2_control framework requires some configuration in the URDF file, defining at a minimum which command interfaces are supported on each joint. To automatically insert these macros, the provided robco_ros2_control macros can be used as in the following URDF:

<robot name="robco" xmlns:xacro="http://www.ros.org/wiki/xacro">
<xacro:include filename="$(find robco_description)/urdf/robco_modules.xacro" />
<xacro:include filename="$(find robco_description)/urdf/robco.ros2_control.xacro" />

<!-- Module type IDs: 304, 301, 318, 300, 300, 8, 300, 300, 800 -->
<xacro:robco_module_0304 name="joint0" next="joint1" />
<xacro:robco_module_0301 name="joint1" next="link0" />
<xacro:robco_module_0318 name="link0" next="joint2" />
<xacro:robco_module_0300 name="joint2" next="joint3" />
<xacro:robco_module_0300 name="joint3" next="link1" />
<xacro:robco_module_0008 name="link1" next="joint4" />
<xacro:robco_module_0300 name="joint4" next="joint5" />
<xacro:robco_module_0300 name="joint5" next="tool" />
<xacro:robco_module_0800 name="tool" />

<!-- ros2_control setup for joints defined above -->
<ros2_control name="RobcoRobot" type="system">
<hardware>
<plugin>robco_hardware/RobcoHardware</plugin>
</hardware>
<xacro:robco_ros2_control_joint joint_name="joint0" />
<xacro:robco_ros2_control_joint joint_name="joint1" />
<xacro:robco_ros2_control_joint joint_name="joint2" />
<xacro:robco_ros2_control_joint joint_name="joint3" />
<xacro:robco_ros2_control_joint joint_name="joint4" />
<xacro:robco_ros2_control_joint joint_name="joint5" />
</ros2_control>
</robot>