From 46ba00fca7cf87524b2eed33926978b7787ad10b Mon Sep 17 00:00:00 2001 From: Oleg Kalachev Date: Fri, 29 Dec 2023 18:56:32 +0300 Subject: [PATCH] Add forgotten file --- gazebo/util.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 gazebo/util.h diff --git a/gazebo/util.h b/gazebo/util.h new file mode 100644 index 0000000..7467a2c --- /dev/null +++ b/gazebo/util.h @@ -0,0 +1,14 @@ +#include +#include + +using ignition::math::Vector3d; +using ignition::math::Pose3d; + +Pose3d flu2frd(const Pose3d& p) { + return ignition::math::Pose3d(p.Pos().X(), -p.Pos().Y(), -p.Pos().Z(), + p.Rot().W(), p.Rot().X(), -p.Rot().Y(), -p.Rot().Z()); +} + +Vector flu2frd(const Vector3d& v) { + return Vector(v.X(), -v.Y(), -v.Z()); +}