Problem with tf on multiple machines

asked 2019-05-07 06:58:46 -0500

seth gravatar image

updated 2019-05-07 08:33:58 -0500

update: When running the hector_mapping code on my main computer, the raspberry Pi is actually able to see the tf data. So it is only a one-way problem...

I'm running ROS on two machines, a raspberry pi connected to sensors and a local machine for visualization.

Sending messages back and forth seems to all work fine, but something is going wrong with the tf data.

running 'rosrun tf view_frames' gives the same view_frames results and with 'rostopic echo /tf' it will show all the messages. However when running tf_monitor my local machine is not able to see any tf data:

RESULTS: for all Frames

Frames:

All Broadcasters:

On the raspberry pi:

RESULTS: for all Frames 

Frames:
Frame: /base_footprint published by unknown_publisher Average Delay: -0.0991144 Max Delay: 0
Frame: /laser_frame published by unknown_publisher Average Delay: -0.0391848 Max Delay: 0
Frame: /map published by unknown_publisher Average Delay: -0.0992479 Max Delay: 0
Frame: odom published by unknown_publisher Average Delay: 0.00852357 Max Delay: 0.150682
Frame: scanmatcher_frame published by unknown_publisher Average Delay: 0.141719 Max Delay: 0.150837

All Broadcasters:
Node: unknown_publisher 71.8076 Hz, Average Delay: -0.0238966 Max Delay: 0.150837

env | grep ROS # on my raspberry pi

ROS_ROOT=/opt/ros/kinetic/share/ros
ROS_PACKAGE_PATH=/home/ubuntu/lidar_ws/src:/home/ubuntu/catkin_ws/src:/opt/ros/kinetic/share
ROS_MASTER_URI=http://IP_MAIN:11311
ROS_VERSION=1
ROS_PARALLEL_JOBS=-j2
ROS_HOSTNAME=IP_pi
ROSLISP_PACKAGE_DIRECTORIES=/home/ubuntu/lidar_ws/devel/share/common-    lisp:/home/ubuntu/catkin_ws/devel/share/common-lisp
ROS_DISTRO=kinetic
ROS_IP=IP_pi
ROS_ETC_DIR=/opt/ros/kinetic/etc/ros

env | grep ROS # on my main pc

ROS_ROOT=/opt/ros/kinetic/share/ros
ROS_PACKAGE_PATH=/home/ubuntu/lidar_ws/src:/home/ubuntu/catkin_ws/src:/opt/ros/kinetic/share
ROS_MASTER_URI=http://IP_MAIN:11311
ROS_VERSION=1
ROS_PARALLEL_JOBS=-j2
ROS_HOSTNAME=IP_MAIN
ROSLISP_PACKAGE_DIRECTORIES=/home/ubuntu/lidar_ws/devel/share/common-lisp:/home/ubuntu/catkin_ws/devel/share/common-lisp
ROS_DISTRO=kinetic
ROS_IP= IP_MAIN
ROS_ETC_DIR=/opt/ros/kinetic/etc/ros
edit retag flag offensive close merge delete

Comments

Just making sure: have you synchronised the clocks on all involved hosts?

gvdhoorn gravatar image gvdhoorn  ( 2019-05-07 07:19:55 -0500 )edit

I did, I think atleast. I ran the following command: 'ntpdate -q raspberryIP' with outcome:

server raspberryIP, stratum 2, offset -0.052713, delay 0.02919
7 May 15:05:56 ntpdate[19786]: adjust time server raspberryIP offset -0.052713 sec
seth gravatar image seth  ( 2019-05-07 08:07:34 -0500 )edit

When running the hector_mapping code on my main computer, the raspberry Pi is actually able to see the tf data. So it is only a one-way problem...

seth gravatar image seth  ( 2019-05-07 08:33:12 -0500 )edit

That seems to contradict with previous statement:

Sending messages back and forth seems to all work fine, but something is going wrong with the tf data.

Can you publish and subscribe from both your Pi and your regular PC in all directions?

gvdhoorn gravatar image gvdhoorn  ( 2019-05-08 03:00:37 -0500 )edit

using rostopic echo, I can publish and subscribe in both ways. However, using rosrun tf tf_monitor it only works both ways if I broadcast from my pc. The moment I broadcast from my raspberry Pi, tf_monitor does not see anything on my pc.

seth gravatar image seth  ( 2019-05-08 03:25:37 -0500 )edit

That suggests that you're network is not setup entirely. See https://wiki.ros.org/ROS/NetworkSetup It's likely that one of your hostnames is not resolvable on the other machine.

tfoote gravatar image tfoote  ( 2019-05-08 12:39:19 -0500 )edit

I'm not able to find the problem. Running: 'rosrun tf static_transform_publisher 0 0 0 0 0 0 world map 500' on my desktop, everything seems to work fine. Both 'rostopic echo tf' and 'rosrun tf tf_monitor' shows the static publisher. However, running the same on my raspberryPi, only 'rostopic echo tf' shows the tf data on my desktop.

Anyone any suggestions?

seth gravatar image seth  ( 2019-05-13 06:32:56 -0500 )edit

I have the same problem as yours. Has the roblem solved?

kuma3y1t@gmail.com gravatar image kuma3y1t@gmail.com  ( 2022-09-22 02:05:37 -0500 )edit