Note: This tutorial assumes that you have completed the previous tutorials: Control Modes, GUI Control.
(!) Please ask about problems and questions regarding this tutorial on Don't forget to include in your question the link to this page, the versions of your OS & ROS, and also add appropriate tags.

Waypoint Control

Description: Control the qbmove motion through an automatic waypoint trajectory loop

Keywords: qbrobotics qbmove control

Tutorial Level: INTERMEDIATE

Next Tutorial: API Control

This control mode is a bit more structured and useful than the previous: it allows to set a fixed trajectory of any number of position waypoints (with timing constraints) and set the robot to cycle infinitely on it (because of the loop it is recommended to set the first and last waypoint in a similar configuration to avoid unwanted sudden changes).

To start this mode just add use_waypoints:=true to the general roslaunch command (be sure that the opposite use_controller_gui is not used). You won't see any control interface in this case but the qbmove should start moving according to the given trajectory, parsed from a yaml file located at ` <robot_package>_control/config/<robot_name>_waypoints.yaml ` where robot_name and robot_package are two additional launch file arguments.


You can modify the waypoint trajectory to replicate the behavior you want: either change the <robot_package>_control/config/<robot_name>_waypoints.yaml or add another custom application-specific file in the config directory. In the second case you need to set the argument robot_name properly when launching the command from the terminal.

The waypoint configuration is as follows:

# Waypoints describe the desired motion trajectory:
#  - time [s]: can be either a single value or an interval for which joint_positions hold
#  - joint_positions:
#     - shaft position [radians] and stiffness preset [0,1];
#  - joint_velocities: optional, use it only if you want a nonzero values
#     - shaft position [radians/s] and stiffness preset [0,1]/s;
#  - joint_accelerations: optional, use it only if you want a nonzero values
#     - shaft position [radians/s^2] and stiffness preset [0,1]/s^2;
# It is worth noting that, if specified, joint_positions, joint_velocities and joint_accelerations must be of size two.

    time: [1.0]
      <device_name>: [0.0, 0.0]
    time: [2.75, 3.25]
      <device_name>: [1.57, 0.0]
    time: [4.0]
      <device_name>: [-0.5, 0.0]
      <device_name>: [-0.5, 0.0]

Wiki: qb_move_control/Tutorials/Waypoint Control (last edited 2018-06-04 11:08:43 by AlessandroTondo)