Association marker/objet

Ajout du Message NamedPoint
Synchronisation des frame_id à approfondir
This commit is contained in:
Unknown 2018-07-02 18:13:46 +02:00
parent 166a69125b
commit edc072b0be
10 changed files with 84 additions and 19 deletions

View file

@ -17,6 +17,8 @@
#include <pcl/pcl_config.h>
#include <rviz_interface/NamedPoint.h>
// void printinfo()
// {
// std::cout<<"OK"<<std::endl;
@ -88,7 +90,9 @@ cloud_cb (const sensor_msgs::PointCloud2ConstPtr& input)
Eigen::Vector4f barycentre;
pcl::compute3DCentroid(*pcl_output, barycentre);
geometry_msgs::PointStamped center_msg;
// geometry_msgs::PointStamped center_msg;
rviz_interface::NamedPoint center_msg;
center_msg.name = "6DOF";
// for (size_t i = 0; i < pcl_output->size (); ++i)
// {
// if( pcl_output->points[i].x)
@ -129,7 +133,8 @@ int main (int argc, char** argv)
// Create a ROS publisher for the output point cloud
pub = nh.advertise<sensor_msgs::PointCloud2> ("/plane_output", 1);
pubc = nh.advertise<geometry_msgs::PointStamped> ("/object_center", 1);
// pubc = nh.advertise<geometry_msgs::PointStamped> ("/object_center", 1);
pubc = nh.advertise<rviz_interface::NamedPoint> ("/object_center", 1);
// printinfo();
// Spin