Browse Source

fonction conv Vector4f -> Quaternion

master
Louis-Guillaume DUBOIS 11 years ago
parent
commit
5fa9d37571
  1. 11
      hand_control/src/normal_estimator.cpp

11
hand_control/src/normal_estimator.cpp

@ -9,6 +9,17 @@ typedef pcl::PointCloud<Point> PointCloud;
typedef Eigen::Vector4f PCLCoord; // vecteur, accès par v(0), v(1)... typedef Eigen::Vector4f PCLCoord; // vecteur, accès par v(0), v(1)...
typedef geometry_msgs::Quaternion ROSCoord; // struct : x, y, z, w typedef geometry_msgs::Quaternion ROSCoord; // struct : x, y, z, w
const ROSCoord::ConstPtr
PCLCoord_to_ROSCoord(const PCLCoord& pcl_coord)
{
ROSCoord::Ptr ros_coord(new ROSCoord());
ros_coord->x = pcl_coord(0); // a
ros_coord->y = pcl_coord(1); // b
ros_coord->z = pcl_coord(2); // c
ros_coord->w = pcl_coord(3); // d
return ros_coord;
}
int int
main(int argc, char** argv) main(int argc, char** argv)
{ {

Loading…
Cancel
Save