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 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, run colcon build in the root folder of your ROS workspace.
    Running colcon build --symlink-install will install symbolic links to your source files instead of copying them, which allows to see changes immediately to non-compiled files (.py or .launch) without the need to rebuild.
  • Source your workspace: source ~/ros/install/setup.bash.
  • Launch rviz2 and the euler binary: ros2 launch lecture euler.launch.xml.
  • Ensure that the fixed frame of rviz is set to world (instead of map which is the default usually).
  1. Inspect the commits (e.g. using github or qgit) 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.
  2. Augment the marker display with a frame (composed from three arrows).
  3. Modify the MainWindow class to update the orientation of frame1+2 (adding Euler angles) and frame1*2 (correctly composing orientations by quaternion multiplication). To this end, connect the valueChanged() signal of frame1 and frame2 widgets to a new slot method that computes the corresponding results and updates the other widget's orientation values.
  4. Analyze and describe when orientations of frame1+2 and frame1*2 are identical.
  5. Implement Quaternion slerp to perform interpolation between frame1 and frame2 (see quaternion slides of lectures). To this end, augment an additional RotationControl widget to the MainWindow class, to visualize the interpolation result. The interpolation should be performed continuously, e.g. using a QTimer.
  6. Augment MainWindow with another RotationControl instance to display the same orientation as frame1, but using a different set of Euler axes. Interlink the corresponding instances of RotationControl by their signal valueChanged and the slot setValue. Analyze how the Euler angles of two different sets of axes are related to each other.