Robotics StackExchange | Archived questions

Actionlib across multiple computers

I'm working on a project where I need to separate out my simulator and navigation nodes across two different computers. When I run my actionlib python script the robot does not move... no errors are given, but no motion happens. I've tested actionlib script with this setup many times on a single computer several times and it works fine. Simulation time is active otherwise I get errors from the navigation package.

This is my setup. Computer 1:
ros master
Simulator (MORSE/Blender)
TF_node (to handle transformations)
actionlib script (waypoint navigation)

Computer 2:
ROS navigation package (move_base, ect.)
gmapping

I've also tried switching the nodes across computers (i.e move the ros master to computer 2, actionlib to computer 2, ect.) but I need to have the navigation package and gmapping on a different computer than the simulator. If I open RVIZ and directly publish a nav_goal, the robot works fine and goes directly to the waypoint.

My question: Is there something obvious I'm missing with running actionlib across multiple computers? Since the system works when I run point and click on RVIZ I feel like most of the system is setup properly.

Thanks!

Asked by mscott on 2017-10-05 12:58:06 UTC

Comments

Just to get things out of the way: all networking related configuration is correct? ROS_IP, ROS_MASTER_URI and friends all correctly set? (I know you write/imply that 'other stuff' works, but I've seen stranger things, so just asking).

Asked by gvdhoorn on 2017-10-05 13:43:25 UTC

Yeah those are all working. I can run nodes on one computer and echo the topics on the other, so I think they're configured properly

Asked by mscott on 2017-10-05 14:54:51 UTC

Have a look at the /move_base/goal and /move_base/current_goal topics. They should contain the coordinates the ROS navigation stack will try to move your robot to. If you see your move goals appearing then rules out a cross-machine comms issue.

Asked by M@t on 2017-10-05 21:08:17 UTC

From memory, RViz publishes directly to one of those topics, whereas the actionlib package uses a message/service method of communication. If Rviz works between machines but your actionlib script doesn't, publishing to those topics could be a work-around.

Asked by M@t on 2017-10-05 21:12:34 UTC

Those two topics do not echo anything. This is also true for the path topics. I get a 'no messages recieved and simulated time is active... is /clock being published?' message. /clock is being published.

Asked by mscott on 2017-10-05 21:16:06 UTC

Right, if you publish a goal between machines using Rviz, does that appear in either topic? (just checking to make sure).

Asked by M@t on 2017-10-05 21:20:42 UTC

When I was working with something similar I also couldn't send visualization_msgs across multiple machines. But I could send other types of ROS messages just fine.

Asked by l4ncelot on 2017-10-06 06:55:44 UTC

Yes, the message is sent when using RVIZ. Something I noticed: the actionlib script does not work when use_sim_time = true when the full process is run on 1 computer. Is there something needed to have actionlib work with sim_time?

Asked by mscott on 2017-10-06 11:54:07 UTC

Well at least the problem can definitely be narrowed down to a communication issue with the ROS service. Unfortunately my knowledge of ROS services is pretty limited so I might not be much help. Just to check, is actionlib installed on both machines?

Asked by M@t on 2017-10-08 16:14:11 UTC

Actions are all topic based, so no services involved.

Asked by gvdhoorn on 2017-10-09 02:43:33 UTC

Haha then that shows exactly how little I understand about ROS actions/services. So unfortunately I won't be any further help with this problem.

Asked by M@t on 2017-10-09 17:20:57 UTC

It's pretty weird though. When I was working with my raspberry pi I could run some actionlib servers on my computer while clients were on rpi. And it worked that way.

Asked by l4ncelot on 2017-10-10 01:13:53 UTC

Well that's why I'm not entirely convinced that the network is setup correctly. But it could be that there is some aspect of Actionlib that doesn't like the use_sim_time (ie: is bugged).

Asked by gvdhoorn on 2017-10-10 01:21:13 UTC

Just to make the info in the OP complete: could you add the values of ROS_IP, ROS_HOSTNAME, ROS_MASTER_URI and the IPs (subnets, gateways, etc) and hostnames of all involved machines?

Asked by gvdhoorn on 2017-10-10 01:27:55 UTC

Yeah it is... I think the problem may be with sim time.

Asked by mscott on 2017-10-17 16:40:05 UTC

Answers