Skip to content

armgit / flix

Public Imported from GitHub
0

Making an ESP32-based quadcopter from scratch

Add forgotten file

Oleg Kalachev46ba00fca7cf
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 <ignition/math/Vector3.hh>
+#include <ignition/math/Pose3.hh>
+
+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());
+}