Skip to main content
Version: 3.2.1

Movements

Functions with Okapi Units​

pid_odom_set()​

Sets the robot to go forward/backward the distance you give it, but it uses odometry, without slew.

p_target is in an okapi length unit.
speed is 0 to 127. It's recommended to keep this at 110.

void pid_odom_set(okapi::QLength p_target, int speed);

pid_odom_set()​

Sets the robot to go forward/backward the distance you give it, but it uses odometry.

p_target is in an okapi length unit.
speed is 0 to 127. It's recommended to keep this at 110.
slew_on increases the speed of the drive gradually. You must set slew constants for this to work!

void pid_odom_set(okapi::QLength p_target, int speed, bool slew_on);

pid_odom_set()​

Go to an xy coordinate without slew. This is a wrapper for pid_odom_ptp_set().

p_imovement united_pose, expecting {0_in, 0_in}

void pid_odom_set(united_odom p_imovement);

pid_odom_set()​

Go to an xy coordinate with slew. This is a wrapper for pid_odom_ptp_set().

p_imovement united_pose, expecting {0_in, 0_in} slew_on increases the speed of the drive gradually. You must set slew constants for this to work!

void pid_odom_set(united_odom p_imovement, bool slew_on);

pid_odom_set()​

Create and smooth out a path from the given points without slew. The path will switch to boomerang is angle is specified for that point. This is a wrapper for pid_odom_smooth_pp_set.

p_imovements vector of united_pose

void pid_odom_set(std::vector{united_odom} p_imovements);

pid_odom_set()​

Create and smooth out a path from the given points. The path will switch to boomerang is angle is specified for that point. This is a wrapper for pid_odom_smooth_pp_set.

p_imovements vector of united_pose slew_on increases the speed of the drive gradually. You must set slew constants for this to work!

void pid_odom_set(std::vector{united_odom} p_imovements, bool slew_on);

pid_odom_ptp_set()​

Go to an xy coordinate without slew.

p_imovement united_pose, expecting {0_in, 0_in}

void pid_odom_ptp_set(united_odom p_imovement);

pid_odom_ptp_set()​

Go to an xy coordinate with slew.

p_imovement united_pose, expecting {0_in, 0_in} slew_on increases the speed of the drive gradually. You must set slew constants for this to work!

void pid_odom_ptp_set(united_odom p_imovement, bool slew_on);

pid_odom_pp_set()​

Pure pursuits through all the points given.

p_imovements vector of united_pose

void pid_odom_pp_set(std::vector{united_odom} p_imovements);

pid_odom_pp_set()​

Pure pursuits through all the points given.

p_imovements vector of united_pose
slew_on increases the speed of the drive gradually. You must set slew constants for this to work!

void pid_odom_pp_set(std::vector{united_odom} p_imovements, bool slew_on);

pid_odom_injected_pp_set()​

Creates a new path that injects points between the input points, then pure pursuits along this new path.

p_imovements vector of united_pose

void pid_odom_injected_pp_set(std::vector{united_odom} p_imovements);

pid_odom_injected_pp_set()​

Creates a new path that injects points between the input points, then pure pursuits along this new path.

p_imovements vector of united_pose slew_on increases the speed of the drive gradually. You must set slew constants for this to work!

void pid_odom_injected_pp_set(std::vector{united_odom} p_imovements, bool slew_on);

pid_odom_smooth_pp_set()​

Creates a new path that injects points between the input points, then smooths the corners of this path, then pure pursuits along this new path.

p_imovements vector of united_pose

void pid_odom_smooth_pp_set(std::vector{united_odom} p_imovements);

pid_odom_smooth_pp_set()​

Creates a new path that injects points between the input points, then smooths the corners of this path, then pure pursuits along this new path.

p_imovements vector of united_pose slew_on increases the speed of the drive gradually. You must set slew constants for this to work!

void pid_odom_smooth_pp_set(std::vector{united_odom} p_imovements, bool slew_on);

pid_odom_boomerang_set()​

Goes to an xy coordinate at a set heading.

p_imovement united_pose, expecting {0_in, 0_in, 0_deg}

void pid_odom_boomerang_set(united_odom p_imovement);

pid_odom_boomerang_set()​

Goes to an xy coordinate at a set heading.

p_imovement united_pose, expecting {0_in, 0_in, 0_deg} slew_on increases the speed of the drive gradually. You must set slew constants for this to work!

void pid_odom_boomerang_set(united_odom p_imovement, bool slew_on);

pid_turn_set()​

Sets the robot to turn face a point using PID and odometry.

p_itarget {x, y} a target point to face. this uses okapi units dir face the point fwd or rev speed 0 to 127, max speed during motion

void pid_turn_set(united_pose p_itarget, drive_directions dir, int speed);

pid_turn_set()​

Sets the robot to turn face a point using PID and odometry.

p_itarget {x, y} a target point to face. this uses okapi units dir face the point fwd or rev speed 0 to 127, max speed during motion
slew_on ramp up from a lower speed to your target speed

void pid_turn_set(united_pose p_itarget, drive_directions dir, int speed, bool slew_on);

pid_turn_set()​

Sets the robot to turn face a point using PID and odometry.

p_itarget {x, y} a target point to face. this uses okapi units dir face the point fwd or rev speed 0 to 127, max speed during motion
behavior changes what direction the robot will turn. can be left, right, shortest, longest, raw

void pid_turn_set(united_pose p_itarget, drive_directions dir, int speed, e_angle_behavior behavior);

pid_turn_set()​

Sets the robot to turn face a point using PID and odometry.

p_itarget {x, y} a target point to face. this uses okapi units dir face the point fwd or rev speed 0 to 127, max speed during motion
behavior changes what direction the robot will turn. can be left, right, shortest, longest, raw
slew_on ramp up from a lower speed to your target speed

void pid_turn_set(united_pose p_itarget, drive_directions dir, int speed, e_angle_behavior behavior, bool slew_on);

pid_wait_until_point()​

Lock the code in a while loop until this point has been passed.

target {x, y} pose with units for the robot to pass through before the while loop is released

void pid_wait_until_point(united_pose target);

pid_wait_until()​

Lock the code in a while loop until this point has been passed.

target {x, y} pose with units for the robot to pass through before the while loop is released

void pid_wait_until(united_pose target);

Functions Without Okapi Units​

pid_odom_set()​

Sets the robot to go forward/backward the distance you give it, but it uses odometry, without slew.

target double, expecting inches speed is 0 to 127. It's recommended to keep this at 110.

void pid_odom_set(double target, int speed);

pid_odom_set()​

Sets the robot to go forward/backward the distance you give it, but it uses odometry.

target double, expecting inches speed is 0 to 127. It's recommended to keep this at 110.
slew_on increases the speed of the drive gradually. You must set slew constants for this to work!

void pid_odom_set(double target, int speed, bool slew_on);

pid_odom_set()​

Go to an xy coordinate without slew. This is a wrapper for pid_odom_ptp_set().

imovement pose, expecting {0, 0}

void pid_odom_set(odom imovement);

pid_odom_set()​

Go to an xy coordinate with slew. This is a wrapper for pid_odom_ptp_set().

imovement pose, expecting {0, 0} slew_on increases the speed of the drive gradually. You must set slew constants for this to work!

void pid_odom_set(odom imovement, bool slew_on);

pid_odom_set()​

Create and smooth out a path from the given points without slew. The path will switch to boomerang is angle is specified for that point. This is a wrapper for pid_odom_smooth_pp_set.

imovements vector of united_pose

void pid_odom_set(std::vector{odom} imovements)

pid_odom_set()​

Create and smooth out a path from the given points. The path will switch to boomerang is angle is specified for that point. This is a wrapper for pid_odom_smooth_pp_set.

imovements vector of pose slew_on increases the speed of the drive gradually. You must set slew constants for this to work!

void pid_odom_set(std::vector{odom} imovements, bool slew_on);

pid_odom_ptp_set()​

Go to an xy coordinate without slew.

imovement pose, expecting {0, 0}

void pid_odom_ptp_set(odom imovement);

pid_odom_ptp_set()​

Go to an xy coordinate with slew.

imovement united_pose, expecting {0_in, 0_in} slew_on increases the speed of the drive gradually. You must set slew constants for this to work!

void pid_odom_ptp_set(odom imovement, bool slew_on);

pid_odom_pp_set()​

Pure pursuits through all the points given.

imovements vector of pose

void pid_odom_pp_set(std::vector{odom} imovements);

pid_odom_pp_set()​

Pure pursuits through all the points given with slew.

imovements vector of united_pose
slew_on increases the speed of the drive gradually. You must set slew constants for this to work!

void pid_odom_pp_set(std::vector{odom} imovements, bool slew_on);

pid_odom_injected_pp_set()​

Creates a new path that injects points between the input points, then pure pursuits along this new path.

imovements vector of pose

void pid_odom_injected_pp_set(std::vector{odom} imovements);

pid_odom_injected_pp_set()​

Creates a new path that injects points between the input points, then pure pursuits along this new path.

imovements vector of pose slew_on increases the speed of the drive gradually. You must set slew constants for this to work!

void pid_odom_injected_pp_set(std::vector{odom} imovements, bool slew_on);

pid_odom_smooth_pp_set()​

Creates a new path that injects points between the input points, then smooths the corners of this path, then pure pursuits along this new path.

imovements vector of pose

void pid_odom_smooth_pp_set(std::vector{odom} imovements);

pid_odom_smooth_pp_set()​

Creates a new path that injects points between the input points, then smooths the corners of this path, then pure pursuits along this new path.

imovements vector of pose slew_on increases the speed of the drive gradually. You must set slew constants for this to work!

void pid_odom_smooth_pp_set(std::vector{odom} imovements, bool slew_on);

pid_odom_boomerang_set()​

Goes to an xy coordinate at a set heading.

imovement united_pose, expecting {0, 0, 0}

void pid_odom_boomerang_set(odom imovement);

pid_odom_boomerang_set()​

Goes to an xy coordinate at a set heading.

imovement united_pose, expecting {0, 0, 0} slew_on increases the speed of the drive gradually. You must set slew constants for this to work!

void pid_odom_boomerang_set(odom imovement, bool slew_on);

pid_turn_set()​

Sets the robot to turn face a point using PID and odometry.

p_itarget {x, y} a target point to face dir face the point fwd or rev speed 0 to 127, max speed during motion

void pid_turn_set(pose itarget, drive_directions dir, int speed);

pid_turn_set()​

Sets the robot to turn face a point using PID and odometry.

p_itarget {x, y} a target point to face dir face the point fwd or rev speed 0 to 127, max speed during motion
slew_on ramp up from a lower speed to your target speed

void pid_turn_set(pose p_itarget, drive_directions dir, int speed, bool slew_on);

pid_turn_set()​

Sets the robot to turn face a point using PID and odometry.

p_itarget {x, y} a target point to face dir face the point fwd or rev speed 0 to 127, max speed during motion
behavior changes what direction the robot will turn. can be left, right, shortest, longest, raw

void pid_turn_set(pose p_itarget, drive_directions dir, int speed, e_angle_behavior behavior);

pid_turn_set()​

Sets the robot to turn face a point using PID and odometry.

p_itarget {x, y} a target point to face dir face the point fwd or rev speed 0 to 127, max speed during motion
behavior changes what direction the robot will turn. can be left, right, shortest, longest, raw
slew_on ramp up from a lower speed to your target speed

void pid_turn_set(pose p_itarget, drive_directions dir, int speed, e_angle_behavior behavior, bool slew_on);

pid_wait_until_index()​

Lock the code in a while loop until this point has been passed.

index index of your input points, 0 is the first point in the index

void pid_wait_until_index(int index);

pid_wait_until_index_started()​

Lock the code in a while loop until this point becomes the target.

index index of your input points, 0 is the first point in the index

void pid_wait_until_index_started(int index);

pid_wait_until_point()​

Lock the code in a while loop until this point has been passed.

target {x, y} pose for the robot to pass through before the while loop is released

void pid_wait_until_point(pose target);

pid_wait_until()​

Lock the code in a while loop until this point has been passed.

target {x, y} pose for the robot to pass through before the while loop is released

void pid_wait_until(pose target);