35 template <
class OBSERVATION_T>
40 typedef typename OBSERVATION_T::Ptr obs_t;
48 if (observation && observation->GetRuntimeClass()->derivedFrom(class_ID))
50 cobs_ptr = std::dynamic_pointer_cast<OBSERVATION_T>(observation);
56 cobs_ptr = observations->getObservationByClass<OBSERVATION_T>();
60 if (cobs_ptr && sf_ptr)
62 obs_out = priority_to_sf ? sf_ptr : cobs_ptr;
74 obs_out =
typename OBSERVATION_T::Ptr();
std::shared_ptr< CSensoryFrame > Ptr
std::shared_ptr< CObservation > Ptr
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
OBSERVATION_T::Ptr getObservation(mrpt::obs::CSensoryFrame::Ptr &observations, mrpt::obs::CObservation::Ptr &observation, bool priority_to_sf=true)
Given an mrpt::obs::CSensoryFrame and a mrpt::obs::CObservation pointer if a OBSERVATION_T type obser...
A structure that holds runtime class type information.