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

Unable to echo rostopics over network

asked 2017-01-05 04:53:53 -0500

Alsing gravatar image

updated 2017-01-09 04:14:46 -0500

I have a workstation(hostname ubuntu) at 192.168.1.51, a machine(hostname CPR-SMIT03) at 192.168.1.105

I am able to teleop the machine with a joystick from my workstation. The publish/listener tutorial also works fine both ways.

However, I am unable to rostopic echo /tf or any other topics for that matter, despite being able to run rostopic list on the workstation.

On my machine, I could run both commands. I have read the pre-existing threads about being able to list rostopics but unable to echo them, but I they haven't helpful enough for me. Looking really for more instructive guidance.

On my workstation's .bashrc:

export ROS_IP=192.168.1.51
export ROS_MASTER_URI=http://192.168.1.105:11311

In my workstation's /etc/hosts:

127.0.0.1       localhost
127.0.1.1       ubuntu
192.168.1.105   CPR-SMIT03

On my machine's .bashrc:

export ROS_IP=192.168.1.105
export ROS_MASTER_URI=http://192.168.1.105:11311

In my machine's /etc/hosts:

127.0.0.1    localhost 
127.0.1.1    CPR-SMIT03
192.168.1.51 ubuntu

Update: running "rostopic info /tf" on both the "machine" and my workstation shows publishers and subscribers at 192.168.10.1:[various ports]. Other rostopics demonstrate the same IP address for publishers and subscribers. Does that mean anything?

Example for "rosnode info /imu/declination_compute"

Node [/imu/declination_compute]

Publications:
* /rosout [rosgraph_msgs/Log]
* /imu/declination [std_msgs/Float32]

Subscriptions:
* /navsat/fix [sensor_msgs/NavSatFix]

Services:
* /imu/declination_compute/set_logger_level
* /imu/declination_compute/get_loggers

contacting node http://192.168.10.1:36537/ ...
Pid: 2954
Connections:

* topic: /rosout
    * to: /rosout
    * direction: outbound
    * transport: TCPROS
* topic: /imu/declination
    * to: /imu_compass
    * direction: outbound
    * transport: TCPROS
* topic: /navsat/fix
    * to: /navsat/nmea_topic_driver (http://192.168.10.1:57719/)
    * direction: inbound
    * transport: TCPROS
edit retag flag offensive close merge delete

Comments

"However, I am unable to ..." Could you be a bit more specific?

NEngelhard gravatar image NEngelhard  ( 2017-01-05 05:24:01 -0500 )edit

Oh! Is the formatting wrong?

"rostopic echo /tf" is what should folllows.

Alsing gravatar image Alsing  ( 2017-01-05 05:44:13 -0500 )edit

"I am unable to" sounds like you have lost your keyboard. What happens?

NEngelhard gravatar image NEngelhard  ( 2017-01-05 05:51:59 -0500 )edit

Ooops! I have edited the formatting. You should be able to see all of the question now!

Alsing gravatar image Alsing  ( 2017-01-05 07:05:42 -0500 )edit

What error do you get?

clyde gravatar image clyde  ( 2017-01-05 11:32:13 -0500 )edit

Nothing! Things just don't run. It hangs. Whereas on the machine side, should I run rostopic echo /tf I get a huge long list of things.

Alsing gravatar image Alsing  ( 2017-01-05 17:50:38 -0500 )edit

Sounds like your machines are all on the 192.168.10.X subnet, not the 192.168.1.X subnet. If that's the case you should update all of our /etc/hosts files & the .bashrc files to match the actual IP addresses.

clyde gravatar image clyde  ( 2017-01-09 16:00:11 -0500 )edit

It's odd that the configured ROS_IP doesn't match the reported node URI. If the configuration data was wrong, I would expect nothing to work, and the reported URI to match the configured ROS_IP.

ahendrix gravatar image ahendrix  ( 2017-01-09 17:05:32 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-01-06 02:32:54 -0500

ahendrix gravatar image

updated 2017-01-06 02:33:06 -0500

As a simpler test, you can try running the talker and listener from the tutorial across your network. Try running the talker on your "machine" and the listener on your "workstation".

If that doesn't work, then there's likely a subtle connectivity issue between your computers. Maybe you have a firewall or your workstation is a Virtual Machine?

If that does work, then there's probably some issue that affects /tf differently. Do you have the same version of ROS on both computers?

There are a bunch of steps that can go wrong in the topic setup process; if you want a more in-depth look have a look at the video and slides from my presentation at RosCon 2013

edit flag offensive delete link more

Comments

Hey ahendrix,

Thanks for the suggestions. I have tried the talker/listener tutorial both ways and they work fine. It is not an issue that is specific to the /tf topic, but one that affects all topicst.

Thank you for the attachments and I'll see what I can glean from them. Will keep you posted

Alsing gravatar image Alsing  ( 2017-01-06 02:48:14 -0500 )edit

"I have tried the talker/listener tutorial both ways and they work fine. It is not an issue that is specific to the /tf topic, but one that affects all topics." This is a contradiction.

NEngelhard gravatar image NEngelhard  ( 2017-01-06 03:35:40 -0500 )edit

Yea! I am puzzled!.

I could run "rostopic pub -r10 /hello std_msgs/String "hello" " on my workstation and run "rostopic echo /hello" on the machine without any problems. That works vice versa. Yet I don't get anything when I "rostopic echo [any topic]" on my workstation.

Alsing gravatar image Alsing  ( 2017-01-06 03:51:31 -0500 )edit

So either it works for the /hello-topic or It does not work for ""rostopic echo [any topic]"". You can't say that it does not work for any topic and at the same time providing a topic that works. Can you do a "rosmsg show tf/tfMessage" on both computers?

NEngelhard gravatar image NEngelhard  ( 2017-01-06 04:01:43 -0500 )edit

Which other topics (aside from /tf ) have you tried?

ahendrix gravatar image ahendrix  ( 2017-01-06 11:55:45 -0500 )edit

BTW: Who should be publishing on the /tf-topic? Does the echo work on the computer on which the publisher is running? What is the output of 'rostopic hz /tf'

NEngelhard gravatar image NEngelhard  ( 2017-01-07 01:47:30 -0500 )edit

@NEngelhard: I see where you're coming from! "rosmsg show tf/tfMessage" works on both computers. Output of "rostopic hz /tf" doesn't work on my workstation (simply hangs) but works on the machine.

@ ahendrix: I have tried every topic that appeared in "rostopic list".

Hope that helps!

Alsing gravatar image Alsing  ( 2017-01-08 00:05:26 -0500 )edit

So which topics work and which don't?

NEngelhard gravatar image NEngelhard  ( 2017-01-08 03:30:25 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2017-01-05 04:53:53 -0500

Seen: 2,281 times

Last updated: Jan 09 '17