| 255 | /************************ protected methods ************************/ |
| 256 | |
| 257 | int |
| 258 | Tracker::createNewTrack(open_ptrack::detection::Detection& detection) |
| 259 | { |
| 260 | if(detection.getConfidence() < min_confidence_) |
| 261 | return -1; |
| 262 | |
| 263 | if (detection.getWorldCentroid().hasNaN()){ |
| 264 | return -1; |
| 265 | } |
| 266 | |
| 267 | open_ptrack::tracking::Track* t; |
| 268 | t = new open_ptrack::tracking::Track( |
| 269 | ++tracks_counter_, |
| 270 | world_frame_id_, |
| 271 | position_variance_, |
| 272 | acceleration_variance_, |
| 273 | period_, |
| 274 | velocity_in_motion_term_ ); |
| 275 | |
| 276 | t->init(detection.getWorldCentroid()(0), detection.getWorldCentroid()(1),detection.getWorldCentroid()(2), |
| 277 | detection.getWorldCentroid()(2), detection.getDistance(), detection.getSource()); |
| 278 | |
| 279 | |
| 280 | bool first_update = true; |
| 281 | t->update(detection.getWorldCentroid()(0), detection.getWorldCentroid()(1), detection.getWorldCentroid()(2), |
| 282 | detection.getWorldCentroid()(2), detection.getDistance(), 0.0, |
| 283 | detection.getConfidence(), min_confidence_, min_confidence_detections_, detection.getSource(), first_update); |
| 284 | |
| 285 | ROS_INFO("Created %d", t->getId()); |
| 286 | |
| 287 | tracks_.push_back(t); |
| 288 | return tracks_counter_; |
| 289 | } |
| 290 | |
| 291 | void |
| 292 | Tracker::createDistanceMatrix() |
nothing calls this directly
no test coverage detected