14 #include <ros/console.h>
24 const cv::Mat& depth =
image->getDepthImage();
30 ROS_INFO_STREAM(
"Nr clusters: " << clusters.
size() <<
", nr_entities: " << entities.
size());
32 for (
unsigned int i_cluster = 0; i_cluster < clusters.
size(); ++i_cluster)
36 for (
unsigned int i_entity = 0; i_entity < entities.
size(); ++i_entity)
52 float dist_sq = (dx * dx + dy * dy + dz * dz);
56 double prob = 1.0 / (1.0 + 100 * dist_sq);
58 double e_max_dist = 0.2;
60 if (dist_sq > e_max_dist * e_max_dist)
80 ROS_INFO(
"Entity added to association matrix: %s", e->id().c_str());
81 assoc_matrix.
setEntry(i_cluster, i_entity, prob);
89 ROS_WARN(
"Association failed!");
93 entities_associated.
resize(entities.
size(), -1);
95 for (
unsigned int i_cluster = 0; i_cluster < clusters.
size(); ++i_cluster)
100 int i_entity = assig[i_cluster];
109 new_chull = cluster.
chull;
118 req.setExistenceProbability(
id, 1.0);
140 new_chull = cluster.
chull;
206 if (!new_chull.
points.empty())
209 cluster.
chull = new_chull;
212 req.setConvexHullNew(
id, new_chull, new_pose,
image->getTimestamp(),
image->getFrameId());
222 req.addMeasurement(
id, m);
225 req.setLastUpdateTimestamp(
id,
image->getTimestamp());