Modeling the mobile manipulator

The use of xacro will help us connect both with ease. Before creating the final URDF, let's understand something that we saw in the Successful Gazebo launch screenshot. The arm needs to connect to the base, and that's our goal. Hence, all you need to do now is connect the robot arm's arm_base link to the robot base's base_link. Create a file called mobile_manipulator.urdf.xacro and copy the following code into it:

<?xml version="1.0"?>

<robot xmlns:xacro="http://ros.org/wiki/xacro" name="robot_base" >

<xacro:include filename="$(find robot_description)/urdf/robot_base.urdf.xacro" />
<xacro:include filename="$(find robot_description)/urdf/robot_arm.urdf.xacro" />

<xacro:arm_joint prefix="arm_base_link" parent="base_link" child="arm_base" originxyz="0.0 0.0 0.1" originrpy="0 0 0"/>

</robot>

You could view the model the same way you viewed in rviz for the robot base and robot arm using the following command:

$ cd ~/chapter_3_ws/
$ source devel/setup.bash
$ roslaunch urdf_tutorial display.launch model:=mobile_manipulator.urdf

The rviz display will look as follows:

The rviz model view of the mobile manipulator

Now, let's simulate the model.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset