ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Ros topics over different computer

asked 2012-06-25 04:51:49 -0500

Subhash gravatar image

We have a turtlebot running ROS-Electric, and remote laptop also running ROS-Electric.

I was trying to publish message to rostopic /cmd_vel, in order to control velocity of turtlebot from remote laptop. However I noticed that, messages published in remote laptop is visible (via rostopic echo) only in remote laptop and not on turtlebot laptop. However I can read the data published by keyboard_teleop running turtlebot, on remote laptop. keyboard_teleop works when it is run on turtlebot laptop, and not on remote laptop. Why is this so? Here ROS_MASTER_URI has been properly configured to point turtlebot laptop.

I was expecting the communication to happen across multiple computer as ROS master is running on turtlebot, and takes care of the networking for ROS topics. Can anybody kindly explain how we can publish to a rostopic subscribed on another computer?

Thanks Subhash

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted
4

answered 2012-06-25 05:10:32 -0500

Ben_S gravatar image

You should check your network setup and make sure, that both laptops are able to ping each other by the name you have set as ROS_HOSTNAME. If you have not set ROS_HOSTNAME, try setting ROS_IP to the interface adresses you are using for the networkcommunication.

You can do this by adding the following line to your .bashrc:

export ROS_IP=10.1.1.xxx
edit flag offensive delete link more
3

answered 2012-06-25 05:02:51 -0500

Lorenz gravatar image

This has been asked (and answered) multiple times already. E.g. here or here. Also please have a look at the support guidelines.

edit flag offensive delete link more
0

answered 2012-06-26 01:34:36 -0500

Subhash gravatar image

Thanks Lorenz, Ben. I changed ROS_HOSTNAME from localhost to 10.0.0.xx and it is working. Message published on remote laptop is received on turtlebot laptop. Also, in Eclipse, I added ROS_HOSTNAME environment variable, in order to run the program within Eclipse IDE.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2012-06-25 04:51:49 -0500

Seen: 6,823 times

Last updated: Jun 26 '12