Here is my code
CObservationPtr obs = CObservationPtr(it->second);
mrpt::slam::CSimplePointsMap theMap;
theMap.insertionOptions.minDistBetweenLaserPoints = 0;
theMap.insertObservation( obs );
At first ,i want to define the
CObservation obs
but i found class CObservation is abstract type,so I have to use CObservationPtr.
bool mrpt::slam::CMetricMap::insertObservation(const mrpt::slam::CObservation*, const mrpt::poses::CPose3D*)
so how can i converts CObservationPtr to CObservation* ?
Thank you
> so how can i converts
> so how can i converts CObservationPtr to CObservation* ?
All "_name_Ptr" classes are smart pointers to "_name_" classes, implemented with STLplus smart pointers.
To recover the "plain" pointer:
CObservationPtr o;
o.pointer(); // ---> "CObservation*"
JL