ROS diagram

Typically: "How do I... ", "How can I... " questions
Post Reply
arennuit
Posts: 58
Joined: 03 Oct 2014, 23:04

ROS diagram

Post by arennuit »

Hello,

I am trying to understand the ROS diagram here http://www.coppeliarobotics.com/helpFil ... erview.htm.

Looking at the picture I have the feeling that ros::spinOnce() is only called once before the main script loop is run. I find this weird: this ros::spinOnce() before the main script loop can handle subscribers and get topics incoming into vrep, but the publishers in vrep should send their data (e.g. vrep status) AFTER the main loop no? So this requires 2 ros::spinOnce() calls, no?

Also I am not sure I understand what "additional ROS plugins" means. Does that relate to custom ROS plugins (vrep plugins written by vrep users)?

Kind regards,

Antoine.

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

Re: ROS diagram

Post by coppelia »

Hello Antoine,

yes, ros::spinOnce is only called once per simulation step (if not in synchronous mode). Whether it is called just before the main script or just after the main script doesn't make a big difference, except for the t=t+dt.

In any case, we highly recommend to use the new RosInterface for V-REP, which supports all standard messages, is easily extendable, and naturally duplicates the ROS C++ API. The RosInterface is available since V-REP 3.3.1.

Cheers

arennuit
Posts: 58
Joined: 03 Oct 2014, 23:04

Re: ROS diagram

Post by arennuit »

Thanks a lot, this helps!

Post Reply