17 #ifndef _GAZEBO_POSE_HH_
18 #define _GAZEBO_POSE_HH_
22 #include <ignition/math/Pose3.hh>
29 #pragma GCC diagnostic push
30 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
63 public:
Pose(
double _x,
double _y,
double _z,
64 double _roll,
double _pitch,
double _yaw)
65 GAZEBO_DEPRECATED(8.0);
69 public:
Pose(const
Pose &_pose) GAZEBO_DEPRECATED(8.0);
73 public:
Pose(const ignition::math::Pose3d &_pose) GAZEBO_DEPRECATED(8.0);
76 public: virtual ~
Pose() GAZEBO_DEPRECATED(8.0);
82 GAZEBO_DEPRECATED(8.0);
88 GAZEBO_DEPRECATED(8.0);
97 public:
void Set(
double _x,
double _y,
double _z,
98 double _roll,
double _pitch,
double _yaw)
99 GAZEBO_DEPRECATED(8.0);
102 public:
bool IsFinite() const GAZEBO_DEPRECATED(8.0);
105 public: inline
void Correct() GAZEBO_DEPRECATED(8.0)
126 public: const
Pose &operator+=(const
Pose &_pose) GAZEBO_DEPRECATED(8.0);
132 public: inline
Pose operator-() const GAZEBO_DEPRECATED(8.0)
134 return Pose() - *
this;
146 return Pose(this->CoordPositionSub(_pose),
147 this->CoordRotationSub(_pose.rot));
159 public:
bool operator ==(
const Pose &_pose)
const;
177 public:
Pose &operator=(
const ignition::math::Pose3d &_pose)
189 public:
Vector3 CoordPositionAdd(
const Pose &_pose)
const
199 this->pos.x - _pose.pos.x,
200 this->pos.y - _pose.pos.y,
201 this->pos.z - _pose.pos.z);
203 tmp = _pose.rot.
GetInverse() * (tmp * _pose.rot);
219 Quaternion result(_rot.GetInverse() * this->rot);
235 public:
Pose RotatePositionAboutOrigin(const
Quaternion &_rot) const
240 public:
void Round(
int _precision) GAZEBO_DEPRECATED(8.0);
244 public: ignition::math::Pose3d Ign() const GAZEBO_DEPRECATED(8.0);
250 public: friend std::ostream &operator<<(std::ostream &_out,
251 const gazebo::math::
Pose &_pose)
252 GAZEBO_DEPRECATED(8.0)
254 _out << _pose.pos <<
" " << _pose.rot;
266 _in.setf(std::ios_base::skipws);
267 _in >> _pose.pos >> _pose.rot;
281 #pragma GCC diagnostic pop
friend std::istream & operator>>(std::istream &_in, gazebo::math::Pose &_pose) GAZEBO_DEPRECATED(8.0)
Stream extraction operator.
Definition: Pose.hh:262
Quaternion rot
The rotation.
Definition: Pose.hh:275
Encapsulates a position and rotation in three space.
Definition: Pose.hh:42
The Vector3 class represents the generic vector containing 3 elements.
Definition: Vector3.hh:44
static const double GAZEBO_DEPRECATED(8.0) MAX_D
Double maximum value. This value will be similar to 1.79769e+308.
Definition: Helpers.hh:140
void Normalize() GAZEBO_DEPRECATED(8.0)
Normalize the quaternion.
static const Pose Zero
math::Pose(0, 0, 0, 0, 0, 0)
Definition: Pose.hh:45
double y
y value of the quaternion
Definition: Quaternion.hh:418
Pose operator-(const Pose &_pose) const GAZEBO_DEPRECATED(8.0)
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:143
Quaternion CoordRotationSub(const Quaternion &_rot) const GAZEBO_DEPRECATED(8.0)
Subtract one rotation from another: result = this->rot - rot.
Definition: Pose.hh:216
A quaternion class.
Definition: Quaternion.hh:48
Vector3 pos
The position.
Definition: Pose.hh:272
GAZEBO_VISIBLE void Set(common::Image &_img, const msgs::Image &_msg)
Convert a msgs::Image to a common::Image.
Vector3 CoordPositionSub(const Pose &_pose) const GAZEBO_DEPRECATED(8.0)
Subtract one position from another: result = this - pose.
Definition: Pose.hh:195
double x
x value of the quaternion
Definition: Quaternion.hh:415
Quaternion GetInverse() const GAZEBO_DEPRECATED(8.0)
Get the inverse of this quaternion.
Definition: Quaternion.hh:111
double z
z value of the quaternion
Definition: Quaternion.hh:421
bool const T & _b
Definition: Helpers.hh:258