MoveG 1.0.0
A modern C++ library for Robotics
Loading...
Searching...
No Matches
MoveG Namespace Reference

Namespace for movement and manipulation of poses. More...

Classes

class  Pose
 Class representing a pose in 3D space. More...
 
class  Rotation
 Class for representing and managing rotations in three-dimensional space. More...
 

Functions

std::ostream & operator<< (std::ostream &os, const Pose &pose)
 
std::ostream & operator<< (std::ostream &os, const Rotation &rotation)
 

Detailed Description

Namespace for movement and manipulation of poses.

Extrinsic vs intrinsic rotations.

  • Extrinsic: all rotations refer to a fixed/global coordinate system xyz. Each rotation applies to the global coordinate system.
  • Intrinsic: each rotation refers to the previously rotated coordinate system. For example, an intrinsic Yaw-Pitch'-Roll'' (z-y'-x'') rotation: 1) Rotation around the global z-axis. 2) Rotation around the new y'-axis. 3) Rotation around the new x''-axis.

Matrix multiplication occurs in order of application (the matrices are the same for both types): Intrinsic: R = R3 * R2 * R1 Extrinsic: R = R1 * R2 * R3

Function Documentation

◆ operator<<() [1/2]

std::ostream & MoveG::operator<< ( std::ostream &  os,
const Pose pose 
)
Parameters
osThe output stream.
poseThe Pose object to insert into the stream.
Returns
Reference to the output stream.

Definition at line 281 of file pose_lib.cpp.

282{
283 os << "Position: [" << pose.position_.x() << ", " << pose.position_.y() << ", "
284 << pose.position_.z() << "]\n";
285 os << "Orientation (quaternion): [" << pose.orientation_.x() << ", " << pose.orientation_.y()
286 << ", " << pose.orientation_.z() << ", " << pose.orientation_.w() << "]";
287 return os;
288}
Eigen::Quaterniond orientation_
Orientation represented as quaternion.
Definition pose_lib.h:314
Eigen::Vector3d position_
Position in 3D space.
Definition pose_lib.h:313

◆ operator<<() [2/2]

std::ostream & MoveG::operator<< ( std::ostream &  os,
const Rotation rotation 
)
Parameters
osStream to output to.
rotationRotation to output.
Returns
Reference to the output stream.

Definition at line 173 of file rotation_lib.cpp.

174{
175 Eigen::Quaterniond quat = rotation.toQuaternion();
176 os << "Rotation (quaternion x,y,z,w): [" << quat.x() << ", " << quat.y() << ", " << quat.z()
177 << ", " << quat.w() << "]";
178 return os;
179}
Eigen::Quaterniond toQuaternion() const
Converts the rotation to a quaternion.