Skip to main content

Crate repose_motion_planning

Crate repose_motion_planning 

Source
Expand description

Planner-agnostic joint-space motion planning for copper-rs.

Every planner — sampling-based (RRT*, PRM, …), optimization-based (CHOMP/TrajOpt style), search-based, or direct — implements one trait, CuJointPlanner, and runs inside one Copper task, CuJointPlannerTask. The task owns the anytime base/refine contract, publishing, seeding, and replay state, so a planner only has to answer: build itself from validated parameters (CuJointPlanner::new), start a job (CuJointPlanner::begin), do a bounded quantum of work (CuJointPlanner::step), and write its best path in place (CuJointPlanner::write_best).

Requests and results are planner-neutral payloads: CuJointPlanRequest carries the planning scene, exclusions, start and goal; CuJointPlanPath carries the path, its cost, the scene revision it was planned against, and an explicit CuPlanStatus — failures such as an invalid start or an exhausted search are published, not silently dropped.

Built-in planners, each with a Cu<Planner>Params struct and a task alias:

Every planner task has the same node config, CuJointPlannerParams; switching planners means changing the task type and the params block:

(
    id: "planner",
    type: "repose_motion_planning::CuJointPrmTask<6>",
    config: {
        "chain": "igus_rebel",
        "collision_model": "igus_rebel",
        "params": {"connection_radius": 1.5, "max_nodes": 512},
        "refine_budget": 16, // optional; default per planner
    },
)

A plan-and-execute graph needs no application code:

joint state ─► CuJointGoalTask ─► CuJoint<Planner>Task ─► CuPlanToTrajectoryTask ─► follower

CuJointGoalTask turns measured state and a configured goal into a request, and CuPlanToTrajectoryTask times each final path for repose_trajectory::CuFollowTrajectoryTask.

RRT* lives in repose-joint-rrt-star. Every planner shares CuSceneValidity for collision and clearance queries.

Modules§

planner_resources
Resources of CuJointPlannerTask: an owned rng that seeds jobs.

Macros§

impl_planner_type_path
Implements [TypePath] for a const-generic planner $ty<N, M> with the fixed path $path (const arguments are not part of the path).

Structs§

CuJointAStar
A* search over a joint-space lattice.
CuJointAStarParams
Parameters of CuJointAStar.
CuJointDirect
Straight joint-space line planner.
CuJointDirectParams
Parameters of CuJointDirect.
CuJointGoalParams
Node config of CuJointGoalTask.
CuJointGoalTask
Requests one plan from the measured joint state to a configured goal.
CuJointPathOptimizer
Deterministic anytime joint-path optimizer.
CuJointPathOptimizerParams
Parameters of CuJointPathOptimizer.
CuJointPlanPath
Planned joint-space path (CuMsgPayload-compliant).
CuJointPlanRequest
Joint-space planning request (CuMsgPayload-compliant).
CuJointPlannerDebugState
Compact progress snapshot for remote inspection.
CuJointPlannerParams
Node config of CuJointPlannerTask (and every CuJoint<Planner>Task alias): robot models, the planner’s own parameters, and work budgets.
CuJointPlannerTask
Anytime planning task (CuAnytimeTask) over any CuJointPlanner.
CuJointPrm
Probabilistic roadmap planner (single query per job).
CuJointPrmParams
Parameters of CuJointPrm.
CuJointRrtConnect
Bidirectional RRT-Connect planner.
CuJointRrtConnectParams
Parameters of CuJointRrtConnect.
CuJointStomp
Stochastic trajectory optimizer.
CuJointStompParams
Parameters of CuJointStomp.
CuPlanToTrajectoryTask
Times each published plan into a CuTrajectoryPayload<N, CAP>.
CuSceneValidity
Collision queries against one captured planning-scene snapshot.

Enums§

CuPlanStatus
Outcome of a planning job, carried by CuJointPlanPath.
CuPlannerKind
How a planner explores the configuration space.

Constants§

ASTAR_MAX_NODES
Lattice node capacity.
MAX_ATTACHED_SHAPES
Fixed capacity of attached shapes in a CuJointPlanRequest.
MAX_EXCLUSIONS
Fixed capacity of stable-ID exclusions in a CuJointPlanRequest.
MAX_OBSTACLES
Fixed capacity of scene obstacles in a CuJointPlanRequest.
MAX_WAYPOINTS
Fixed capacity of waypoints in a published CuJointPlanPath.
PRM_MAX_NEIGHBORS
Edge capacity per roadmap node.
PRM_MAX_NODES
Roadmap node capacity, including start and goal.
RRT_CONNECT_MAX_NODES
Node capacity of each of the two trees.
STOMP_MAX_ROLLOUTS
Rollout capacity per iteration.

Traits§

CuJointPlanner
A joint-space motion planner usable by CuJointPlannerTask.

Functions§

joint_distance
Joint-space L2 distance under metric (dimensionless, metric-scaled).

Type Aliases§

CuJointAStarTask
CuJointPlannerTask running CuJointAStar.
CuJointDirectTask
CuJointPlannerTask running CuJointDirect.
CuJointPathOptimizerTask
CuJointPlannerTask running CuJointPathOptimizer.
CuJointPrmTask
CuJointPlannerTask running CuJointPrm.
CuJointRrtConnectTask
CuJointPlannerTask running CuJointRrtConnect.
CuJointStompTask
CuJointPlannerTask running CuJointStomp.