#[repr(C)]pub struct MultiDOFJointState {
pub header: Header,
pub joint_names: Vec<String>,
pub transforms: Vec<Transform>,
pub twist: Vec<Twist>,
pub wrench: Vec<Wrench>,
}Expand description
Representation of state for joints with multiple degrees of freedom, following the structure of JointState which can only represent a single degree of freedom.
It is assumed that a joint in a system corresponds to a transform that gets applied along the kinematic chain. For example, a planar joint (as in URDF) is 3DOF (x, y, yaw) and those 3DOF can be expressed as a transformation matrix, and that transformation matrix can be converted back to (x, y, yaw)
Each joint is uniquely identified by its name The header specifies the time at which the joint states were recorded. All the joint states in one message have to be recorded at the same time.
This message consists of a multiple arrays, one for each part of the joint state. The goal is to make each of the fields optional. When e.g. your joints have no wrench associated with them, you can leave the wrench array empty.
All arrays in this message should have the same size, or be empty. This is the only way to uniquely associate the joint name with the correct states.
Fields§
§header: Header§joint_names: Vec<String>§transforms: Vec<Transform>§twist: Vec<Twist>§wrench: Vec<Wrench>Implementations§
Source§impl MultiDOFJointState
impl MultiDOFJointState
Sourcepub fn create_topic_with_name(
participant: &DdsParticipant,
name: &str,
maybe_qos: Option<DdsQos>,
maybe_listener: Option<DdsListener>,
) -> Result<DdsTopic<Self>, DDSError>
pub fn create_topic_with_name( participant: &DdsParticipant, name: &str, maybe_qos: Option<DdsQos>, maybe_listener: Option<DdsListener>, ) -> Result<DdsTopic<Self>, DDSError>
Create a topic using of this Type specifying the topic name
§Arguments
participant- The participant handle onto which this topic should be createdname- The name of the topicmaybe_qos- A QoS structure for this topic. The Qos is optionalmaybe_listener- A listener to use on this topic. The listener is optional
Sourcepub fn create_topic(
participant: &DdsParticipant,
maybe_topic_prefix: Option<&str>,
maybe_qos: Option<DdsQos>,
maybe_listener: Option<DdsListener>,
) -> Result<DdsTopic<Self>, DDSError>
pub fn create_topic( participant: &DdsParticipant, maybe_topic_prefix: Option<&str>, maybe_qos: Option<DdsQos>, maybe_listener: Option<DdsListener>, ) -> Result<DdsTopic<Self>, DDSError>
Create a topic of this Type using the default topic name. The default topic name is provided by the Self::topic_name function.
§Arguments
participant- The participant handle onto which this topic should be createdmaybe_topic_prefix- An additional prefix to be added to the topic name. This can be Nonemaybe_qos- A QoS structure for this topic. The Qos is optionalmaybe_listener- A listener to use on this topic. The listener is optional
Sourcepub fn create_sample_buffer(len: usize) -> SampleBuffer<MultiDOFJointState>
pub fn create_sample_buffer(len: usize) -> SampleBuffer<MultiDOFJointState>
Create a sample buffer for storing an array of samples You can pass the sample buffer into a read to read multiple samples. Multiple samples are useful when you have one or more keys in your topic structure. Each value of the key will result in the storage of another sample.