3d panel has precision issues when robot is very far from root transform
See original GitHub issueDescription The 3d panel gets hilariously messed up if the robot is very far (> 1000 km) from the root transform, likely due to floating point math.
- Version: v0.16
- OS: Linux
Steps To Reproduce
Example bag: bug.bag.zip Created using this script.
In this bag, base_link
is 5000 km from map
. The marker moves away from base_link
at 1m/s.
Marker renders pretty well when base_link
is under 100km from map
, but starts getting super crazy above 5000 km, and is unviewable above 10,000km.
Expected Behavior Nice buttery-smooth animation of the marker moving across the screen.
Actual Behavior
The marker animation is messed up, and even moving the camera around results in strange animation:
https://user-images.githubusercontent.com/637671/131586680-b889ff1b-7035-4f17-ad80-7b3533850dd9.mp4
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (5 by maintainers)
Top GitHub Comments
Also noting that the best workaround for now is simply to use a “site” frame, and delete any transforms to a “map” or “world” frame from your bag. Foxglove currently always uses the topmost (root) transform in the bag for calculations.
This is fixed in https://github.com/foxglove/studio/pull/2319
https://user-images.githubusercontent.com/195374/145276757-fde87ae6-fc10-4cc5-8930-11ec4645d3c4.mov