From 4584fb6374078dfa6810e3d625cbda0f524a9ed7 Mon Sep 17 00:00:00 2001 From: Louis-Guillaume DUBOIS Date: Thu, 23 Apr 2015 13:47:21 +0200 Subject: [PATCH] squelette normal_estimator --- hand_control/src/normal_estimator.cpp | 28 +++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 hand_control/src/normal_estimator.cpp 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; +}