-
Notifications
You must be signed in to change notification settings - Fork 77
Open
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed
Description
I am using the gz-gui camera tracking plugin to adapt the simulation viewpoint throughout the simulation.
I noticed that motion is sometimes 'shaky' due to the rotation interpolation, e.g. :
$ gz service -s /gui/move_to/pose --reqtype gz.msgs.GUICamera --reptype gz.msgs.Boolean --timeout 500 --req 'pose: {position:{x: 27.2, y:-1.7215,z:2.2255}, orientation:{x:-0.1466788, y:0.0344671, z:0.9623708, w:0.2261413}}'
$ gz service -s /gui/move_to/pose --reqtype gz.msgs.GUICamera --reptype gz.msgs.Boolean --timeout 500 --req 'pose: {position:{x:24.081968307495117,y:1.0910710096359253,z:1.194319486618042},orientation:{x:0.10836052149534225,y:-0.0045970650389790535,z:-0.99320769309997559,w:-0.042135711759328842}}'
squad.mp4
Changing this single line:
Line 95 in 6460f7c
return Quaterniond::Squad(_t, p, a, b, q, _useShortestPath); |
to use Slerp
instead of Squad
solves the issue:
return Quaterniond::Slerp(_t, p, q, _useShortestPath);
slerp.mp4
Is it an option to change this to slerp instead of squad?
Why was squad chosen (I don't find references through 'git blame', seems it was squad from the first commit?)
It seems this is a good reference wrt rotation interpolation:
https://splines.readthedocs.io/en/latest/rotation/index.html
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed
Type
Projects
Status
To do