| 314 | } |
| 315 | |
| 316 | int |
| 317 | SkeletonTracker::createNewTrack(open_ptrack::detection::SkeletonDetection& |
| 318 | detection) |
| 319 | { |
| 320 | if(SkeletonTracker::count == 0) |
| 321 | ROS_INFO_STREAM("TODO: SkeletonTracker createNewTrack: min_confidence check (createNewTrack)"); |
| 322 | // ROS_INFO_STREAM("detection conf: " << detection.getConfidence()); |
| 323 | // if(detection.getConfidence() < min_confidence_) |
| 324 | // return -1; |
| 325 | |
| 326 | open_ptrack::tracking::SkeletonTrack* t; |
| 327 | t = new open_ptrack::tracking::SkeletonTrack( |
| 328 | ++tracks_counter_, |
| 329 | world_frame_id_, |
| 330 | position_variance_, |
| 331 | acceleration_variance_, |
| 332 | period_, |
| 333 | velocity_in_motion_term_, |
| 334 | detection.getSkeletonMsg().joints); |
| 335 | |
| 336 | t->init(detection.getWorldCentroid()(0), detection.getWorldCentroid()(1), |
| 337 | detection.getWorldCentroid()(2), |
| 338 | detection.getHeight(), |
| 339 | detection.getDistance(), detection.getSource(), |
| 340 | detection.getSkeletonMsg().joints); |
| 341 | |
| 342 | bool first_update = true; |
| 343 | t->update(detection.getWorldCentroid()(0), |
| 344 | detection.getWorldCentroid()(1), |
| 345 | detection.getWorldCentroid()(2), |
| 346 | detection.getHeight(), detection.getDistance(), 0.0, |
| 347 | detection.getConfidence(), min_confidence_, |
| 348 | min_confidence_detections_, detection.getSource(), |
| 349 | detection.getSkeletonMsg().joints, |
| 350 | first_update |
| 351 | ); |
| 352 | |
| 353 | ROS_INFO_STREAM("Created " << t->getId()); |
| 354 | |
| 355 | tracks_.push_back(t); |
| 356 | return tracks_counter_; |
| 357 | } |
| 358 | |
| 359 | void |
| 360 | SkeletonTracker::toMarkerArray(visualization_msgs::MarkerArray::Ptr &msg, |
nothing calls this directly
no test coverage detected