Ask Your Question
0

cannot publish cmd_vel messages

asked 2014-07-01 08:49:48 -0500

Federico gravatar image

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

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2014-07-01 13:03:22 -0500

Federico gravatar image

My bad. It was a bad configuration of the /etc/hosts.

edit flag offensive delete link more

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)

Ken_in_JAPAN gravatar imageKen_in_JAPAN ( 2014-07-01 13:46:18 -0500 )edit
0

answered 2014-07-01 10:10:12 -0500

tfoote gravatar image

updated 2014-07-01 10:11:44 -0500

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.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2014-07-01 08:49:48 -0500

Seen: 681 times

Last updated: Jul 01 '14