Skip to content

Kinesthetic Teaching GUI

Vivian Chu edited this page Jun 9, 2017 · 11 revisions

Prerequisites

  • Ubuntu 14.04 Trusty Tahr
  • ROS Indigo with additional packages installed
  • sudo apt install ros-indigo-moveit-python ros-indigo-moveit-commander
  • hlpr_kinesthetic_teaching cloned to your workspace's src/ directory
  • Run catkin_make in your workspace root and then source devel/setup.bash (if using the default Bash shell)

Kinesthetic Teaching GUI

Launching the Kinesthetic Teaching GUI

  • With a roscore started, run rosrun rqt_kinesthetic_teaching rqt_kinesthetic_teaching
    • If the GUI fails to start, you may have to run rqt --force-discover

Parsing, loading, and inspecting .bag files and folders will now be functional.

Starting additional services

To playback or record keyframes, two action servers must be started. Run the following in new terminals:

  • Playback demonstration action server: roslaunch hlpr_record_demonstration start_playback_services.launch
  • Record demonstration action server: roslaunch hlpr_record_demonstration start_record_services.launch
  • Note: You can also startup all services related to playback and recording by looking at the hlpr_bringup wiki, which has a custom launch file with two flags: kinesthetic_record and kinesthetic_playback. Set these both to true.

Parsing, loading, and inspecting .bag files

To parse and load a single .bag file containing a demonstration, click the open button or enter the path to the file in the text field and press enter. The .bag file will then be parsed and the keyframe data contained displayed in a tree format at the bottom.

The tree format is as follows:

  • Keyframe number (0-indexed) and ISO 8061 timestamp
  • Robot topic recorded
  • Recorded message fields and their corresponding values

When opening a folder, all .bag files that are direct children will be parsed and loaded. The previously mentioned tree format will be preceeded by the file's full path.

Playing back demonstrations

Currently, due to limitations with the playback demonstration action server, only full .bag files can be played from start to finish. Individual keyframes or selected keyframes can not be played.

With a .bag file open and the playback demonstration action server started, keyframe playback can be started by clicking the "Play demo" button at the bottom of the window.

With a folder of .bag files open and the playback demonstration action server started, keyframe playback can be started by selecting a file path name in the tree view and clicking the "Play demo" button at the bottom of the window.

Keyframe recording and saving

Keyframe recording is enabled by clicking the "Save" button at the top of the window. Optionally, a timestamp can be added to the save file's name by checking the "Add timestamp to new saves" box. The output window will be cleared.

To begin adding keyframes, move the robot to its startig position and click the "Start trajectory" or "Start keyframe" record buttons. The status area at the bottom right will display "Keyframe recording started" and the secondary status above the output window will display "1 keyframe(s) recorded" as the starting position has been recorded as a keyframe.

New keyframes will display in the output window in a similar format to when saved files are opened. However, recorded topics and message values cannot (yet) be viewed while a recording is in progress.

The robot's arm can now be moved. It's position will be continually recorded if a trajectory was started. Otherwise, new keyframes can be added by clicking the "Add keyframe" button.

To end the recording, move the robot to its final position and click the "End" button. A keyframe for the final position will be recorded and the .bag file will be written, closed, and then automatically parsed for immediate inspection and playback.