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