| 243 | /************************ protected methods ************************/ |
| 244 | |
| 245 | int |
| 246 | Tracker3D::createNewTrack(open_ptrack::detection::Detection& detection) |
| 247 | { |
| 248 | if(detection.getConfidence() < min_confidence_) |
| 249 | return -1; |
| 250 | |
| 251 | open_ptrack::tracking::Track3D* t; |
| 252 | t = new open_ptrack::tracking::Track3D( |
| 253 | ++tracks_counter_, |
| 254 | world_frame_id_, |
| 255 | position_variance_, |
| 256 | acceleration_variance_, |
| 257 | period_, |
| 258 | velocity_in_motion_term_ ); |
| 259 | |
| 260 | t->init(detection.getWorldCentroid()(0), detection.getWorldCentroid()(1),detection.getWorldCentroid()(2), |
| 261 | detection.getHeight(), detection.getDistance(), detection.getSource()); |
| 262 | |
| 263 | bool first_update = true; |
| 264 | t->update(detection.getWorldCentroid()(0), detection.getWorldCentroid()(1), detection.getWorldCentroid()(2), |
| 265 | detection.getHeight(), detection.getDistance(), 0.0, |
| 266 | detection.getConfidence(), min_confidence_, min_confidence_detections_, detection.getSource(), first_update); |
| 267 | |
| 268 | ROS_INFO("Created %d", t->getId()); |
| 269 | |
| 270 | tracks_.push_back(t); |
| 271 | return tracks_counter_; |
| 272 | } |
| 273 | |
| 274 | void |
| 275 | Tracker3D::createDistanceMatrix() |
nothing calls this directly
no test coverage detected