pub struct JointAccelConfigState {
pub last_update_hardware_timestamp_us: u64,
pub last_update_system_timestamp_us: u64,
pub max_acc_limits: [f64; 6],
pub joint_update_hardware_timestamps: [u64; 6],
pub joint_update_system_timestamps: [u64; 6],
pub valid_mask: u8,
}Expand description
关节加速度限制配置状态(冷数据)
更新频率:按需查询(需要查询6次,每个关节一次) CAN ID:0x47C(MotorMaxAccelFeedback) 同步机制:RwLock(按需查询,更新频率极低)
注意:MotorMaxAccelFeedback.max_accel() 已经返回 rad/s²,无需转换。
Fields§
§last_update_hardware_timestamp_us: u64最后更新时间戳(硬件时间戳,微秒)
last_update_system_timestamp_us: u64最后更新时间戳(系统时间戳,微秒)
max_acc_limits: [f64; 6]各关节最大加速度(rad/s²)[J1, J2, J3, J4, J5, J6]
joint_update_hardware_timestamps: [u64; 6]每个关节的硬件时间戳(微秒)[J1, J2, J3, J4, J5, J6]
joint_update_system_timestamps: [u64; 6]每个关节的系统接收时间戳(微秒)[J1, J2, J3, J4, J5, J6]
valid_mask: u8有效性掩码(Bit 0-5 对应 J1-J6)
- 1 表示该关节的配置已更新
- 0 表示该关节的配置未更新(可能未查询)
Implementations§
Source§impl JointAccelConfigState
impl JointAccelConfigState
Sourcepub fn is_fully_valid(&self) -> bool
pub fn is_fully_valid(&self) -> bool
检查所有关节是否都已更新(valid_mask == 0x3F)
Sourcepub fn missing_joints(&self) -> Vec<usize>
pub fn missing_joints(&self) -> Vec<usize>
获取未更新的关节索引(用于调试)
Trait Implementations§
Source§impl Clone for JointAccelConfigState
impl Clone for JointAccelConfigState
Source§fn clone(&self) -> JointAccelConfigState
fn clone(&self) -> JointAccelConfigState
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 JointAccelConfigState
impl Debug for JointAccelConfigState
Source§impl Default for JointAccelConfigState
impl Default for JointAccelConfigState
Source§fn default() -> JointAccelConfigState
fn default() -> JointAccelConfigState
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for JointAccelConfigState
impl RefUnwindSafe for JointAccelConfigState
impl Send for JointAccelConfigState
impl Sync for JointAccelConfigState
impl Unpin for JointAccelConfigState
impl UnwindSafe for JointAccelConfigState
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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