-
Notifications
You must be signed in to change notification settings - Fork 11
Euler Viewer
Robert Haschke edited this page Nov 28, 2023
·
12 revisions
The application euler
allows to inspect Euler angles and quaternions of rotations.
It displays a simple interactive marker in rviz (on topic: /euler/updates
).
- Download and compile the
lecture
repository as explained here.
Note that C++ is a compiled language. For changes to take any effect, you need to recompile the source code! To this end, runcatkin build
in any of your ROS workspace folders. (You don't need to source setup.bash again.) - Source your
devel space
:source ~/ros/devel/setup.bash
. - Launch
rviz
and theeuler
binary:roslaunch lecture euler.launch
. - Ensure that the
fixed frame
ofrviz
is set toworld
(instead ofmap
which is the default usually).
- Inspect the commits (e.g. using
github
orqgit
) to learn about creating interactive rviz markers and interconnecting them to the app. There is also a tutorial on interactive markers.
For a basic introduction to C++ consider one of the many tutorials on the web, for example this one. - Augment the marker display with a frame (composed from three arrows).
- Modify the
MainWindow
class to update the orientation offrame1+2
(adding Euler angles) andframe1*2
(correctly composing orientations by quaternion multiplication). To this end,connect
thevalueChanged()
signal offrame1
andframe2
widgets to a newslot
method that computes the corresponding results and updates the other widget's orientation values. - Analyze and describe when orientations of
frame1+2
andframe1*2
are identical. - Implement Quaternion slerp to perform interpolation between
frame1
andframe2
(see quaternion slides of lectures). To this end, augment an additionalRotationControl
widget to theMainWindow
class, to visualize the interpolation result. The interpolation should be performed continuously, e.g. using a QTimer or QThread. - Augment
MainWindow
with anotherRotationControl
instance to display the same orientation asframe1
, but using a different set of Euler axes. Interlink the corresponding instances ofRotationControl
by their signalvalueChanged
and the slotsetValue
. Analyze how the Euler angles are connected to each other.