来自transform_datatypes.h
,这个头文件真是太有用了1
2typedef tf::Vector3 tf::Point
typedef tf::Transform tf::Pose
static tf::Quaternion tf::createQuaternionFromRPY (double roll, double pitch, double yaw)
static geometry_msgs::Quaternion tf::createQuaternionMsgFromRollPitchYaw (double roll, double pitch, double yaw)
static geometry_msgs::Quaternion tf::createQuaternionMsgFromYaw (double yaw)
static double tf::getYaw (const geometry_msgs::Quaternion &orientation)
static void tf::transformTFToMsg (const Transform &bt, geometry_msgs::Transform &msg)
static void tf::transformStampedMsgToTF (const geometry_msgs::TransformStamped &msg, StampedTransform &bt)
static void tf::transformMsgToTF (const geometry_msgs::Transform &msg, Transform &bt)
static void tf::quaternionTFToMsg (const Quaternion &bt, geometry_msgs::Quaternion &msg)
static void tf::poseTFToMsg (const Pose &bt, geometry_msgs::Pose &msg)
static void tf::poseStampedMsgToTF (const geometry_msgs::PoseStamped &msg, Stamped< Pose > &bt)
1 |
|
1 | geometry_msgs::PoseStamped p; |
geometry_msgs::TransformStamped
和tf::StampedTransform
,tf2::Transform
1 | geometry_msgs::TransformStamped transform; |
tf::StampedTransform
和geometry_msgs/TransformStamped
的区别:前者是C++中的一个类,只能用于C++中,而后者则是ROS的消息,只依赖于ROS,与语言无关,都可以使用。