8 #include <Eigen/Geometry> 9 #include "../../include/sophus_ros_conversions/eigen.hpp" 10 #include "../../include/sophus_ros_conversions/geometry.hpp" 24 Eigen::Quaternion<Sophus::SE3f::Scalar> orientation;
25 Sophus::SE3f::Point translation;
28 se3 = Sophus::SE3f(orientation, translation);
32 geometry_msgs::Pose pose;
33 Eigen::Vector3f translation = s.translation();
35 Eigen::Quaternionf quaternion = s.unit_quaternion();
43 translation << v.x, v.y, v.z;
49 Sophus::SE3f::Point translation;
50 Eigen::Quaternion<Sophus::SE3f::Scalar> orientation;
53 se3 = Sophus::SE3f(orientation, translation);
64 geometry_msgs::Transform msg;
65 msg.translation.x = se3.translation().x();
66 msg.translation.y = se3.translation().y();
67 msg.translation.z = se3.translation().z();
68 msg.rotation.x = se3.unit_quaternion().x();
69 msg.rotation.y = se3.unit_quaternion().y();
70 msg.rotation.z = se3.unit_quaternion().z();
71 msg.rotation.w = se3.unit_quaternion().w();
geometry_msgs::Transform sophusToTransformMsg(const Sophus::SE3f &se3)
geometry_msgs::Point eigenToPointMsg(Eigen::Vector3f &e)
void transformMsgToSophus(const geometry_msgs::Transform &transform, Sophus::SE3f &se3)
geometry_msgs::Quaternion eigenToQuaternionMsg(Eigen::Quaternionf &e)
void quaternionMsgToEigen(const geometry_msgs::Quaternion &m, Eigen::Quaternionf &e)
geometry_msgs::Pose sophusToPoseMsg(const Sophus::SE3f &s)
void pointMsgToEigen(const geometry_msgs::Point &m, Eigen::Vector3f &e)
void poseMsgToSophus(const geometry_msgs::Pose &p, Sophus::SE3f &s)
void vector3MsgToSophus(const geometry_msgs::Vector3 &v, Sophus::SE3f::Point &translation)