Not able to echo topics published on separate computer with rosmaster
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 turtlepub.cpp on the master that publishes random /turtle1/cmdvel 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
Asked by skynet on 2018-02-04 17:08:52 UTC
Comments
Did you try what it says in the debugging section of the network setup guide?
Asked by jayess on 2018-02-04 18:20:06 UTC
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.
Asked by skynet on 2018-02-04 18:21:51 UTC
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
Asked by skynet on 2018-02-04 18:41:34 UTC
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'].
Asked by skynet on 2018-02-04 18:45:06 UTC
Can you please update your question with this information (using the preformatted text button)?
Asked by jayess on 2018-02-04 18:56:34 UTC