TF Error between two machines

asked 2019-11-19 03:36:20 -0500

Aviad gravatar image

updated 2019-11-19 03:39:54 -0500

Hello,

I am working with two machines together. One for a manipulator("melodic" version) and the second for the autonomous platform("kinetic" platform). In the first computer (It is the master) I run the urdf of all the system and the ur_driver for the manipulator. In the second machine I run RTABmap and robot_localization pkg. When I look in Rviz I see that there is an error when the fixed frame is "map" or "odom" (these are the only 2 frames which published in the second machine). There is no link between the whole frames Although in rqt it looks fine. If I change the fixed frame to another frame like "base_footprint) it is look fine. In addition, when I run "tf_monitor" between "map" and the highlighted frames in Rviz(see image) I have the same error.

I added some images and I will glad if someone can give me some suggestions for that.

Thanks, Aviad

https://ibb.co/k2mgTbJ

https://ibb.co/ZX6jbQ1

https://ibb.co/P563CMk

edit retag flag offensive close merge delete

Comments

Have you propperly set ROS_MASTER_URI and ROS_HOSTNAME on both machines ?

Delb gravatar image Delb  ( 2019-11-19 04:01:07 -0500 )edit

Hi, I seted ROS_MASTER_URI well but I did not set ROS_HOSTNAME at all. I can see the topics which published between the computers. Maybe the ROS_HOSTNAME is the problem?

Aviad gravatar image Aviad  ( 2019-11-19 04:16:55 -0500 )edit

It could indeed create issues, you have to set ROS_HOSTNAME or set ROS_IP for each machine with their corresponding ip adress.

Delb gravatar image Delb  ( 2019-11-19 04:27:35 -0500 )edit

I have ROS_IP for both machines. So, if I understand you I don't need to set ROS_HOSTNAME too. Right?

Aviad gravatar image Aviad  ( 2019-11-19 04:41:34 -0500 )edit

Yes ROS_HOSTNAME and ROS_IP are mutually exclusive. Have you tried running roswtf while running the program ? It can detect TF issues (doc link)

Delb gravatar image Delb  ( 2019-11-19 05:08:39 -0500 )edit
1

If you look at the rqt_graph, the timestamps for map and odom are like 160 seconds in the future. Try synchronizing the clocks between the machines (ntpdate).

matlabbe gravatar image matlabbe  ( 2019-11-19 07:33:05 -0500 )edit

@Aviad: please attach your screenshots directly to this question.

I've given you sufficient karma for that.

gvdhoorn gravatar image gvdhoorn  ( 2019-11-20 02:17:31 -0500 )edit