pub struct Twist {
pub linear: Vector3,
pub angular: Vector3,
}Expand description
A body velocity command (geometry_msgs/msg/Twist): a linear and an angular Vector3.
This is the message a ROS 2 robot is driven by on cmd_vel, the natural target for the body
twists the pamoja-kit chassis and navigation helpers produce.
§Examples
use pamoja_ros2::msg::{Twist, Vector3};
let cmd = Twist {
linear: Vector3::new(0.5, 0.0, 0.0),
angular: Vector3::new(0.0, 0.0, 0.2),
};
assert_eq!(Twist::from_cdr(&cmd.to_cdr()), Some(cmd));Fields§
§linear: Vector3The linear velocity, in metres per second.
angular: Vector3The angular velocity, in radians per second.
Implementations§
Trait Implementations§
impl Copy for Twist
impl StructuralPartialEq for Twist
Auto Trait Implementations§
impl Freeze for Twist
impl RefUnwindSafe for Twist
impl Send for Twist
impl Sync for Twist
impl Unpin for Twist
impl UnsafeUnpin for Twist
impl UnwindSafe for Twist
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