Ask Your Question
0

/tf sends messages at different timestamp

asked 2019-03-05 03:17:34 -0500

murdock gravatar image

updated 2019-03-05 05:48:29 -0500

I have a /tf message that seems to send messages at different timestamps. I added comments "// Look here" to highlight the stamps in secs and Im mostly intrigued by the one with the comment "// Look here !!" as the time stamp in secs has absolutely different timestamp. However, the next after that one follows the the pattern as the majority.

image description

Why does this happen?

--
transforms: 
- 
header: 
  seq: 0
  stamp: 
    secs: 1305031234        // Look here
    nsecs: 763107844
  frame_id: /kinect
child_frame_id: /openni_camera
transform: 
  translation: 
    x: -0.0112272525515
    y: 0.0502554918469
    z: -0.0574041954071
  rotation: 
    x: 0.129908557896
    y: -0.141388223098
    z: 0.681948549539
    w: 0.705747343414
- 
header: 
  seq: 0
  stamp: 
    secs: 1305031234           // Look here
    nsecs: 763107844
  frame_id: /world
child_frame_id: /kinect
transform: 
  translation: 
    x: 1.28183615112
    y: 0.60716934967
    z: 1.60902340698
  rotation: 
    x: -0.226407331155
    y: -0.209261051914
    z: 0.662704621347
    w: 0.682474993971
 ---
 transforms: 
- 
  header: 
    seq: 0
    stamp: 
    secs: 1551776935     // Look here   !!!
    nsecs: 528851222
  frame_id: world
  child_frame_id: camera_pose
transform: 
  translation: 
    x: 0.0543486074629
    y: -0.0490532501685
    z: -0.083467717153
  rotation: 
    x: 0.0249910632545
    y: -0.369232593093
    z: 0.0535471565154
    w: 0.927456436165
---
transforms: 
- 
header: 
  seq: 0
  stamp: 
    secs: 1305031234                 // Look here
    nsecs: 773104542
  frame_id: /kinect
child_frame_id: /openni_camera
transform: 
  translation: 
    x: -0.0112272525515
    y: 0.0502554918469
    z: -0.0574041954071
  rotation: 
    x: 0.129908557896
    y: -0.141388223098
    z: 0.681948549539
    w: 0.705747343414
edit retag flag offensive close merge delete

Comments

Can you post your tree?

EdwardNur gravatar imageEdwardNur ( 2019-03-05 03:34:13 -0500 )edit

It's likely there are either multiple hosts involved that don't have their clocks synchronised, or a bag is being played together with live nodes.

gvdhoorn gravatar imagegvdhoorn ( 2019-03-05 03:45:02 -0500 )edit

@gvdhoorn, what do you mean by live nodes? @EdwardNur, updated my question with the tree,

murdock gravatar imagemurdock ( 2019-03-05 05:47:05 -0500 )edit

"live nodes" as in: nodes that publish messages that are not part of the bag. That is of course ok, but then use_sim_time should probably be used. If the bag contains messages "from the past" (as they probably all do), then not setting use_sim_time will cause "real time" to be mixed with old ..

gvdhoorn gravatar imagegvdhoorn ( 2019-03-05 05:50:00 -0500 )edit

.. stamps, which can lead to issues such as the one you show here.

Whether that is the case here depends of course on you: only you know how you configured your system.

gvdhoorn gravatar imagegvdhoorn ( 2019-03-05 05:50:38 -0500 )edit

According to the screenshot of your TF tree, it would appear that you have rosbag play running and camera_pose is being broadcast by the /Mono node.

Are you specifying --clock? /Mono seems to be using Wallclock, not the clock from the bag.

gvdhoorn gravatar imagegvdhoorn ( 2019-03-05 05:51:34 -0500 )edit

Nope, not using clock. Will check it out.

murdock gravatar imagemurdock ( 2019-03-05 08:10:39 -0500 )edit

@gvdhoorn, setting up --clock didnt work. I get the same issue.

murdock gravatar imagemurdock ( 2019-03-14 07:37:52 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-03-14 08:12:02 -0500

murdock gravatar image

I looked up this answer. Just by setting the use_sim_time alone didnt work in the beginning.

I completely stopped the roscore, then set the sim_time param and then let all of my stuff run and it seemed to work.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2019-03-05 03:17:34 -0500

Seen: 73 times

Last updated: Mar 14