Euler Viewer - rhaschke/lecture GitHub Wiki
The application euler allows to inspect Euler angles and quaternions of rotations.
It displays a simple interactive marker in rviz (on namespace: /euler).
- Download and compile the
lecturerepository 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, runcolcon buildin the root folder of your ROS workspace.
Runningcolcon build --symlink-installwill install symbolic links to your source files instead of copying them, which allows to see changes immediately to non-compiled files (.pyor.launch) without the need to rebuild. - Source your workspace:
source ~/ros/install/setup.bash. - Launch
rviz2and theeulerbinary:ros2 launch lecture euler.launch.xml. - Ensure that the
fixed frameofrvizis set toworld(instead ofmapwhich is the default usually).
- Inspect the commits (e.g. using
githuborqgit) 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
MainWindowclass to update the orientation offrame1+2(adding Euler angles) andframe1*2(correctly composing orientations by quaternion multiplication). To this end,connectthevalueChanged()signal offrame1andframe2widgets to a newslotmethod that computes the corresponding results and updates the other widget's orientation values. - Analyze and describe when orientations of
frame1+2andframe1*2are identical. - Implement Quaternion slerp to perform interpolation between
frame1andframe2(see quaternion slides of lectures). To this end, augment an additionalRotationControlwidget to theMainWindowclass, to visualize the interpolation result. The interpolation should be performed continuously, e.g. using a QTimer. - Augment
MainWindowwith anotherRotationControlinstance to display the same orientation asframe1, but using a different set of Euler axes. Interlink the corresponding instances ofRotationControlby their signalvalueChangedand the slotsetValue. Analyze how the Euler angles of two different sets of axes are related to each other.