The Robotic arm simulation model for Gazebo

We can create the simulation model for a robotic arm by updating the existing robot description by adding simulation parameters. You can see the complete simulation model of the robot in the chapter_3_code/ mastering_ros_robot_description_pkg/urdf/ seven_dof_arm.xacro file.

The file is filled with URDF tags, which are necessary for the simulation. We will define the sections of collision, inertial, transmission, joints, links and Gazebo.

To launch the existing simulation model, we can use the chapter_3_code/seven_dof_arm_gazebo package, which has a launch file called seven_dof_arm_world.launch. The file definition is as follows:

<launch> 
 
  <!-- these are the arguments you can pass this launch file, for example paused:=true --> 
  <arg name="paused" default="false"/> 
  <arg name="use_sim_time" default="true"/> 
  <arg name="gui" default="true"/> 
  <arg name="headless" default="false"/> 
  <arg name="debug" default="false"/> 
 
  <!-- We resume the logic in empty_world.launch --> 
  <include file="$(find gazebo_ros)/launch/empty_world.launch"> 
    <arg name="debug" value="$(arg debug)" /> 
    <arg name="gui" value="$(arg gui)" /> 
    <arg name="paused" value="$(arg paused)"/> 
    <arg name="use_sim_time" value="$(arg use_sim_time)"/> 
    <arg name="headless" value="$(arg headless)"/> 
  </include> 
 
  <!-- Load the URDF into the ROS Parameter Server --> 
  <param name="robot_description" command="$(find xacro)/xacro.py '$(find mastering_ros_robot_description_pkg)/urdf/seven_dof_arm.xacro'" />  
 
 
  <!-- Run a python script to the send a service call to gazebo_ros to spawn a URDF robot --> 
  <node name="urdf_spawner" pkg="gazebo_ros" type="spawn_model" respawn="false" output="screen" 
  args="-urdf -model seven_dof_arm -param robot_description"/>  
</launch> 

Build the package called seven_dof_arm_gazebo from chapter_3_code in your catkin workspace. This is the package we used for the robot arm simulation.

Launch the following command and check what you get:

    $ roslaunch seven_dof_arm_gazebo seven_dof_arm_world.launch
  

You can see the robotic arm in Gazebo as shown in the following figure; if you get this output, without any errors, you are done:

Figure 1 : Simulation of Seven DOF arm in Gazebo

Let's discuss the seven_dof_arm.xacro simulation model in detail.

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

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