pub struct CuAhrs { /* private fields */ }Expand description
Copper AHRS task that fuses IMU (and optional magnetometer) payloads into roll/pitch/yaw.
Implementations§
Source§impl CuAhrs
impl CuAhrs
pub fn new_filter() -> Self
pub fn debug_state(&self) -> CuAhrsDebugState
Trait Implementations§
Source§impl CuTask for CuAhrs
impl CuTask for CuAhrs
type Input<'m> = (&'m CuStampedData<ImuPayload, CuMsgMetadata>, &'m CuStampedData<MagnetometerPayload, CuMsgMetadata>)
type Output<'m> = CuStampedData<AhrsPose, CuMsgMetadata>
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>where
Self: Sized,
fn new(
config: Option<&ComponentConfig>,
_resources: Self::Resources<'_>,
) -> CuResult<Self>where
Self: Sized,
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 process(
&mut self,
_ctx: &CuContext,
input: &Self::Input<'_>,
output: &mut Self::Output<'_>,
) -> CuResult<()>
fn process( &mut self, _ctx: &CuContext, input: &Self::Input<'_>, output: &mut Self::Output<'_>, ) -> CuResult<()>
Process is the most critical execution of the task.
The goal will be to produce the output message as soon as possible.
Use preprocess to prepare the task to make this method as short as possible.
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/process.
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 “process”. 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 “process” 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 “process”. It is best effort a chance for
the task to update some state after process is out of the way.
It can be use for example to maintain statistics etc. that are not time-critical for the robot.
Source§impl Freezable for CuAhrs
impl Freezable for CuAhrs
Auto Trait Implementations§
impl Freeze for CuAhrs
impl RefUnwindSafe for CuAhrs
impl Send for CuAhrs
impl Sync for CuAhrs
impl Unpin for CuAhrs
impl UnsafeUnpin for CuAhrs
impl UnwindSafe for CuAhrs
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<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 moreSource§impl<T> PayloadDefaultHandlePolicyApply for Twhere
T: ?Sized,
impl<T> PayloadDefaultHandlePolicyApply for Twhere
T: ?Sized,
fn apply_handle_content_policy(&self, _mode: HandleContent)
Source§impl<T> PayloadDefaultLoggingPolicy for Twhere
T: ?Sized,
impl<T> PayloadDefaultLoggingPolicy for Twhere
T: ?Sized,
fn payload_should_log(&self) -> bool
Source§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Reflect for Twhere
T: 'static,
impl<T> ReflectTypePath for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.