Simulating the robotic arm using V-REP and ROS

In the previous chapter, we used Gazebo to import and simulate the seven-DOF arm designed in Chapter 3, Working with 3D Robot Modeling in ROS. Here, we will do the same thing using V-REP. The first step to simulate our seven-DOF arm is to import it in the simulation scene. V-REP allows you to import new robots using URDF files; for this reason, we must convert the xacro model of the arm in a URDF file, saving the generated URDF file in the URDF folder of the vrep_demo_pkg package:

$ rosrun xacro xacro seven_dof_arm.xacro -inorder > /path/to/vrep_demo_pkg/urdf/seven_dof_arm.urdf

We can now import the robot model using the URDF import plugin. Select from the main drop-down menu the entry Plugins ...

Get Mastering ROS for Robotics Programming - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.