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

DAVIDRBOT's profile - activity

2017-11-24 23:47:51 -0500 received badge  Famous Question (source)
2016-10-14 04:28:08 -0500 received badge  Notable Question (source)
2016-09-08 04:12:50 -0500 received badge  Popular Question (source)
2016-09-07 08:47:00 -0500 asked a question A node failed to receive topic message from a remote computer node.

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.