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



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: 8fe78517f Sun Jul 14 19:43:28 2019 +0200 at lun oct 28 02:10:00 CET 2019