8 #include "../../include/yocs_math_toolkit/common.hpp" 9 #include "../../include/yocs_math_toolkit/geometry.hpp" 26 pose.header.stamp = tf.
stamp_;
41 tf.
stamp_ = pose.header.stamp;
48 const char*
point2str(
const geometry_msgs::Point& point)
50 sprintf(___buffer___,
"%.2f, %.2f, %.2f", point.x, point.y, point.z);
54 const char*
pose2str(
const geometry_msgs::Pose& pose)
56 sprintf(___buffer___,
"%.2f, %.2f, %.2f", pose.position.x, pose.position.y,
yaw(pose));
60 const char*
pose2str(
const geometry_msgs::PoseStamped& pose)
62 sprintf(___buffer___,
"%.2f, %.2f, %.2f", pose.pose.position.x, pose.pose.position.y,
yaw(pose));
68 sprintf(___buffer___,
"%.2f, %.2f, %.2f", vector.x, vector.y, vector.z);
69 return std::string(___buffer___);
72 std::string
vector2str3D(
const geometry_msgs::Vector3Stamped& vector)
79 sprintf(___buffer___,
"%.2f, %.2f", point.x, point.y);
80 return std::string(___buffer___);
83 std::string
point2str2D(
const geometry_msgs::PointStamped& point)
90 sprintf(___buffer___,
"%.2f, %.2f, %.2f", point.x, point.y, point.z);
91 return std::string(___buffer___);
94 std::string
point2str3D(
const geometry_msgs::PointStamped& point)
101 sprintf(___buffer___,
"%.2f, %.2f, %.2f", pose.position.x, pose.position.y,
yaw(pose));
102 return std::string(___buffer___);
105 std::string
pose2str2D(
const geometry_msgs::PoseStamped& pose)
112 sprintf(___buffer___,
"%.2f, %.2f, %.2f, %.2f, %.2f, %.2f",
113 pose.position.x, pose.position.y, pose.position.z,
roll(pose),
pitch(pose),
yaw(pose));
114 return std::string(___buffer___);
117 std::string
pose2str3D(
const geometry_msgs::PoseStamped& pose)
void pose2tf(const geometry_msgs::Pose &pose, tf::Transform &tf)
double pitch(const tf::Transform &tf)
std::string pose2str2D(const geometry_msgs::Pose &pose)
double yaw(const tf::Transform &tf)
std::string pose2str3D(const geometry_msgs::Pose &pose)
std::string vector2str3D(const geometry_msgs::Vector3 &vector)
double roll(const tf::Transform &tf)
std::string point2str3D(const geometry_msgs::Point &point)
TFSIMD_FORCE_INLINE const tfScalar & x() const
TFSIMD_FORCE_INLINE const tfScalar & z() const
static void quaternionMsgToTF(const geometry_msgs::Quaternion &msg, Quaternion &bt)
static void quaternionTFToMsg(const Quaternion &bt, geometry_msgs::Quaternion &msg)
TFSIMD_FORCE_INLINE const tfScalar & y() const
void tf2pose(const tf::Transform &tf, geometry_msgs::Pose &pose)
ECL_DEPRECATED const char * pose2str(const geometry_msgs::Pose &pose)
ECL_DEPRECATED const char * point2str(const geometry_msgs::Point &point)
std::string point2str2D(const geometry_msgs::Point &point)