pub struct RrtStarPlanner { /* private fields */ }Expand description
An RRT* planner as an anytime task.
base() runs the first block of iterations and publishes the first path it
finds; each refine() runs one more block and republishes only when the
path got shorter. How many blocks run is the policy’s call, not the task’s.
Randomness comes from a cu_rng::CuRngBundle resource: job N’s stream is
a pure function of the resource seed and N, so the same seed replays the
same trees.
Trait Implementations§
Source§impl CuAnytimeTask for RrtStarPlanner
impl CuAnytimeTask for RrtStarPlanner
type Input<'m> = CuStampedData<PlanRequest, CuMsgMetadata>
type Output<'m> = CuStampedData<PlanPath, CuMsgMetadata>
Source§type Quality = Ratio
type Quality = Ratio
Measure reported through
AnytimeStatus: Quality for tasks that can
score their result, () for tasks that cannot. A quality target can only be
configured for tasks whose Quality is comparable to it, so a target on a
() task is rejected at compile time.Source§fn register_debug_state_types(registry: &mut TypeRegistry)
fn register_debug_state_types(registry: &mut TypeRegistry)
Registers the reflected type used as this task’s debug-state contract. Read more
Source§fn debug_state_type_path() -> &'static str
fn debug_state_type_path() -> &'static str
Returns the reflected type path used as this task’s debug-state schema.
Source§fn with_debug_state<R>(&self, f: impl FnOnce(&dyn Reflect) -> R) -> R
fn with_debug_state<R>(&self, f: impl FnOnce(&dyn Reflect) -> R) -> R
Borrows this task’s current debug-state view. Read more
Source§fn new(
config: Option<&ComponentConfig>,
resources: Self::Resources<'_>,
) -> CuResult<Self>
fn new( config: Option<&ComponentConfig>, resources: Self::Resources<'_>, ) -> CuResult<Self>
Here you need to initialize everything your task will need for the duration
of its lifetime. The config allows you to access the configuration of the task.
Source§fn base(
&mut self,
_ctx: &CuContext,
input: &Self::Input<'_>,
output: &mut Self::Output<'_>,
) -> CuResult<AnytimeStatus<Quality>>
fn base( &mut self, _ctx: &CuContext, input: &Self::Input<'_>, output: &mut Self::Output<'_>, ) -> CuResult<AnytimeStatus<Quality>>
Starts a new job and writes its minimum valid result into
output. Read moreSource§fn refine(
&mut self,
_ctx: &CuContext,
output: &mut Self::Output<'_>,
) -> CuResult<AnytimeStatus<Quality>>
fn refine( &mut self, _ctx: &CuContext, output: &mut Self::Output<'_>, ) -> CuResult<AnytimeStatus<Quality>>
Performs exactly one bounded refinement quantum. Read more
Source§fn start(&mut self, _ctx: &CuContext) -> Result<(), CuError>
fn start(&mut self, _ctx: &CuContext) -> Result<(), CuError>
Start is called between the creation of the task and the first call to
pre/base.
Source§fn preprocess(&mut self, _ctx: &CuContext) -> Result<(), CuError>
fn preprocess(&mut self, _ctx: &CuContext) -> Result<(), CuError>
This is a method called by the runtime before “base”. This is a kind of best
effort, as soon as possible call to give a chance for the task to do some work
before to prepare to make “base” as short as possible.
Source§fn postprocess(&mut self, _ctx: &CuContext) -> Result<(), CuError>
fn postprocess(&mut self, _ctx: &CuContext) -> Result<(), CuError>
This is a method called by the runtime after the job’s refinement window has
closed. It is best effort a chance for the task to update some state out of
the critical path, for example to release scratch memory or maintain
statistics that are not time-critical for the robot.
Source§impl Freezable for RrtStarPlanner
impl Freezable for RrtStarPlanner
Auto Trait Implementations§
impl Freeze for RrtStarPlanner
impl RefUnwindSafe for RrtStarPlanner
impl Send for RrtStarPlanner
impl Sync for RrtStarPlanner
impl Unpin for RrtStarPlanner
impl UnsafeUnpin for RrtStarPlanner
impl UnwindSafe for RrtStarPlanner
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
Mutably borrows from an owned value. Read more
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> ⓘ
Converts
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> ⓘ
Converts
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