17 #ifndef _GAZEBO_POSE_HH_ 18 #define _GAZEBO_POSE_HH_ 22 #include <ignition/math/Pose3.hh> 57 public:
Pose(
double _x,
double _y,
double _z,
58 double _roll,
double _pitch,
double _yaw);
66 public:
Pose(
const ignition::math::Pose3d &_pose);
69 public:
virtual ~
Pose();
88 public:
void Set(
double _x,
double _y,
double _z,
89 double _roll,
double _pitch,
double _yaw);
92 public:
bool IsFinite()
const;
103 public:
Pose GetInverse()
const;
111 public:
Pose operator+(
const Pose &_pose)
const;
116 public:
const Pose &operator+=(
const Pose &_pose);
124 return Pose() - *
this;
135 return Pose(this->CoordPositionSub(_pose),
136 this->CoordRotationSub(_pose.
rot));
142 public:
const Pose &operator-=(
const Pose &_pose);
147 public:
bool operator ==(
const Pose &_pose)
const;
152 public:
bool operator!=(
const Pose &_pose)
const;
157 public:
Pose operator*(
const Pose &_pose);
161 public:
Pose &operator=(
const Pose &_pose);
165 public:
Pose &operator=(
const ignition::math::Pose3d &_pose);
175 public:
Vector3 CoordPositionAdd(
const Pose &_pose)
const;
183 this->pos.x - _pose.
pos.
x,
184 this->pos.y - _pose.
pos.
y,
185 this->pos.z - _pose.
pos.
z);
209 public:
Pose CoordPoseSolve(
const Pose &_b)
const;
212 public:
void Reset();
217 public:
Pose RotatePositionAboutOrigin(
const Quaternion &_rot)
const;
221 public:
void Round(
int _precision);
225 public: ignition::math::Pose3d Ign()
const;
234 _out << _pose.
pos <<
" " << _pose.
rot;
246 _in.setf(std::ios_base::skipws);
247 _in >> _pose.
pos >> _pose.
rot;
double x
X location.
Definition: Vector3.hh:311
void Correct()
Fix any nan values.
Definition: Pose.hh:95
Quaternion rot
The rotation.
Definition: Pose.hh:255
Quaternion CoordRotationSub(const Quaternion &_rot) const
Subtract one rotation from another: result = this->rot - rot.
Definition: Pose.hh:199
double y
Y location.
Definition: Vector3.hh:314
Forward declarations for the common classes.
Definition: Animation.hh:33
Encapsulates a position and rotation in three space.
Definition: Pose.hh:37
The Vector3 class represents the generic vector containing 3 elements.
Definition: Vector3.hh:39
static const Pose Zero
math::Pose(0, 0, 0, 0, 0, 0)
Definition: Pose.hh:40
double y
y value of the quaternion
Definition: Quaternion.hh:383
double z
Z location.
Definition: Vector3.hh:317
Vector3 CoordPositionSub(const Pose &_pose) const
Subtract one position from another: result = this - pose.
Definition: Pose.hh:180
Quaternion GetInverse() const
Get the inverse of this quaternion.
Definition: Quaternion.hh:100
friend std::ostream & operator<<(std::ostream &_out, const gazebo::math::Pose &_pose)
Stream insertion operator.
Definition: Pose.hh:231
A quaternion class.
Definition: Quaternion.hh:42
void Normalize()
Normalize the quaternion.
friend std::istream & operator>>(std::istream &_in, gazebo::math::Pose &_pose)
Stream extraction operator.
Definition: Pose.hh:242
Vector3 pos
The position.
Definition: Pose.hh:252
Pose operator-() const
Negation operator A is the transform from O to P in frame O then -A is transform from P to O specifie...
Definition: Pose.hh:122
GAZEBO_VISIBLE void Set(common::Image &_img, const msgs::Image &_msg)
Convert a msgs::Image to a common::Image.
double x
x value of the quaternion
Definition: Quaternion.hh:380
double z
z value of the quaternion
Definition: Quaternion.hh:386
Pose operator-(const Pose &_pose) const
Subtraction operator A is the transform from O to P in frame O B is the transform from O to Q in fram...
Definition: Pose.hh:133