ROS interface

The ROS interface is part of the V-REP API framework.

ROS is a distributed pseudo operating system allowing for easy management and communication between multiple computers connected in a network. Please refer to the official ROS documentation for details about ROS.

V-REP can act as a ROS node that other nodes can communicate with in following 3 ways:

  • The V-REP node offers ROS services. V-REP ROS services are available as soon as V-REP is launched (given that roscore is running and the ROS plugin to V-REP was correctly loaded).
  • V-REP can be enabled to advertise topics, and publish data to them. V-REP ROS publishers can only be enabled and are only operational while a simulation is running. One exception to this is the info topic: data to that topic will be streamed as long as V-REP is running.
  • V-REP can be enabled to subscribe to topics, read data from them, and apply the data to specific objects/items inside V-REP. V-REP ROS subscribers can only be enabled and are only operational while a simulation is running.
  • The ROS functionality in V-REP is enabled via a plugin: libv_repExtROS.so or libv_repExtROS.dylib. The code to the plugin is open source and is located in the programming/ros_stacks folder. The plugin can easily be adapted to your own needs. The plugin is loaded when V-REP is launched, but the load operation will only be successful if roscore was running at that time. Make sure to inspect V-REP's console window or terminal for details on plugin load operations.

    Following diagram illustrates how ROS messages are handled on the server side (i.e. on the V-REP ROS plugin side):

    [ROS message handling, server side]


    Have a look at following simulation scenes for a quick start with ROS & V-REP:

  • rosTopicPublisherAndSubscriber.ttt
  • controlTypeExamples.ttt
  • Also have a look at the ROS tutorial and the external controller tutorial.



    Recommended topics

  • ROS API list
  • ROS services
  • ROS publishers
  • ROS subscribers
  • ROS tutorial