ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Hi Àngel,

Firstly make copies of the xacro files of the base and the manipulator.
You might need to edit one to make sure the 2nd file (manipulator) doesn't have a 'base_link' in it.

Make a new xacro:

<?xml version="1.0"?>
<robot name="joinedrobot">

<!-- include xacro file containing a link where you want to attach the manipulator -->
<include filename="$(find mobilerobot_description)/urdf/robot.urdf.xacro"/>

<joint name='jointhem_fixed_joint' type='fixed'>
<!-- you can specify xyz offset to locate the manipulator -->
<origin xyz="0 0 0" rpy="0 0 0" />
<parent link='location_for_arm_link' />
<child link='manipulator_base_link'>

<!-- include xacro file where there first link is called manipulator_base_link -->
<include filename="$(find manipulator_description)/urdf/manipulator_no_baselink.urdf.xacro"/>

</robot>

When you load the xacro file, it will merge all the code together.

Here's a good launch file example, that will load the URDF model in Rviz and allow you to test the joint movements using a GUI:

<?xml version="1.0"?>
<launch>
    <param name="robot_description" command="$(find xacro)/xacro.py '$(find joinedrobot_description)/urdf/joinedrobot.urdf.xacro'" />

    <node name="robot_state_publisher" pkg="robot_state_publisher" type="state_publisher" />

    <param name="use_gui" value="true" />
    <node pkg="joint_state_publisher" type="joint_state_publisher" name="joint_state_publisher"/>

    <node name="rviz" pkg="rviz" type="rviz" args="-d $(find joinedrobot_description)/rviz/joinedrobot.vcg" />
</launch>

Hi Àngel,

Firstly make copies of the xacro files of the base and the manipulator.
You might need to edit one to make sure the 2nd file (manipulator) doesn't have a 'base_link' in it.

Make a new xacro:

<?xml version="1.0"?>
<robot name="joinedrobot">

<!-- include xacro file containing a link where you want to attach the manipulator -->
<include filename="$(find mobilerobot_description)/urdf/robot.urdf.xacro"/>

<joint name='jointhem_fixed_joint' type='fixed'>
<!-- you can specify xyz offset to locate the manipulator -->
<origin xyz="0 0 0" rpy="0 0 0" />
<parent link='location_for_arm_link' />
<child link='manipulator_base_link'>

<!-- include xacro file where there first link is called manipulator_base_link -->
<include filename="$(find manipulator_description)/urdf/manipulator_no_baselink.urdf.xacro"/>

</robot>

When you load the xacro file, it will merge all the code together.

Here's a good launch file example, that will load the URDF model in Rviz and allow you to test the joint movements using a GUI:

<?xml version="1.0"?>
<launch>
    <param name="robot_description" command="$(find xacro)/xacro.py '$(find joinedrobot_description)/urdf/joinedrobot.urdf.xacro'" />

    <node name="robot_state_publisher" pkg="robot_state_publisher" type="state_publisher" />

    <param name="use_gui" value="true" />
    <node pkg="joint_state_publisher" type="joint_state_publisher" name="joint_state_publisher"/>

    <node name="rviz" pkg="rviz" type="rviz" args="-d $(find joinedrobot_description)/rviz/joinedrobot.vcg" />
</launch>

Once you're happy with this "new" robot, spawn it as a single robot.

Hi Àngel,

Yes I think you can see "joining" of robots in various stacks, e.g. you might find something like the mobile WAM robot. Also it's practically the same principle as describing the manipulator once, but using Xacro to include it twice to create a dual-arm robot, e.g. DARPA ARM or Schunk dual-arm robot.

Firstly make copies of the xacro files of the base and the manipulator.
You might need to edit one to make sure the 2nd file (manipulator) doesn't have a 'base_link' in it.

Make a new xacro:

<?xml version="1.0"?>
<robot name="joinedrobot">

<!-- include xacro file containing a link where you want to attach the manipulator -->
<include filename="$(find mobilerobot_description)/urdf/robot.urdf.xacro"/>

<joint name='jointhem_fixed_joint' type='fixed'>
<!-- you can specify xyz offset to locate the manipulator -->
<origin xyz="0 0 0" rpy="0 0 0" />
<parent link='location_for_arm_link' />
<child link='manipulator_base_link'>

<!-- include xacro file where there first link is called manipulator_base_link -->
<include filename="$(find manipulator_description)/urdf/manipulator_no_baselink.urdf.xacro"/>

</robot>

When you load the xacro file, it will merge all the code together.

Here's a good launch file example, that will load the URDF model in Rviz and allow you to test the joint movements using a GUI:

<?xml version="1.0"?>
<launch>
    <param name="robot_description" command="$(find xacro)/xacro.py '$(find joinedrobot_description)/urdf/joinedrobot.urdf.xacro'" />

    <node name="robot_state_publisher" pkg="robot_state_publisher" type="state_publisher" />

    <param name="use_gui" value="true" />
    <node pkg="joint_state_publisher" type="joint_state_publisher" name="joint_state_publisher"/>

    <node name="rviz" pkg="rviz" type="rviz" args="-d $(find joinedrobot_description)/rviz/joinedrobot.vcg" />
</launch>

Once you're happy with this "new" robot, spawn it as a single robot.