Unable to echo rostopics over network
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
"However, I am unable to ..." Could you be a bit more specific?
Oh! Is the formatting wrong?
"rostopic echo /tf" is what should folllows.
"I am unable to" sounds like you have lost your keyboard. What happens?
Ooops! I have edited the formatting. You should be able to see all of the question now!
What error do you get?
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.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.
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.