class mrpt::maps::CLandmarksMap
Overview
A minimal landmarks map: a container of CLandmark objects.
This is a simplified version for MRPT v3.0, retaining only the functionality needed and removing the computer vision part.
#include <mrpt/maps/CLandmarksMap.h> class CLandmarksMap: public mrpt::maps::CMetricMap { public: // typedefs typedef std::shared_ptr<mrpt::maps ::CLandmarksMap> Ptr; typedef std::shared_ptr<const mrpt::maps ::CLandmarksMap> ConstPtr; typedef std::unique_ptr<mrpt::maps ::CLandmarksMap> UniquePtr; typedef std::unique_ptr<const mrpt::maps ::CLandmarksMap> ConstUniquePtr; typedef CLandmark landmark_type; // structs struct TLandmarksList; // fields static constexpr const char* className = "mrpt::maps" "::" "CLandmarksMap"; TLandmarksList landmarks; // construction CLandmarksMap(); // methods static constexpr auto getClassName(); static const mrpt::rtti::TRuntimeClassId& GetRuntimeClassIdStatic(); static std::shared_ptr<CObject> CreateObject(); template <typename... Args> static Ptr Create(Args&&... args); template <typename Alloc, typename... Args> static Ptr CreateAlloc( const Alloc& alloc, Args&&... args ); template <typename... Args> static UniquePtr CreateUnique(Args&&... args); virtual const mrpt::rtti::TRuntimeClassId* GetRuntimeClass() const; virtual mrpt::rtti::CObject* clone() const; void simulateRangeBearingReadings( const mrpt::poses::CPose3D& robotPose, const mrpt::poses::CPose3D& sensorOnRobot, mrpt::obs::CObservationBearingRange& obs, bool sensorDistinguishesLandmarks = true, double sigmaRange = 0, double sigmaYaw = 0, double sigmaPitch = 0, std::vector<size_t>* out_indices = nullptr, double spuriousMean = 0, double spuriousStd = 0 ) const; size_t size() const; virtual bool isEmpty() const; virtual std::string asString() const; virtual void getVisualizationInto(mrpt::viz::CSetOfObjects& o) const; virtual void saveMetricMapRepresentationToFile(const std::string& filNamePrefix) const; };
Inherited Members
public: // typedefs typedef std::shared_ptr<CObject> Ptr; typedef std::shared_ptr<const CObject> ConstPtr; typedef std::shared_ptr<CSerializable> Ptr; typedef std::shared_ptr<const CSerializable> ConstPtr; // methods static const mrpt::rtti::TRuntimeClassId& GetRuntimeClassIdStatic(); virtual const mrpt::rtti::TRuntimeClassId* GetRuntimeClass() const; virtual const mrpt::rtti::TRuntimeClassId* GetRuntimeClass() const; static const mrpt::rtti::TRuntimeClassId& GetRuntimeClassIdStatic(); Visualizable& operator = (const Visualizable&); Visualizable& operator = (Visualizable&&); virtual const mrpt::rtti::TRuntimeClassId* GetRuntimeClass() const; virtual bool isEmpty() const = 0; virtual void saveMetricMapRepresentationToFile(const std::string& filNamePrefix) const = 0; virtual std::string asString() const = 0; virtual void getVisualizationInto(mrpt::viz::CSetOfObjects& o) const = 0;
Typedefs
typedef std::shared_ptr<mrpt::maps ::CLandmarksMap> Ptr
A type for the associated smart pointer.
Methods
virtual const mrpt::rtti::TRuntimeClassId* GetRuntimeClass() const
Returns information about the class of an object in runtime.
virtual mrpt::rtti::CObject* clone() const
Returns a deep copy (clone) of the object, indepently of its class.
void simulateRangeBearingReadings( const mrpt::poses::CPose3D& robotPose, const mrpt::poses::CPose3D& sensorOnRobot, mrpt::obs::CObservationBearingRange& obs, bool sensorDistinguishesLandmarks = true, double sigmaRange = 0, double sigmaYaw = 0, double sigmaPitch = 0, std::vector<size_t>* out_indices = nullptr, double spuriousMean = 0, double spuriousStd = 0 ) const
Simulate a range-bearing sensor observation from this landmark map.
Parameters:
robotPose |
Global pose of the robot. |
sensorOnRobot |
Pose of the sensor relative to the robot. |
obs |
Output observation (sensedData will be filled). obs.fieldOfView_yaw, maxSensorDistance, minSensorDistance must be set by the caller. |
sensorDistinguishesLandmarks |
If true, each observation has the actual landmark ID; if false, they are all set to -1. |
sigmaRange |
Noise standard deviation for range (meters). |
sigmaYaw |
Noise standard deviation for yaw (radians). |
sigmaPitch |
Noise standard deviation for pitch (radians, use 0 for 2D). |
out_indices |
If non-null, stores the GT landmark index for each observation; spurious detections get index std::string::npos. |
spuriousMean |
Mean number of spurious detections. |
spuriousStd |
Std of the number of spurious detections. |
virtual bool isEmpty() const
Returns true if the map is empty/no observation has been inserted.
virtual std::string asString() const
Returns a human-friendly textual description of the object.
For classes with a large/complex internal state, only a summary should be returned instead of the exhaustive enumeration of all data members.
virtual void getVisualizationInto(mrpt::viz::CSetOfObjects& o) const
Inserts 3D primitives representing this object into the provided container.
Note that the former contents of o are not cleared.
See also:
virtual void saveMetricMapRepresentationToFile(const std::string& filNamePrefix) const
This virtual method saves the map to a file “filNamePrefix”+< some_file_extension >, as an image or in any other applicable way (Notice that other methods to save the map may be implemented in classes implementing this virtual interface).