A node failed to receive topic message from a remote computer node.

asked 2016-09-07 07:25:58 -0500

DAVIDRBOT gravatar image

updated 2016-09-07 20:37:48 -0500

I want to set up nodes between my robot os and my work pc.

I set ROS_HOSTNAME=ros-dev.local on my robot os.

root@ros-dev:~/catkin_ws# hostname
ros-dev
root@ros-dev:~# ping qichunren-work.local
PING qichunren-work.local (192.168.8.154) 56(84) bytes of data.
64 bytes from 192.168.8.154: icmp_seq=1 ttl=64 time=7.93 ms
root@ros-dev:~/catkin_ws# cat /etc/hosts
127.0.0.1       ros-dev
127.0.0.1       localhost
192.168.8.157   qichunren-work

Then I start roscore: roscore & Then I start a node listener.

On my work pc:

ROS env:

qichunren@qichunren-work:~/catkin_ws$ echo $ROS_IP 

qichunren@qichunren-work:~/catkin_ws$ echo $ROS_HOSTNAME
ros-dev.local
qichunren@qichunren-work:~/catkin_ws$ echo $ROS_MASTER_URI
http://ros-dev.local:11311

qichunren@qichunren-work:~/catkin_ws$ hostname
qichunren-work
qichunren@qichunren-work:~/catkin_ws$ ping ros-dev.local
PING ros-dev.local (192.168.8.220) 56(84) bytes of data.
64 bytes from ros-dev (192.168.8.220): icmp_seq=1 ttl=64 time=109 ms

qichunren@qichunren-work:~/catkin_ws$ cat /etc/hosts
127.0.0.1   localhost
192.168.8.220   ros-dev

And I ping each other both ok.

I add env var into ~/.bashrc on my work pc:

export ROS_HOSTNAME=ros-dev.local
export ROS_MASTER_URI=http://ros-dev.local:11311

I start a cmd_vel node on my work pc:

qichunren@qichunren-work:~/catkin_ws$ rosrun turtlesim turtle_teleop_key 
Reading from keyboard
---------------------------
Use arrow keys to move the turtle.

But I can't send topic message to remote master node when I press up/down/left/right keys.

Debug: On robot os:

root@ros-dev:~# rosnode list
/cmd_vel_listener_7800_1473279280207
/rosout
/teleop_turtle
root@ros-dev:~# rosnode info /cmd_vel_listener_7800_1473279280207  
--------------------------------------------------------------------------------
Node [/cmd_vel_listener_7800_1473279280207]
Publications: 
 * /rosout [rosgraph_msgs/Log]

Subscriptions: 
 * /turtle1/cmd_vel [geometry_msgs/Twist]

Services: 
 * /cmd_vel_listener_7800_1473279280207/get_loggers
 * /cmd_vel_listener_7800_1473279280207/set_logger_level


contacting node http://ros-dev.local:56815/ ...
Pid: 7800
Connections:
 * topic: /rosout
    * to: /rosout
    * direction: outbound
    * transport: TCPROS

root@ros-dev:~# rosnode info /teleop_turtle                       
--------------------------------------------------------------------------------
Node [/teleop_turtle]
Publications: 
 * /turtle1/cmd_vel [geometry_msgs/Twist]
 * /rosout [rosgraph_msgs/Log]

Subscriptions: None

Services: 
 * /teleop_turtle/get_loggers
 * /teleop_turtle/set_logger_level


contacting node http://ros-dev.local:44188/ ...
ERROR: Communication with node[http://ros-dev.local:44188/] failed!
root@ros-dev:~#

I am confused why command *rosnode info /teleop_turtle show me the node ip host is ros-dev.local, while this node is lanuched on my work pc in fact.*

On my work pc:

qichunren@qichunren-work:~/catkin_ws/src/paigo_ros/paigo_apps$ rosnode list
/cmd_vel_listener_7800_1473279280207
/rosout
/teleop_turtle

qichunren@qichunren-work:~/catkin_ws/src/paigo_ros/paigo_apps$ rosnode info /teleop_turtle 
--------------------------------------------------------------------------------
Node [/teleop_turtle]
Publications: 
 * /turtle1/cmd_vel [geometry_msgs/Twist]
 * /rosout [rosgraph_msgs/Log]

Subscriptions: None

Services: 
 * /teleop_turtle/get_loggers
 * /teleop_turtle/set_logger_level


contacting node http://ros-dev.local:44188/ ...
ERROR: Communication with node[http://ros-dev.local:44188/] failed!

I want to know why ros nodes bewteen two computer can't work. Thanks.

edit retag flag offensive close merge delete

Comments

1

I'm all for detailed questions, but this is a bit much. Could you please add a table at the top showing the values of ROS_IP and ROS_MASTER_URI for all of the involved computers? That should quickly show if something is not configured correctly.

gvdhoorn gravatar image gvdhoorn  ( 2016-09-07 12:18:05 -0500 )edit

Try to set your work pc ROS_HOSTNAME to qichunren-work. Keep the ROS_MASTER_URI to be http://ros-dev.local:11311

DavidN gravatar image DavidN  ( 2016-09-08 23:13:33 -0500 )edit