pub struct MbotSensors {
pub brightness: BrightnessBand,
pub noise: NoiseBand,
pub presence: PresenceSignature,
pub motion: MotionContext,
pub orientation: Orientation,
pub time_period: TimePeriod,
}Expand description
mBot2 sensor vocabulary — 6-dimensional context for the CyberPi microcontroller.
Covers the six onboard sensor dimensions most relevant to social behaviour: ambient light, ambient sound, nearby presence, robot motion, orientation, and time of day (set by the host application).
use ccf_core::mbot::{MbotSensors, BrightnessBand, NoiseBand,
PresenceSignature, MotionContext, Orientation, TimePeriod};
use ccf_core::vocabulary::ContextKey;
let key = ContextKey::new(MbotSensors {
brightness: BrightnessBand::Bright,
noise: NoiseBand::Quiet,
presence: PresenceSignature::Close,
motion: MotionContext::Static,
orientation: Orientation::Upright,
time_period: TimePeriod::Day,
});Fields§
§brightness: BrightnessBandAmbient light level (CyberPi light sensor).
noise: NoiseBandAmbient sound level (CyberPi microphone).
presence: PresenceSignatureNearby presence signature (proximity / IR sensor).
motion: MotionContextRobot motion context (derived from wheel encoders).
orientation: OrientationRobot orientation relative to starting heading (IMU).
time_period: TimePeriodTime of day period (set by host application or RTC).
Trait Implementations§
Source§impl Clone for MbotSensors
impl Clone for MbotSensors
Source§fn clone(&self) -> MbotSensors
fn clone(&self) -> MbotSensors
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MbotSensors
impl Debug for MbotSensors
Source§impl Hash for MbotSensors
impl Hash for MbotSensors
Source§impl PartialEq for MbotSensors
impl PartialEq for MbotSensors
Source§impl SensorVocabulary<6> for MbotSensors
impl SensorVocabulary<6> for MbotSensors
Source§fn to_feature_vec(&self) -> [f32; 6]
fn to_feature_vec(&self) -> [f32; 6]
Encode this vocabulary instance as a normalised float feature vector. Read more
Source§const FEATURE_DIM: usize = N
const FEATURE_DIM: usize = N
Dimensionality of the feature vector encoding (equal to the const generic
N).
Provided as an associated constant for ergonomic access at the type level.impl Eq for MbotSensors
impl StructuralPartialEq for MbotSensors
Auto Trait Implementations§
impl Freeze for MbotSensors
impl RefUnwindSafe for MbotSensors
impl Send for MbotSensors
impl Sync for MbotSensors
impl Unpin for MbotSensors
impl UnsafeUnpin for MbotSensors
impl UnwindSafe for MbotSensors
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