0
$\begingroup$

Rosanswers logo

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

Originally posted by Alsing on ROS Answers with karma: 27 on 2017-01-05

Post score: 0


Original comments

Comment by NEngelhard on 2017-01-05:
"However, I am unable to ..." Could you be a bit more specific?

Comment by Alsing on 2017-01-05:
Oh! Is the formatting wrong?

"rostopic echo /tf" is what should folllows.

Comment by NEngelhard on 2017-01-05:
"I am unable to" sounds like you have lost your keyboard. What happens?

Comment by Alsing on 2017-01-05:
Ooops! I have edited the formatting. You should be able to see all of the question now!

Comment by clyde on 2017-01-05:
What error do you get?

Comment by Alsing on 2017-01-05:
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.

Comment by clyde on 2017-01-09:
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.

Comment by ahendrix on 2017-01-09:
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.

Comment by Alsing on 2017-01-10:
Just to clarify. I SSH into the machine at 192.168.1.105. Ifconfig on my desktop how 192.168.1.51. Whose IP must I export as 192.168.1.10?

Comment by clyde on 2017-01-11:
rosnode info /imu/declination_compute seems to think that /imu/declination_compute is running on 192.168.10.1, not 192.168.1.105. Does your machine have 2 IP addresses (maybe Ethernet and Wifi), each active on a different subnet?

Comment by Alsing on 2017-01-13:
@clyde My machine isn't running on 2 IP addresses, its only on wifi. I did a check and 192.168.10.1 is the internal ip address the nodes use to connect (with corresponding ports) that is ROS configured and has nothing to do with my machine or workstation. @ahendrix, could you verify if that is true?

Comment by Alsing on 2017-01-13:
@ahendrix I understand what you're saying. Is there a way to configure the 192.168.10.1 to 192.168.1.105?

Comment by ahendrix on 2017-01-13:
@Alsing: I'm not sure what you're referring to; ROS doesn't have an "internal IP address" of any kind. Perhaps this is something that's specific to your system?

Comment by Alsing on 2017-01-13:
@ahendrix In my case, isn't 192.168.10.1 the IP address the nodes(at different ports) of the machine talk to each other and 192.168.1.105 is the IP address machines talk to each other. Otherwise, in a multi-machine situation, things can get messy.

Comment by Alsing on 2017-01-13:
@ahendrix, I thought that is how ROS works. And that 192.168.10.1 is something ROS itself decides as the user doesn't decide what IP address the nodes of the machine communicate over. I'm not sure if I'm right.

Comment by ahendrix on 2017-01-13:
No; ROS isn't creating new IP addresses. As I said before, it only uses the hostname or ROS_IP that you configure.

Comment by ahendrix on 2017-01-13:
It really seems like there's more going on here than you're said. Does your robot have multiple computers inside it, additional internal networks, or an internal router? What robot do you have?

Comment by Alsing on 2017-01-13:
@ahendrix. I'm using a discontinued Kingfisher unit from Clearpath Robotics. As far as I know, it contains only one computer, connected through WAN, with no internet connection. My workstation runs on a VM with Ubuntu 12.04 as a guest OS.

Comment by Alsing on 2017-01-13:
If I could do talker/listener examples as well as control it with a joystick, there should be a configurable setting that bridges 192.168.10.1 to 192.168.1.105. Any idea where that may be at?

Comment by ahendrix on 2017-01-14:
This page indicates that the Kingfishes has multiple network interfaces, with separate IPs for wired and wireless. They also indicate that most ROS processes start up automatically with a separate configuration.

Comment by ahendrix on 2017-01-14:
Further, it looks like their suggested method for connecting to the auto-started ROS nodes is to add a static route on your workstation that points to the onboard (wired) IP address.

Comment by ahendrix on 2017-01-14:
The IP addresses that you've reported are similar (two sets of IP addresses), but the specific IP addresses differ from the documentation, so you probably need to change most of the IP addresses to match your situation.

Comment by Alsing on 2017-01-14:
@ahendrix any idea where I could do that?

Comment by ahendrix on 2017-01-14:
Clearpath's tutorial gives clear and specific instructions on how to add the necessary route.

Comment by Alsing on 2017-01-16:
Thanks! I finally understood. I have 192.168.10.1 added. Not sure how it works, but it does. Thank you!

Comment by Alsing on 2017-01-31:
@ahendrix is there a way to permanently add the IP address routing? Each time the machine reboots, I'd have to manually add it in.

Comment by ahendrix on 2017-01-31:
Yes. If you use NetworkManager, there's an option deep in the IP settings of the NetworkManager UI for adding additional routes when you connect to a specific network. If you use /etc/network/interfaces, there's an option you can add there to add additional routes when the interface comes up.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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


Originally posted by ahendrix with karma: 47576 on 2017-01-06

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by Alsing on 2017-01-06:
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

Comment by NEngelhard on 2017-01-06:
"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.

Comment by Alsing on 2017-01-06:
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.

Comment by NEngelhard on 2017-01-06:
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?

Comment by ahendrix on 2017-01-06:
Which other topics (aside from /tf ) have you tried?

Comment by NEngelhard on 2017-01-07:
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'

Comment by Alsing on 2017-01-08:
@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!

Comment by NEngelhard on 2017-01-08:
So which topics work and which don't?

Comment by Alsing on 2017-01-08:
The topics listed by "rostopic /list" don't work

Comment by NEngelhard on 2017-01-08:
What about the /hello topic? Is it listed by rostopic list? Is it working?

Comment by Alsing on 2017-01-08:
The /hello topic is just a talker/listener example. I wouldn't normally run that. But if I explicitly pub a topic from the machine side, then yes it can echo on the workstation. But I can't explicitly pub each and every topic.

Comment by NEngelhard on 2017-01-08:
But please be precise in your reporting. You always tell that no topic is working but provide an example where it's working. That's a bit annoying.

Comment by ahendrix on 2017-01-08:
@NEngelhard: we get it; now please stop splitting hairs.

Comment by ahendrix on 2017-01-08:
@Alsing: it definitely seems like there's something different between the way you run nodes manually, and the way the rest of the nodes on your "machine" are run. Given that this seems to affect everything, it seems unlikely to be a version mismatch.

Comment by ahendrix on 2017-01-08:
I suspect the ROS_IP setting isn't getting propagated to your nodes when they're run. If you know a node that is running on the "machine", you can confirm its ROS_IP by looking at the output from rosnode info for that node.

Comment by ahendrix on 2017-01-08:
Please edit your question to include rosnode info for one of the nodes that should be publishing /tf . If you don't know which nodes should be publishing /tf, you can see the publisher list in rostopic info /tf

Comment by Alsing on 2017-01-09:
@ahendrix Hey! Thanks for identifying the problem! I am unsure how I was suppose to follow up. Do let me know!

Comment by ahendrix on 2017-01-09:
It definitely seems like your ROS_IP settings aren't getting applied properly, and it's choosing something else instead. You can try to troubleshoot on your own, or you can edit your question to describe how you're starting the other nodes on your "machine".

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.