MCPcopy Create free account
hub / github.com/RoboMaster/RoboRTS / GetObservations

Method GetObservations

roborts_costmap/src/observation_buffer.cpp:210–220  ·  view source on GitHub ↗

returns a copy of the observations

Source from the content-addressed store, hash-verified

208
209// returns a copy of the observations
210void ObservationBuffer::GetObservations(vector<Observation>& observations)
211{
212 // first... let's make sure that we don't have any stale observations
213 PurgeStaleObservations();
214 // now we'll just copy the observations for the caller
215 list<Observation>::iterator obs_it;
216 for (obs_it = observation_list_.begin(); obs_it != observation_list_.end(); ++obs_it)
217 {
218 observations.push_back(*obs_it);
219 }
220}
221
222void ObservationBuffer::PurgeStaleObservations()
223{

Callers 2

Calls

no outgoing calls

Tested by

no test coverage detected