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

Method createNewTrack

tracking/src/tracker3d.cpp:245–272  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

243/************************ protected methods ************************/
244
245int
246Tracker3D::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
274void
275Tracker3D::createDistanceMatrix()

Callers

nothing calls this directly

Calls 8

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

Tested by

no test coverage detected