Main MRPT website > C++ reference for MRPT 1.9.9
CObservationVisualLandmarks.cpp
Go to the documentation of this file.
1 /* +------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | http://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2018, Individual contributors, see AUTHORS file |
6  | See: http://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See details in http://www.mrpt.org/License |
8  +------------------------------------------------------------------------+ */
9 
10 #include "vision-precomp.h" // Precompiled headers
11 
14 
15 using namespace mrpt::obs;
16 using namespace mrpt::poses;
17 
18 // This must be added to any CSerializable class implementation file.
20 
21 /** Constructor
22  */
24  : refCameraPose(), landmarks()
25 {
26 }
27 
31 {
32  out << refCameraPose << timestamp
33  // The landmarks:
34  << landmarks << sensorLabel;
35 }
36 
39 {
40  switch (version)
41  {
42  case 0:
43  case 1:
44  {
45  in >> refCameraPose >> timestamp
46 
47  // The landmarks:
48  >> landmarks;
49 
50  if (version > 0)
51  in >> sensorLabel;
52  else
53  sensorLabel = "";
54  }
55  break;
56  default:
58  };
59 }
60 
61 /*---------------------------------------------------------------
62  Inserts a pure virtual method for finding the likelihood between this
63  and another observation, probably only of the same derived class. The
64  operator
65  may be asymmetric.
66 
67  \param anotherObs The other observation to compute likelihood with.
68  \param anotherObsPose If known, the belief about the robot pose when the other
69  observation was taken can be supplied here, or nullptr if it is unknown.
70 
71  \return Returns a likelihood measurement, in the range [0,1].
72  \exception std::exception On any error, as another observation being of an
73  invalid class.
74  ---------------------------------------------------------------*/
76  const CObservation* anotherObs, const CPosePDF* anotherObsPose) const
77 {
78  MRPT_UNUSED_PARAM(anotherObs);
79  MRPT_UNUSED_PARAM(anotherObsPose);
80  return 0;
81 }
82 
84 {
86 }
mrpt::obs::CObservationVisualLandmarks
Declares a class derived from "CObservation" that stores a Landmarks Map as seen from a stereo camera...
Definition: CObservationVisualLandmarks.h:28
CObservationVisualLandmarks.h
mrpt::obs::CObservationVisualLandmarks::serializeTo
void serializeTo(mrpt::serialization::CArchive &out) const override
Pure virtual method for writing (serializing) to an abstract archive.
Definition: CObservationVisualLandmarks.cpp:29
MRPT_UNUSED_PARAM
#define MRPT_UNUSED_PARAM(a)
Determines whether this is an X86 or AMD64 platform.
Definition: common.h:186
uint8_t
unsigned char uint8_t
Definition: rptypes.h:41
mrpt::poses
Classes for 2D/3D geometry representation, both of single values and probability density distribution...
Definition: CHierarchicalMapMHPartition.h:25
vision-precomp.h
mrpt::obs
This namespace contains representation of robot actions and observations.
Definition: CParticleFilter.h:17
mrpt::serialization::CArchive
Virtual base class for "archives": classes abstracting I/O streams.
Definition: CArchive.h:48
mrpt::obs::CObservationVisualLandmarks::serializeGetVersion
uint8_t serializeGetVersion() const override
Must return the current versioning number of the object.
Definition: CObservationVisualLandmarks.cpp:28
mrpt::obs::CObservationVisualLandmarks::getDescriptionAsText
void getDescriptionAsText(std::ostream &o) const override
Build a detailed, multi-line textual description of the observation contents and dump it to the outpu...
Definition: CObservationVisualLandmarks.cpp:83
mrpt::obs::CObservation::getDescriptionAsText
virtual void getDescriptionAsText(std::ostream &o) const
Build a detailed, multi-line textual description of the observation contents and dump it to the outpu...
Definition: CObservation.cpp:44
mrpt::obs::CObservationVisualLandmarks::serializeFrom
void serializeFrom(mrpt::serialization::CArchive &in, uint8_t serial_version) override
Pure virtual method for reading (deserializing) from an abstract archive.
Definition: CObservationVisualLandmarks.cpp:37
IMPLEMENTS_SERIALIZABLE
#define IMPLEMENTS_SERIALIZABLE(class_name, base, NameSpace)
This must be inserted in all CSerializable classes implementation files.
Definition: CSerializable.h:114
mrpt::poses::CPosePDF
Declares a class that represents a probability density function (pdf) of a 2D pose (x,...
Definition: CPosePDF.h:41
mrpt::obs::CObservation
Declares a class that represents any robot's observation.
Definition: CObservation.h:43
in
GLuint in
Definition: glext.h:7274
CArchive.h
MRPT_THROW_UNKNOWN_SERIALIZATION_VERSION
#define MRPT_THROW_UNKNOWN_SERIALIZATION_VERSION(__V)
For use in CSerializable implementations.
Definition: exceptions.h:90
mrpt::obs::CObservationVisualLandmarks::likelihoodWith
float likelihoodWith(const mrpt::obs::CObservation *anotherObs, const mrpt::poses::CPosePDF *anotherObsPose=nullptr) const
Implements the virtual method in charge of finding the likelihood between this and another observatio...
Definition: CObservationVisualLandmarks.cpp:75



Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST