cannot publish cmd_vel messages
Hi all,
Just a brief question. Although there are many tutorials on how to set up the network configuration, nothing helped so I post the answer anyway. I have a robot that runs the roscore and the hardware related nodes (motion drivers, sensors etc) and a remote pc where I perform the motion planning on. I able to echo all the topic from my remote machine but on the robot I can only echo the topics published on the robot itself.
Example: I have a /cmd_vel
subscriber on the robot. If I run the-robot~$ rostopic pub /cmd_vel geometry_msgs/Twist '[0.1, 0, 0]' '[0,0,0]'
the robot start to move (and from both machine I can see the message with rostopic echo /cmd_vel
. If
I run the same command on the remote laptop the robot doesn't move and the topic is seen only on the remote machine.
I exported ROS_MASTER_URI
, ROS_HOSTNAME
on the robot and ROS_MASTER_URI
on the laptop. I can ping correctly the robot from the remote laptop and viceversa. The netcat
thing exposed in the tutorial is also working fine. I tried to set ROS_IP=192.168.0.101
on the
robot too (instead of ROS_HOSTNAME
) but no improvements.
I also tried to set either ROS_HOSTNAME
or ROS_IP
on the remote machine but the communication from laptop to
robot still doesn't work. Furthermore in this last case I cannot launch files from the remote machine.
Is my configuration wrong. I'm using ROS groovy on the robot and ROS Hydro on the laptop. Anyway, I have the same issure using ROS groovy on both machines.
I've also exported the the host names in /etc/hosts (by the way the same configuration I made on my PC works on the PC next to me).
Any suggestion?
Federico
Asked by Federico on 2014-07-01 08:49:48 UTC
Answers
Are you setting the ROS_MASTER_URI to the same value on both machines? Please post more details of what you are typing so we can help you debug.
For others reference. The main guide referenced is the NetworkSetup page.
Asked by tfoote on 2014-07-01 10:10:12 UTC
Comments
My bad. It was a bad configuration of the /etc/hosts.
Asked by Federico on 2014-07-01 13:03:22 UTC
Comments
I also made same mistake. I have written the article on this page (http://answers.ros.org/question/139701/turtlebot2-doesnt-work-with-amcl_demolaunch/#141516)
Asked by Ken_in_JAPAN on 2014-07-01 13:46:18 UTC
Comments