Motion Planning

class Trajectory
id: str

Field for identifying trajectories (for the user).

motion: str

Name of the motion this trajectory was planned for.

duration: float

The trajectory duration in [s].

times: List[float]

The exact time stamps for the position, velocity, and acceleration values. The times will usually be sampled at the delta_time distance of the Planner class, but might deviate at the final step.

positions: List[Config]

The joint positions along the trajectory.

velocities: List[Config]

The joint velocities along the trajectory.

accelerations: List[Config]

The joint accelerations along the trajectory.

reverse() Trajectory

Reverse the trajectory’s start and goal.

append(other: Trajectory)

Appends another trajectory to the current one.

slice(start: int, steps: int) Trajectory

Get a slice of the trajectory starting from step start for a length of steps.

filter_path(max_distance: Config) List[Config]

Filter a path of sparse waypoints from the trajectory.

The path has a maximum distance per degree of freedom between the linear interpolation of the sparse waypoints and the original trajectory.

static from_json_file(file: Path) Trajectory

Loads a trajectory from a *.json file.

to_json_file(file: Path)

Saves a trajectory to a *.json file.

__len__() int

The number of time steps within the trajectory.

as_table() str

To pretty print the trajectory as a table of positions.

class Planner
delta_time: float

The time step for sampling the trajectories from the planner in [s]. Usually, this should correspond to the control rate of the robot.

last_calculation_duration: float

The duration of the last motion planning calculation in [ms].

__init__(environment: Environment, delta_time: float)

Constructs a planner for the given environment.

__init__(robot: Robot, delta_time: float)

Constructs a planner for the given robot and an empty environment.

__init__(project: str, delta_time: float)

Cloud version: Constructs a planner with the environment defined in the given Jacobi Studio project.

static load_from_studio(str: name) Planner

Loads a planner from the Studio project with the given name. It will download and update the project automatically. Requires the JACOBI_API_KEY environment variable to be set.

static load_from_project_file(file: Path) Planner

Loads a planner from a *.jacobi-project file.

add_motion(motion: Motion | LinearMotion | LowLevelMotion)
load_motion_plan(file: Path)

On-prem version: Loads a motion plan from the *.jacobi-plan file.

plan(start: ExactPoint, goal: ExactPoint) Trajectory | None

Plans a time-optimized, collision-free, and jerk-limited motion from start to goal.

plan(motion_name: str, start: ExactPoint = None, goal: ExactPoint = None) Trajectory | None

Plans a time-optimized, collision-free, and jerk-limited motion given the motion name. In case the motion was specified by a start or goal region, the respective exact start or goal positions needs to be passed.

plan(motion: Motion) Trajectory | None

Plans a collision-free point-to-point motion.

plan(motion: LinearMotion) Trajectory | None

Plans a linear motion.

plan(motion: LowLevelMotion) Trajectory | None

Plans a low-level motion.