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

Node doesn't receive message, but rostopic list/info sees it [closed]

asked 2016-02-18 15:31:16 -0600

Pengatom gravatar image

updated 2016-02-18 15:48:51 -0600

I've modified the turtlesim tutorial to control some servos from a ps3 controller, and everything works fine when everything is running from my laptop. Now I want to move the part/file that actually do the moving of the servos over to a RPi.

I've added

export ROS_MASTER_URI=http://Yoda.local:11311

to the .bashrc on both nodes.

rostopic list/info/type displays the same info on both laptop and RPi, but when I try to get any actual data out, the RPi doesn't receive anything on rostopic echo/hz

I've tried running

rostopic pub -r 10 /robonova3/cmd_vel geometry_msgs/Twist '{linear: {x: 0.1, y: 0.0, z: 0.0}, angular: {x: 0.0,y: 0.0,z: 0.0}}'

on both machines, but its only picked up locally, not by the other machine...

Any suggestions?

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Procópio
close date 2016-02-25 03:53:35.530478

Comments

Have you also set the ROS_IP on both computers?

NEngelhard gravatar image NEngelhard  ( 2016-02-18 15:54:43 -0600 )edit

1 Answer

Sort by » oldest newest most voted
2

answered 2016-02-18 15:59:04 -0600

This can happen when ROS_IP or ROS_HOSTNAME (only one of the two needed) are not set correctly on both machines. See also lEnvironmentVariables or this Q/A, Searching for "ROS_IP" or "ROS_HOSTNAME" here or on google should also provide sufficient info to fix this issue.

edit flag offensive delete link more

Comments

Voila! Thanks Should've been better explained that this is needed. In the tutorial it's only mentioned as something to add if one cannot ssh to the machine - which I could...

Pengatom gravatar image Pengatom  ( 2016-02-19 07:31:16 -0600 )edit

you are welcome to edit the wiki to better explain that ;)

Procópio gravatar image Procópio  ( 2016-02-25 03:17:46 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2016-02-18 15:31:16 -0600

Seen: 1,590 times

Last updated: Feb 18 '16