pub struct JointLimitConfigState {
pub last_update_hardware_timestamp_us: u64,
pub last_update_system_timestamp_us: u64,
pub joint_limits_max: [f64; 6],
pub joint_limits_min: [f64; 6],
pub joint_max_velocity: [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:0x473(MotorLimitFeedback) 同步机制:RwLock(按需查询,更新频率极低)
注意:
MotorLimitFeedback.max_angle()和.min_angle()返回的是度,需要转换为弧度。MotorLimitFeedback.max_velocity()已经返回 rad/s,无需转换。
Fields§
§last_update_hardware_timestamp_us: u64最后更新时间戳(硬件时间戳,微秒)
last_update_system_timestamp_us: u64最后更新时间戳(系统时间戳,微秒)
joint_limits_max: [f64; 6]关节角度上限(弧度)[J1, J2, J3, J4, J5, J6]
joint_limits_min: [f64; 6]关节角度下限(弧度)[J1, J2, J3, J4, J5, J6]
joint_max_velocity: [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 JointLimitConfigState
impl JointLimitConfigState
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 JointLimitConfigState
impl Clone for JointLimitConfigState
Source§fn clone(&self) -> JointLimitConfigState
fn clone(&self) -> JointLimitConfigState
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 JointLimitConfigState
impl Debug for JointLimitConfigState
Source§impl Default for JointLimitConfigState
impl Default for JointLimitConfigState
Source§fn default() -> JointLimitConfigState
fn default() -> JointLimitConfigState
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for JointLimitConfigState
impl RefUnwindSafe for JointLimitConfigState
impl Send for JointLimitConfigState
impl Sync for JointLimitConfigState
impl Unpin for JointLimitConfigState
impl UnwindSafe for JointLimitConfigState
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