pub trait CuJointPlanner<const N: usize, const M: usize = N>: Sized + TypePath {
type Params: Clone + Default + DeserializeOwned;
const KIND: CuPlannerKind;
const DEFAULT_BUDGETS: (u32, u32) = _;
// Required methods
fn new(
chain: CuKinematicChain<N>,
collision_model: CuRobotCollisionModel<N, M>,
params: Self::Params,
) -> CuResult<Self>;
fn begin(
&mut self,
request: &CuJointPlanRequest<N>,
seed: u64,
) -> CuResult<CuPlanStatus>;
fn step(&mut self, budget: u32) -> CuResult<CuPlanStatus>;
fn write_best(&self, out: &mut CuJointPlanPath<N>) -> CuPlanStatus;
fn quality(&self) -> Quality;
}Expand description
A joint-space motion planner usable by CuJointPlannerTask.
A planner is built once from robot models and its validated
Params with new; invalid parameters fail
there, not at the first job. Jobs are bounded and allocation-free: begin
resets in place, step(budget) does at most budget units of work, and
write_best copies the best path into a caller-owned payload.
Deterministic planners ignore the seed; sampling planners must derive all
randomness from it so replay reproduces every job.
M is the number of collision-model shapes (default N).
Planners implement [TypePath] so the generic planner task stays
nameable and inspectable under Copper’s runtime reflection; use
impl_planner_type_path! for a const-generic planner.
Required Associated Constants§
Sourceconst KIND: CuPlannerKind
const KIND: CuPlannerKind
Exploration family, for diagnostics and documentation.
Provided Associated Constants§
Sourceconst DEFAULT_BUDGETS: (u32, u32) = _
const DEFAULT_BUDGETS: (u32, u32) = _
Default (base_budget, refine_budget) work units of
CuJointPlannerTask when the node config leaves them out.
Required Associated Types§
Sourcetype Params: Clone + Default + DeserializeOwned
type Params: Clone + Default + DeserializeOwned
The planner’s parameter struct: the params block of the planner
task’s node config (serde(default, deny_unknown_fields)).
Required Methods§
Sourcefn new(
chain: CuKinematicChain<N>,
collision_model: CuRobotCollisionModel<N, M>,
params: Self::Params,
) -> CuResult<Self>
fn new( chain: CuKinematicChain<N>, collision_model: CuRobotCollisionModel<N, M>, params: Self::Params, ) -> CuResult<Self>
Builds the planner for explicit robot models, validating params.
Sourcefn begin(
&mut self,
request: &CuJointPlanRequest<N>,
seed: u64,
) -> CuResult<CuPlanStatus>
fn begin( &mut self, request: &CuJointPlanRequest<N>, seed: u64, ) -> CuResult<CuPlanStatus>
Starts a new job for request, discarding the previous one.
Sourcefn step(&mut self, budget: u32) -> CuResult<CuPlanStatus>
fn step(&mut self, budget: u32) -> CuResult<CuPlanStatus>
Runs one bounded quantum of at most budget work units.
Sourcefn write_best(&self, out: &mut CuJointPlanPath<N>) -> CuPlanStatus
fn write_best(&self, out: &mut CuJointPlanPath<N>) -> CuPlanStatus
Writes the best path so far into out (waypoints, length, cost,
effort, scene revision, exclusions) and returns the job status. out
holds no waypoints unless the status has a path.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".