V-rep with ROS running across two machines

Typically: "How do I... ", "How can I... " questions
Post Reply
Destine_Yang
Posts: 2
Joined: 16 Oct 2018, 21:12

V-rep with ROS running across two machines

Post by Destine_Yang »

Hi,

I have install ROS Indigo both on my laptop and desktop, and they can share information after configuring their IP address. Now, I have MATLAB/Simulink (with robotics system toolbox) installed on my desktop and V-rep installed on my laptop. However, I couldn't use my simulink model to control the simulted robot arm in V-rep.

I tested successfully that my Simulink model can control the simulated robot in V-rep when MATLAB/Simulink and V-rep are installed on the same computer. I guess it is because the V-rep on laptop cannot publish messages to and subscribe messages from Simulink on desktop. I wonder if it is possible to run MATLAB/Simulink and V-rep on two machines with ROS running across them? If it is possible, how to implete it?

Thanks,
Destine

fferri
Posts: 1217
Joined: 09 Sep 2013, 19:28

Re: V-rep with ROS running across two machines

Post by fferri »

This looks like a ROS problem and not a V-REP problem.

Some useful links:

Destine_Yang
Posts: 2
Joined: 16 Oct 2018, 21:12

Re: V-rep with ROS running across two machines

Post by Destine_Yang »

Yes, it is a ROS problem. Thanks a lot for your reply! I'm currently using V-REP 3.3.1 on Ubuntu 14.04 with ROS Indigo. The V-REP ROSinterface plugin works well, i.e., V-REP can publish and subscribe messages to and from ROS. However, after installing Phantom Omni device driver and OpenHaptics toolkit, I cannot run V-REP in terminal anymore. It gives the following error:

## Error: could not find or correctly load the V-REP library.

Then, I tried sudo ./vrep.sh but obtained the following error:

##Plugin 'Ros': loading...
[FATAL] [1541360232.062171555]: ROS_MASTER_URI is not defined in the environment. Either type the following or (preferrably) add this to your ~/.bashrc file in order set up your local machine as a ROS master:

export ROS_MASTER_URI=http://localhost:11311

then, type 'roscore' in another shell to actually launch the master program.

Do you have any idea about it?

fferri
Posts: 1217
Joined: 09 Sep 2013, 19:28

Re: V-rep with ROS running across two machines

Post by fferri »

Don't know about Phantom driver.

You see that error because sudo resets environment variables, including ROS_MASTER_URI.

Anyway, running V-REP as root cannot be of any help, so don't do it.

Post Reply