Skip to content
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, run catkin 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 the euler binary: roslaunch lecture euler.launch.
  • 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 or QThread.
  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 are connected to each other.
Clone this wiki locally