pub struct CuJointRrtStar<const N: usize, const M: usize = N> { /* private fields */ }Expand description
Allocation-free fixed-capacity joint-space RRT* solver.
Built with CuJointPlanner::new from robot models and
CuJointRrtStarParams (invalid parameters fail there); runs in
CuJointRrtStarTask.
Implementations§
Source§impl<const N: usize, const M: usize> CuJointRrtStar<N, M>
impl<const N: usize, const M: usize> CuJointRrtStar<N, M>
Sourcepub const fn params(&self) -> &CuJointRrtStarParams
pub const fn params(&self) -> &CuJointRrtStarParams
The validated planner parameters.
Sourcepub const fn has_solution(&self) -> bool
pub const fn has_solution(&self) -> bool
Returns true if a collision-free path from start to goal has been found.
Sourcepub fn is_exhausted(&self) -> bool
pub fn is_exhausted(&self) -> bool
Returns true if the node buffer is full or the path is already straight-line optimal.
Sourcepub const fn iterations(&self) -> u32
pub const fn iterations(&self) -> u32
Returns the number of RRT* iterations executed for the current job.
Sourcepub const fn scene_revision(&self) -> CuSceneRevision
pub const fn scene_revision(&self) -> CuSceneRevision
Returns the scene revision captured for the current job.
Sourcepub const fn exclusions(&self) -> &CuSceneExclusions<MAX_EXCLUSIONS>
pub const fn exclusions(&self) -> &CuSceneExclusions<MAX_EXCLUSIONS>
Exclusions captured for the current job.
Sourcepub fn quality(&self) -> Quality
pub fn quality(&self) -> Quality
Computes the normalized quality in [0.0, 1.0] (straight_line_cost / best_cost).
Sourcepub fn quality_of_cost(&self, cost: f64) -> Quality
pub fn quality_of_cost(&self, cost: f64) -> Quality
Computes the normalized quality in [0.0, 1.0] of an actually emitted path
(straight_line_cost / cost).
Sourcepub fn path_cost(
&self,
waypoints: &[CuJointPositionsPayload<N>; 32],
len: u32,
) -> f64
pub fn path_cost( &self, waypoints: &[CuJointPositionsPayload<N>; 32], len: u32, ) -> f64
Dimensionless joint-space L2 cost of an emitted waypoint sequence
(waypoints[..len]) using the configured metric.
Sourcepub fn write_path(
&self,
out_waypoints: &mut [CuJointPositionsPayload<N>; 32],
) -> Option<u32>
pub fn write_path( &self, out_waypoints: &mut [CuJointPositionsPayload<N>; 32], ) -> Option<u32>
Extracts and shortcuts the best path in place into out_waypoints, returning the
number of waypoints written (Some(len)), or None if no solution exists or the
shortcut path still exceeds MAX_WAYPOINTS.
Trait Implementations§
Source§impl<const N: usize, const M: usize> CuJointPlanner<N, M> for CuJointRrtStar<N, M>
impl<const N: usize, const M: usize> CuJointPlanner<N, M> for CuJointRrtStar<N, M>
Source§const KIND: CuPlannerKind = CuPlannerKind::Sampling
const KIND: CuPlannerKind = CuPlannerKind::Sampling
Source§type Params = CuJointRrtStarParams
type Params = CuJointRrtStarParams
params block of the planner
task’s node config (serde(default, deny_unknown_fields)).Source§fn new(
chain: CuKinematicChain<N>,
collision_model: CuRobotCollisionModel<N, M>,
params: CuJointRrtStarParams,
) -> CuResult<Self>
fn new( chain: CuKinematicChain<N>, collision_model: CuRobotCollisionModel<N, M>, params: CuJointRrtStarParams, ) -> CuResult<Self>
params.Source§fn begin(
&mut self,
request: &CuJointPlanRequest<N>,
seed: u64,
) -> CuResult<CuPlanStatus>
fn begin( &mut self, request: &CuJointPlanRequest<N>, seed: u64, ) -> CuResult<CuPlanStatus>
request, discarding the previous one.Source§fn step(&mut self, budget: u32) -> CuResult<CuPlanStatus>
fn step(&mut self, budget: u32) -> CuResult<CuPlanStatus>
budget work units.Source§fn write_best(&self, out: &mut CuJointPlanPath<N>) -> CuPlanStatus
fn write_best(&self, out: &mut CuJointPlanPath<N>) -> CuPlanStatus
out (waypoints, length, cost,
effort, scene revision, exclusions) and returns the job status. out
holds no waypoints unless the status has a path.Source§const DEFAULT_BUDGETS: (u32, u32) = _
const DEFAULT_BUDGETS: (u32, u32) = _
(base_budget, refine_budget) work units of
CuJointPlannerTask when the node config leaves them out.Auto Trait Implementations§
impl<const N: usize, const M: usize> Freeze for CuJointRrtStar<N, M>
impl<const N: usize, const M: usize> RefUnwindSafe for CuJointRrtStar<N, M>
impl<const N: usize, const M: usize> Send for CuJointRrtStar<N, M>
impl<const N: usize, const M: usize> Sync for CuJointRrtStar<N, M>
impl<const N: usize, const M: usize> Unpin for CuJointRrtStar<N, M>
impl<const N: usize, const M: usize> UnsafeUnpin for CuJointRrtStar<N, M>
impl<const N: usize, const M: usize> UnwindSafe for CuJointRrtStar<N, M>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> GetTypeRegistration for T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more