tesseract_robotics.tesseract_motion_planners_simple¶
Simple joint-space interpolation planner.
Overview¶
The Simple planner performs linear interpolation in joint space. No collision checking - use only when path is known to be safe.
from tesseract_robotics.tesseract_motion_planners_simple import (
SimpleMotionPlanner,
generateInterpolatedProgram,
)
SimpleMotionPlanner¶
from tesseract_robotics.tesseract_motion_planners_simple import SimpleMotionPlanner
from tesseract_robotics.tesseract_motion_planners import PlannerRequest
planner = SimpleMotionPlanner()
request = PlannerRequest()
request.env = env
request.instructions = program
request.profiles = profiles
response = planner.solve(request)
Utility Functions¶
generateInterpolatedProgram¶
Interpolate a program to add intermediate waypoints.
from tesseract_robotics.tesseract_motion_planners_simple import generateInterpolatedProgram
# Add waypoints between existing ones
interpolated = generateInterpolatedProgram(
program,
env,
profiles,
max_step=0.1 # max joint step between waypoints
)
Interpolation¶
The planner's interpolation functions need no planner state:
import numpy as np
from tesseract_robotics.tesseract_common import Isometry3d
from tesseract_robotics.tesseract_motion_planners_simple import interpolate
poses = interpolate(Isometry3d.Identity(), target_pose, 10) # VectorIsometry3d, 11 poses
states = interpolate(np.zeros(6), q_goal, 10) # 6 x 11 array, one state per column
interpolate_waypoint(start, stop, steps) does the same for two WaypointPolys.
getInterpolatedInstructions(joint_names, states, base_instruction) (and the overload that
also takes poses) turns the columns after the first into child move instructions of
base_instruction, ending with base_instruction itself.
Profiles¶
The seven move profiles (SimplePlannerFixedSize*MoveProfile, SimplePlannerLVS*MoveProfile)
compare by value (==) and are unhashable. All of them register under the key of their
base, SimplePlannerMoveProfile.createKey().
generate runs a profile on one segment without a planner: it returns the move
instructions SimpleMotionPlanner.solve would emit for base_instruction.
from tesseract_robotics.tesseract_command_language import InstructionPoly
from tesseract_robotics.tesseract_motion_planners_simple import SimplePlannerLVSMoveProfile
profile = SimplePlannerLVSMoveProfile()
moves = profile.generate(start, start, goal, InstructionPoly(), env, manip_info)
from_yaml builds a profile from the same YAML keys the C++ profile reads:
Malformed YAML raises ValueError; a value of the wrong type raises the profile's
RuntimeError.
Use Cases¶
- Initial seeding: Generate dense trajectory for TrajOpt
- Safe paths: When you know the path is collision-free
- Testing: Quick trajectory generation for debugging
- Time parameterization input: Dense trajectory for velocity planning
Example¶
from tesseract_robotics.tesseract_motion_planners_simple import SimpleMotionPlanner
from tesseract_robotics.tesseract_motion_planners import PlannerRequest
from tesseract_robotics.tesseract_command_language import ProfileDictionary
# Simple planner needs minimal setup
profiles = ProfileDictionary()
request = PlannerRequest()
request.env = env
request.instructions = program
request.profiles = profiles
planner = SimpleMotionPlanner()
response = planner.solve(request)
if response.successful:
# Result is linearly interpolated joint trajectory
trajectory = response.results
Limitations¶
- No collision checking: Path may collide with obstacles
- Joint-space only: Cartesian interpolation not supported
- No optimization: Just linear interpolation
Tips¶
- Use as preprocessing for optimization-based planners
- Verify collision after planning with simple planner
- Good for short motions where collision is unlikely
Auto-generated API Reference¶
tesseract_motion_planners_simple Python bindings
SimplePlannerEmptyGenerateError
¶
Bases: ValueError
A Python SimplePlannerMoveProfile.generate returned an empty list.
SimplePlannerNullInstructionError
¶
Bases: ValueError
A Python SimplePlannerMoveProfile.generate returned a null MoveInstructionPoly.
SimplePlannerGenerateMismatchError
¶
Bases: ValueError
A Python generate's last instruction differs from base_instruction in a field upstream requires unchanged.
SimplePlannerProfileReturnTypeError
¶
Bases: TypeError
A Python SimplePlannerMoveProfile.generate returned the wrong type.
SimplePlannerPureVirtualCallError
¶
Bases: NotImplementedError
generate is pure virtual: super().generate(...), or a Python profile without it.
SimpleMotionPlanner
¶
Bases: MotionPlanner
JointGroupInstructionInfo
¶
A move instruction resolved against a joint group (no inverse kinematics)
instruction
property
¶
The move instruction this info describes (not a copy)
__init__
¶
__init__(plan_instruction: MoveInstructionPoly, env: Environment, manip_info: ManipulatorInfo) -> None
calcCartesianPose
¶
calcCartesianPose(jp: Annotated[NDArray[float64], dict(shape=(None,), order=C)] | Sequence[float], in_world: bool = True) -> tesseract_robotics.tesseract_common._tesseract_common.Isometry3d
The tool pose at joint state jp, in world or in the working frame.
extractCartesianPose
¶
extractCartesianPose(in_world: bool = True) -> tesseract_robotics.tesseract_common._tesseract_common.Isometry3d
The Cartesian waypoint's pose, in world or in the working frame.
extractJointPosition
¶
The joint or state waypoint's position.
KinematicGroupInstructionInfo
¶
A move instruction resolved against a kinematic group (with inverse kinematics)
instruction
property
¶
The move instruction this info describes (not a copy)
__init__
¶
__init__(plan_instruction: MoveInstructionPoly, env: Environment, manip_info: ManipulatorInfo) -> None
calcCartesianPose
¶
calcCartesianPose(jp: Annotated[NDArray[float64], dict(shape=(None,), order=C)] | Sequence[float], in_world: bool = True) -> tesseract_robotics.tesseract_common._tesseract_common.Isometry3d
The tool pose at joint state jp, in world or in the working frame.
extractCartesianPose
¶
extractCartesianPose(in_world: bool = True) -> tesseract_robotics.tesseract_common._tesseract_common.Isometry3d
The Cartesian waypoint's pose, in world or in the working frame.
extractJointPosition
¶
The joint or state waypoint's position.
SimplePlannerMoveProfile
¶
Bases: Profile
createKey
staticmethod
¶
The key every simple-planner move profile registers under.
generate
¶
generate(prev_instruction: MoveInstructionPoly, prev_seed: MoveInstructionPoly, base_instruction: MoveInstructionPoly, next_instruction: InstructionPoly, env: Environment, global_manip_info: ManipulatorInfo) -> list[tesseract_robotics.tesseract_command_language._tesseract_command_language.MoveInstructionPoly]
The move instructions the simple planner emits for base_instruction, ending with it. next_instruction is a null InstructionPoly for the last move.
SimplePlannerCompositeProfile
¶
SimplePlannerFixedSizeMoveProfile
¶
Bases: SimplePlannerMoveProfile
from_yaml
staticmethod
¶
Construct the profile from its YAML config text; malformed YAML raises ValueError.
SimplePlannerFixedSizeAssignMoveProfile
¶
Bases: SimplePlannerMoveProfile
from_yaml
staticmethod
¶
Construct the profile from its YAML config text; malformed YAML raises ValueError.
SimplePlannerFixedSizeAssignNoIKMoveProfile
¶
Bases: SimplePlannerMoveProfile
from_yaml
staticmethod
¶
Construct the profile from its YAML config text; malformed YAML raises ValueError.
SimplePlannerLVSMoveProfile
¶
Bases: SimplePlannerMoveProfile
state_longest_valid_segment_length
property
writable
¶
translation_longest_valid_segment_length
property
writable
¶
rotation_longest_valid_segment_length
property
writable
¶
__init__
¶
__init__(state_longest_valid_segment_length: float = 0.08726646259971647, translation_longest_valid_segment_length: float = 0.1, rotation_longest_valid_segment_length: float = 0.08726646259971647, min_steps: int = 1, max_steps: int = 2147483647) -> None
from_yaml
staticmethod
¶
Construct the profile from its YAML config text; malformed YAML raises ValueError.
SimplePlannerLVSNoIKMoveProfile
¶
Bases: SimplePlannerMoveProfile
state_longest_valid_segment_length
property
writable
¶
translation_longest_valid_segment_length
property
writable
¶
rotation_longest_valid_segment_length
property
writable
¶
__init__
¶
__init__(state_longest_valid_segment_length: float = 0.08726646259971647, translation_longest_valid_segment_length: float = 0.1, rotation_longest_valid_segment_length: float = 0.08726646259971647, min_steps: int = 1, max_steps: int = 2147483647) -> None
from_yaml
staticmethod
¶
Construct the profile from its YAML config text; malformed YAML raises ValueError.
SimplePlannerLVSAssignMoveProfile
¶
Bases: SimplePlannerMoveProfile
state_longest_valid_segment_length
property
writable
¶
translation_longest_valid_segment_length
property
writable
¶
rotation_longest_valid_segment_length
property
writable
¶
__init__
¶
__init__(state_longest_valid_segment_length: float = 0.08726646259971647, translation_longest_valid_segment_length: float = 0.1, rotation_longest_valid_segment_length: float = 0.08726646259971647, min_steps: int = 1, max_steps: int = 2147483647) -> None
from_yaml
staticmethod
¶
Construct the profile from its YAML config text; malformed YAML raises ValueError.
SimplePlannerLVSAssignNoIKMoveProfile
¶
Bases: SimplePlannerMoveProfile
state_longest_valid_segment_length
property
writable
¶
translation_longest_valid_segment_length
property
writable
¶
rotation_longest_valid_segment_length
property
writable
¶
__init__
¶
__init__(state_longest_valid_segment_length: float = 0.08726646259971647, translation_longest_valid_segment_length: float = 0.1, rotation_longest_valid_segment_length: float = 0.08726646259971647, min_steps: int = 1, max_steps: int = 2147483647) -> None
from_yaml
staticmethod
¶
Construct the profile from its YAML config text; malformed YAML raises ValueError.
generateInterpolatedProgram
¶
generateInterpolatedProgram(instructions: CompositeInstruction, env: Environment, state_longest_valid_segment_length: float = 0.08726646259971647, translation_longest_valid_segment_length: float = 0.15, rotation_longest_valid_segment_length: float = 0.08726646259971647, min_steps: int = 1) -> tesseract_robotics.tesseract_command_language._tesseract_command_language.CompositeInstruction
Generate an interpolated program from a composite instruction
interpolate_waypoint
¶
interpolate_waypoint(start: WaypointPoly, stop: WaypointPoly, steps: int) -> list[tesseract_robotics.tesseract_command_language._tesseract_command_language.WaypointPoly]
Waypoints from start to stop: steps + 1 of them, of the start's type.