diff --git a/hand_control/src/normal_estimator.cpp b/hand_control/src/normal_estimator.cpp new file mode 100644 index 0000000..cd1fe6e --- /dev/null +++ b/hand_control/src/normal_estimator.cpp @@ -0,0 +1,28 @@ +#include +#include +#include +#include +#include + +typedef pcl::PointXYZRGB Point; +typedef pcl::PointCloud PointCloud; +typedef Eigen::Vector4f PCLCoord; // vecteur, accès par v(0), v(1)... +typedef geometry_msgs::Quaternion ROSCoord; // struct : x, y, z, w + +int +main(int argc, char** argv) +{ + ros::init(argc, argv, "normal_estimator"); + ros::NodeHandle node("estimator"); + + // initialisation + ros::Publisher publisher = node.advertise("output", 1); + Callback callback(publisher); + ros::Subscriber subscriber = node.subscribe("input", 1, callback); + + // démarrage + ROS_INFO("node started"); + ros::spin(); + ROS_INFO("exit"); + return 0; +}