nobleo / rviz_satellite

Display internet satellite imagery in RViz
Apache License 2.0
530 stars 226 forks source link

Fix frame jitter by splitting map and fixed-frame transforms #72

Closed beetleskin closed 4 years ago

beetleskin commented 4 years ago

Fixes #56: The jitter exists if the frequency of the NavSatFix callback is lower than RViz' framerate and the transform update rate. This is usually the case, GPS often comes with only 1Hz, while RViz" fps are usually 30-60Hz, localization transforms have usually a high frequency (>50Hz). It origins from unsynchronized transforms: The scene node's pose is only updated on callback, but in-between callbacks, the robot might move. I.e.: the map-repaint lags behind. In order to synchronize this, we need to transform the scene-node on every render-frame with the latest information, as usual with RViz Display plugins rendering data that is attached to a tf-frame.

So we split the transform from the tile map to the fixed-frame into two transforms, created at two locations:

Along with this change, we:

TODO:

Test Plan

schra commented 4 years ago

I tested your PR finally. Here is what I did (I changed your test plan a little bit):

beetleskin commented 4 years ago

I tested your PR finally. Here is what I did (I changed your test plan a little bit):

* [x]  confirm that all the properties and their statuses are updated accordingly

  * I found that if you just put something like "sdf" in the object uri input, that there will be no error visible in the GUI. However, this is probably not from this PR and also a minor issue anyway

There is a specific error in the console. But feel free to open up a ticket :)

  * When clearing the topic input, the error will be "No map received yet" - maybe we should change that to "No NavSatFix message received yet"?

Lets do that in #79.

* [x]  confirm that there is no jitter left independent of the fixed frame set:
  > 1. set RViz' fixed frame to a robot-fixed frame
  > 2. set Rviz' camera target frame to map
  > 3. move the robot fast
  > 4. set a low update rate of the gps_fix topic (1Hz)
  > 5. set a high update rate of the robot's tf (100Hz)

* [x]  check error reporting
  > * missing tfs
  > * missing gps_fix

  * When you set an invalid ff, for example "asdfasdfsf", then the map will jump. (It will not jitter, but jump). The status shows that there is an error, but the map is still displayed. I think we should hide the map if the ff is invalid?

Its no regression, is it? If not, lets do it in #51

beetleskin commented 4 years ago

anything left to do?

beetleskin commented 4 years ago

\o/

would you do a release? major or minor?

schra commented 4 years ago

I'll do a release after we merged the two pending PRs #79 and #77 if that's ok with you. I think it should be a major release due to the "Remove NED and NWU frame conversion options" commit

beetleskin commented 4 years ago

ack