traversability_generator3d
SoilSample.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <base/Eigen.hpp>
4
6{
7
16
17// Serialize the enum as an integer
18template<class Archive>
19void serialize(Archive & ar, SoilType & type, const unsigned int version) {
20 ar & reinterpret_cast<int&>(type);
21}
22
24{
25public:
26
28 sigmaX(1),
29 sigmaY(1),
30 uncertainty(0),
31 location(0,0,0){};
32
33 base::Vector3d location;
35 double sigmaX,sigmaY;
37
38 bool isValid() const {
39 return (sigmaX > 0 && sigmaY > 0) && (uncertainty >= 0 && uncertainty <= 1);
40 }
41
42 bool operator==(const SoilSample& other) const {
43 return location.isApprox(other.location) &&
44 type == other.type &&
45 sigmaX == other.sigmaX &&
46 sigmaY == other.sigmaY &&
47 uncertainty == other.uncertainty;
48 }
49
50};
51}
Definition SoilSample.hpp:24
double uncertainty
Definition SoilSample.hpp:36
double sigmaX
Definition SoilSample.hpp:35
SoilSample()
Definition SoilSample.hpp:27
SoilType type
Definition SoilSample.hpp:34
bool operator==(const SoilSample &other) const
Definition SoilSample.hpp:42
bool isValid() const
Definition SoilSample.hpp:38
base::Vector3d location
Definition SoilSample.hpp:33
double sigmaY
Definition SoilSample.hpp:35
Definition SoilNode.hpp:9
SoilType
Definition SoilSample.hpp:9
@ ROCKS
Definition SoilSample.hpp:12
@ SAND
Definition SoilSample.hpp:13
@ GRAVEL
Definition SoilSample.hpp:14
@ UNKNOWN_SOIL
Definition SoilSample.hpp:10
@ CONCRETE
Definition SoilSample.hpp:11
void serialize(Archive &ar, SoilType &type, const unsigned int version)
Definition SoilSample.hpp:19