O'Reilly logo

Mastering ROS for Robotics Programming - Second Edition by Jonathan Cacace, Lentin Joseph

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Adding the ROS interface to V-REP joint controllers

In this section, we will learn how to interface the seven-DOF arm with the vrep_plugin to stream the state of its joints and receive the control input via topics. As already seen in the previous example, select a component of the robot (for example the base_link_respondable) and create a Lua script that will manage the communication between V-REP and ROS.

Here is the script source code:

if (sim_call_type==sim_childscriptcall_initialization) then -- Check if the required plugin is there (libv_repExtRos.so or libv_repExtRos.dylib): local moduleName=0 local moduleVersion=0 local index=0 local pluginNotFound=true while moduleName do moduleName,moduleVersion=simGetModuleName(index) if (moduleName=='Ros') ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required