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

rostopic list return topics, but not able to echo topic

asked 2015-08-26 07:29:51 -0500

darkom gravatar image

updated 2015-08-26 10:39:17 -0500

gvdhoorn gravatar image

Hello,

My configuration looks like:

Beaglebone black with GPS + laptop. Both running Ubuntu 14.04 and ROS indigo.

I would like to run roscore at laptop and node gpsd_client at beaglebone. I set following variables: At laptop (ip 192.168.7.1):

export ROS_IP=192.168.7.1
export ROS_HOSTNAME=192.168.7.1
export ROS_MASTER_URI=http://192.168.7.1:11311

At beaglebone (ip 192.168.7.2):

export ROS_IP=192.168.7.2
export ROS_HOSTNAME=192.168.7.1
export ROS_MASTER_URI=http://192.168.7.1:11311

I'm able to ping each other. I'm able to do rostopic list from both. But I'm not able to do rostopic echo fix.

roswtf give following error msg:

Loaded plugin tf.tfwtf
No package or stack in context
================================================================================
Static checks summary:

No errors or warnings
================================================================================
Beginning tests of your ROS graph. These may take awhile...
analyzing graph...
... done analyzing graph
running graph rules...
ERROR: connection refused to [http://192.168.7.1:41219/]
... done running graph rules

Online checks summary:

Found 3 error(s).

ERROR Could not contact the following nodes:
 * /gpsd_client

ERROR The following nodes should be connected but aren't:
 * /gpsd_client->/rosout (/rosout)

ERROR Errors connecting to the following services:
 * service [/gpsd_client/get_loggers] appears to be malfunctioning: Unable to communicate with service [/gpsd_client/get_loggers], address [rosrpc://192.168.7.1:58483]
 * service [/gpsd_client/set_logger_level] appears to be malfunctioning: Unable to communicate with service [/gpsd_client/set_logger_level], address [rosrpc://192.168.7.1:58483]

I see error

ERROR The following nodes should be connected but aren't:
 * /gpsd_client->/rosout (/rosout)

but unfortunately I don't now how should I fix it.

I tried another configuration, when roscore was running at beaglebone with gpsd_client, and do echo from laptop - this is working without any problem. Just problem apear when I run roscore at one machine and node in another.

I hope that my problem is trivial to fix and I'm just missing some setting.

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
2

answered 2015-08-26 10:43:49 -0500

gvdhoorn gravatar image

updated 2015-08-26 10:46:55 -0500

At laptop (ip 192.168.7.1):

export ROS_IP=192.168.7.1
export ROS_HOSTNAME=192.168.7.1
export ROS_MASTER_URI=http://192.168.7.1:11311

At beaglebone (ip 192.168.7.2):

export ROS_IP=192.168.7.2
export ROS_HOSTNAME=192.168.7.1
export ROS_MASTER_URI=http://192.168.7.1:11311

Is that an actual copy/paste? Because you have ROS_HOSTNAME set to the same IP on both machines, which is not what you want I guess.

Also, you should not / don't need to set both ROS_IP and ROS_HOSTNAME at the same time. Just setting ROS_IP should be enough (but make sure to set it to the correct IP). From the wiki/ROS/EnvironmentVariables - ROS_IP/ROS_HOSTNAME page:

[..] The options are mutually exclusive, if both are set ROS_HOSTNAME will take precedence. Use ROS_IP if you are specifying an IP address, and ROS_HOSTNAME if you are specifying a host name. [..]

If you then have ROS_HOSTNAME set to an incorrect IP, things will probably not work.

edit flag offensive delete link more

Comments

Thank you so much. Now it is working just great.

darkom gravatar image darkom  ( 2015-08-27 02:21:20 -0500 )edit
0

answered 2016-11-08 08:27:52 -0500

Hi everyone!

I am facing the same problem but setting the environment variables don't seem to solve my problem. I have a VM and a SeekurJr Robot both running Ubuntu 12.04 and ROS Groovy. I also changed the hosts file in both machines.

I run the rospy_tutorials talker/listener example to test it. And the result is that when the robot is the talker and my VM is the listener I can "hear" it. The other way around doesn't work.

The robot has a M0n0wall radio and I have changed its firewall rules to allow communication on any port.

Anyone has any idea what is missing?

Thank you in Advance.

Best regards,

Aline

edit flag offensive delete link more

Comments

Hey! Let me know if you have it figured out!

I am currently facing the same problem! Able to run listener/talker examples, able to ping, able to teleop but unable to do rostopic echo commands.

Alsing gravatar image Alsing  ( 2016-11-29 20:51:34 -0500 )edit

At first, I would suggest checking your network infrastructure - if you have any firewall blocking some ports. At the university where I'm working there was this issue, that just some ports are open. Best is to have your local router and be able to control it. Also, check your environment variables.

darkom gravatar image darkom  ( 2016-11-30 00:47:33 -0500 )edit

Hey, thanks a lot for the suggestion. I have tried that, as shown in here because I figured it deserved a new thread.

I am using a LAN connection from my workstation to my robot, and able to teleop though.

Alsing gravatar image Alsing  ( 2016-11-30 02:27:56 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2015-08-26 07:29:51 -0500

Seen: 4,586 times

Last updated: Aug 26 '15