ROS Interface

The ROS Interface is part of the CoppeliaSim API framework and is courtesy of Federico Ferri. Make sure not to mix up the ROS Interface with the RosPlugin, which is an older, deprecated interface in CoppeliaSim. The ROS Interface duplicates the C/C++ ROS API with a good fidelity. This makes it the ideal choice for very flexible communication via ROS. You can recognize ROS Interface API functions from the simROS- prefix.

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.

CoppeliaSim can act as a ROS node that other nodes can communicate with via ROS services, ROS publishers and ROS subscribers.

The ROS Interface functionality in CoppeliaSim is enabled via a plugin: libsimExtROS.*. The plugin can easily be adapted to your own needs. The plugin is loaded when CoppeliaSim is launched, but the load operation will only be successful if roscore was running at that time. Make sure to inspect CoppeliaSim's console window or terminal for details on plugin load operations.

Have a look at following simulation scenes/model for a quick start with the ROS Interface:

  • rosInterfaceTopicPublisherAndSubscriber.ttt
  • controlTypeExamples/controlledViaRos.ttt
  • models/tools/rosInterface helper tool.ttm (model allowing to operate CoppeliaSim in stepped mode, e.g. in order to manually step the simulation)
  • Also have a look at the ROS tutorial and the external controller tutorial.