Mastering ROS for Robotics Programming(Second Edition)
上QQ阅读APP看书,第一时间看更新

Simulating Robots Using ROS and V-REP

Having learned how to simulate robots with Gazebo, in this chapter, we will discuss how to use another powerful and famous simulation software: V-REP (Virtual Robot Experimentation Platform, http://www.coppeliarobotics.com).

V-REP is a multi-platform robotic simulator developed by Coppelia Robotics. It offers many simulation models of popular industrial and mobile robots ready to be used, and different functionalities that can be easily integrated and combined through a dedicated API. In addition, V-REP can operate with ROS using a communication interface that allows us to control the simulation scene and the robots via topics and services. Like Gazebo, V-REP can be used as a standalone software, while an external plugin must be installed to work with ROS.

In this chapter, we will learn how to set up the V-REP simulator and install the ROS communication bridge, discussing some initial codes to understand how it works. We will show how to interact with V-REP using services and topics and how to import and interface a new robot model using the URDF file. Finally, we will discuss how to interact with popular mobile robots imported from the V-REP model database, enriching it with additional sensors.

We will cover the following topics in this chapter:

  • Setting up V-REP with ROS
  • Understanding  vrep_plugin
  • Interacting with V-REP using ROS
  • Importong a robot model using an URDF file
  • Implementing a ROS interface to simulate a robotic arm in V-REP
  • Controlling a mobile robot using V-REP
  • Adding additional sensors to simulated robots