ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Mavros publishing weird /tf data.

asked 2015-10-19 13:10:07 -0600

atech1380 gravatar image

When I echo the /tf topic published by mavros running on my drone I get:

- 
header: 
seq: 0
stamp: 
secs: 351641
nsecs: 788089172
frame_id: local_origin
child_frame_id: fcu
transform: 
translation: 
x: 0.0
y: 166021.443179
z: -1.0
rotation: 
x: 0.00538760551592
y: 0.00619496139752
z: 0.892766652461
w: -0.450444558647
---

I'm not sure what to make of the massive 166km y translation reading when the drone is sitting still (may be an issue with my system), but I think the 350k timestamp is an issue with mavros.

It seems that the /tf timestamp is being set to whenever mavros was installed on the machine it is running. When I update the mavros installation from 0.11.0 to 0.13.0 (My drone comes with an older version of mavros preinstalled) the timestamp gets reset to ~1.5k:

- 
header: 
seq: 0
stamp: 
secs: 1572
nsecs: 192321700
frame_id: local_origin
child_frame_id: fcu_utm
transform: 
translation: 
x: 166021.443179
y: 0.0
z: 0.84
rotation: 
x: -0.00606376771624
y: -0.00740089278356
z: -0.890106190627
w: 0.455652748169
---

It is my understanding that the /tf timestamps are supposed to be related to the unix epoch time of the system (Link), but the /tf time of ~350k seconds is not even close to the epoch time on my drone:

:/# date
Mon Oct 19 16:42:59 UTC 2015
:/# date +"%s"
1445272989

As an example of what /tf messages usually look like for me, here is what it looks like if you echo the /tf topic when running the ardrone_autonomy ros driver for the Parrot AR.Drone 2:

:~$ rostopic echo /tf
---
transforms: 
- 
header: 
seq: 0
stamp: 
secs: 1445033096
nsecs: 388464635
frame_id: ardrone_base_link
child_frame_id: ardrone_base_bottomcam
transform: 
translation: 
x: 0.0
y: -0.02
z: 0.0
rotation: 
x: 0.707106189653
y: 0.707107372717
z: -1.18306495402e-06
w: -1.18306297463e-06
---
transforms: 
- 
header: 
seq: 0
stamp: 
secs: 1445033096
nsecs: 388464675
frame_id: odom
child_frame_id: ardrone_base_link
transform: 
translation: 
x: 0.0
y: 0.0
z: 0.0
rotation: 
x: -0.000229246524165
  y: -0.0186881185008
        z: 0.978807714478
        w: 0.203926849022
---

Note the ~1.4x10^9 epoch time stamp roughly close to current time (This is a copy paste from notes I took when working with the AR.Drone a few days ago

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2015-10-26 11:17:39 -0600

atech1380 gravatar image

Question answered in this thread.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2015-10-19 13:10:07 -0600

Seen: 555 times

Last updated: Oct 26 '15