Running ros node or external launch file through the vrep UI

Typically: "How do I... ", "How can I... " questions
Post Reply
Arisha
Posts: 10
Joined: 02 Jan 2017, 16:06

Running ros node or external launch file through the vrep UI

Post by Arisha »

Hello,
I'm working on a project and i want to create a user interface in V-REP through which i could run ros nodes or launch files, or maybe record a bag file, is this possible?
I haven't found a way f doing so over the google, I really need help.
Thanks

coppelia
Site Admin
Posts: 10361
Joined: 14 Dec 2012, 00:25

Re: Running ros node or external launch file through the vrep UI

Post by coppelia »

Hello,

yes, you can do this. For that, have a look at customization scripts, custom UIs, and the RosInterface.

The idea is to use a customization script (which also runs when simulation is not running) to display a custom UI to the user. Take for example the demo model Models/infrastructure/floors/infiniteFloor.ttm. Have also a look at the demo scene scenes/customUI.ttt.

Finally, have a look at how a ROS publisher and subscriber are handled in V-REP, by looking at the demo scene scenes/rosInterfaceTopicPublisherAndSubscriber.ttt

Cheers

Arisha
Posts: 10
Joined: 02 Jan 2017, 16:06

Re: Running ros node or external launch file through the vrep UI

Post by Arisha »

Thank you for the help but I've seen all the scenes that you recommended and none of them actually do what I want.
Can you provide me some guidelines or some basic script that enables running a ros node or ros launch file via a button in the V-REP CUI. Plus I want to view images that ros is publishing on V-REP, is it possible?

coppelia
Site Admin
Posts: 10361
Joined: 14 Dec 2012, 00:25

Re: Running ros node or external launch file through the vrep UI

Post by coppelia »

All the links and demo scene that I mentioned are the puzzle parts that you need. You will however still have to assemble the puzzle yourself.

Cheers

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

Re: Running ros node or external launch file through the vrep UI

Post by fferri »

Arisha wrote:Hello,
I'm working on a project and i want to create a user interface in V-REP through which i could run ros nodes or launch files, or maybe record a bag file, is this possible?
I haven't found a way f doing so over the google, I really need help.
Thanks
Why would you need to launch nodes from within another node? Handling subprocesses is not an easy task, you have to handle signals, pipes, and it's different from platform to platform (in case you want to support Windows too).

For this purpose roslaunch exists, and does its job quite well.

If you are looking for a gui to launch nodes, have a look to rqt_launch too:

Image

it may be exactly what you need and it would make no sense to duplicate this functionality inside V-REP.

Also, there is rqt_bag as a gui to rosbag:

Image

Arisha
Posts: 10
Joined: 02 Jan 2017, 16:06

Re: Running ros node or external launch file through the vrep UI

Post by Arisha »

Thank you so much, you're right i now understand rqt_launch is probably the best option.
And sorry i couldn't reply earlier

Post Reply