MCPcopy Create free account
hub / github.com/OpenPTrack/open_ptrack_v2 / createNewTrack

Method createNewTrack

tracking/src/skeleton_tracker.cpp:316–357  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

314}
315
316int
317SkeletonTracker::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
359void
360SkeletonTracker::toMarkerArray(visualization_msgs::MarkerArray::Ptr &msg,

Callers

nothing calls this directly

Calls 9

getSkeletonMsgMethod · 0.80
getWorldCentroidMethod · 0.80
getHeightMethod · 0.80
getSourceMethod · 0.80
initMethod · 0.45
getDistanceMethod · 0.45
updateMethod · 0.45
getConfidenceMethod · 0.45
getIdMethod · 0.45

Tested by

no test coverage detected