Problem with tf on multiple machines
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
Just making sure: have you synchronised the clocks on all involved hosts?
I did, I think atleast. I ran the following command: 'ntpdate -q raspberryIP' with outcome:
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...
That seems to contradict with previous statement:
Can you publish and subscribe from both your Pi and your regular PC in all directions?
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.
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.
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?
I have the same problem as yours. Has the roblem solved?