Not able to echo topics published on separate computer with rosmaster [closed]

asked 2018-02-04 16:08:52 -0500

skynet gravatar image

updated 2018-02-04 18:09:10 -0500

Hello,

rostopic echo /turtle1/cmd_vel on my slave computer outputs nothing after using rostopic pub -r 1 /turtle1/cmd_vel geometry_msgs/Twist -- '[2.0 ,0.0, 0.0]' '[0.0, 0.0, 1.8]'

on my master over wi-fi.

I am using ubuntu 16.04 and ROS kinetic on both master(beaglebone black) and slave(intel nuc).

What is confusing is I can publish the command on the beaglebone and run rosrun turtlesim turtlesimm_node on the slave and the turtle executes a circle as the publish command on the master will do. I can see the topics on both machines after

export ROS_HOSTNAME=astrobotics-desktop
export ROS_MASTER_URI=http://robot:11311

on the slave and

export ROS_HOSTNAME=robot
export ROS_MASTER_URI=http://robot:11311

on the master

Why can I not see the data being published on the master using rostopic echo /turtle1/cmd_vel but the turtlesim node running on the slave seems to be able to see the data just fine? Thank you


UPDATE: I've created a publisher node turtle_pub.cpp on the master that publishes random /turtle1/cmd_vel messages. I can echo those messages on my slave and see them but when I do it the other way around I am unable to echo the messages on the master when the slave is publishing random messages.

I ran roswtf on the master and gave

Package: robot2017 
Cannot find dependencies for package [robot2017]: missing robot2017 
ROS path [0]=/opt/ros/kinetic/share/ros 
ROS path[1]=/opt/ros/kinetic/share

when I run roswtf on the slave I get

WARNING ROS_HOSTNAME may be incorrect: ROS_HOSTNAME [astrobotics-desktop] resolves to [127.0.1.1], which does not appear to be a local IP address ['127.0.0.1','10.0.0.35'].

I changed my export ROS_HOSTNAME=astrobotics-desktop on the slave to the slaves ip address of 10.0.0.35 and it is working. How should my /etc/hosts file look. Right now it is on the slave:

127.0.0.1 localhost
127.0.1.1 astrobotics-desktop
10.0.0.30 robot

and on the master:

127.0.0.1 localhost
127.0.1.1 robot/localdomain robot
10.0.0.35 astrobotics-desktop
edit retag flag offensive reopen merge delete

Closed for the following reason duplicate question by skynet
close date 2018-02-06 13:20:56.587671

Comments

Did you try what it says in the debugging section of the network setup guide?

jayess gravatar image jayess  ( 2018-02-04 17:20:06 -0500 )edit

UPDATE: I've created a publisher node turtle_pub.cpp on the master that publishes random /turtle1/cmd_vel messages. I can echo those messages on my slave and see them but when I do it the other way around I am unable to echo the messages on the master when the slave is publishing random messages.

skynet gravatar image skynet  ( 2018-02-04 17:21:51 -0500 )edit

running publishing node on the slave. I ran roswtf on the master and gave Package: robot2017 Cannot find dependencies for package [robot2017]: missing robot2017 ROS path [0]=/opt/ros/kinetic/share/ros ROS path[1]=/opt/ros/kinetic/share @jayess

skynet gravatar image skynet  ( 2018-02-04 17:41:34 -0500 )edit

when I run roswtf on the slave I get WARNING ROS_HOSTNAME may be incorrect: ROS_HOSTNAME [astrobotics-desktop] resolves to [127.0.1.1], which does not appear to be a local IP address ['127.0.0.1','10.0.0.35'].

skynet gravatar image skynet  ( 2018-02-04 17:45:06 -0500 )edit

Can you please update your question with this information (using the preformatted text button)?

jayess gravatar image jayess  ( 2018-02-04 17:56:34 -0500 )edit