7#include <viam/sdk/common/pose.hpp>
8#include <viam/sdk/common/proto_convert.hpp>
9#include <viam/sdk/spatialmath/orientation.hpp>
15class RectangularPrism;
20class GetGeometriesResponse;
32enum class GeometryType { box, sphere, capsule, point };
38 friend bool operator==(
const box& lhs,
const box& rhs);
42 friend bool operator==(
const sphere& lhs,
const sphere& rhs);
50typedef boost::variant<struct box, struct sphere, struct capsule> geometry_specifics;
60 double get_theta()
const;
62 const pose& get_pose()
const;
71 const Orientation& get_orientation()
const;
73 const std::string& get_label()
const;
79 geometry_specifics geometry_specifics_;
82 Orientation orientation_;
89 double longitude, latitude;
92 friend std::ostream& operator<<(std::ostream& os,
const geo_point& v);
98 std::vector<GeometryConfig> geometries;
103namespace proto_convert_details {
107 void operator()(
const box&, common::v1::RectangularPrism*)
const;
112 box operator()(
const common::v1::RectangularPrism*)
const;
117 void operator()(
const sphere&, common::v1::Sphere*)
const;
122 sphere operator()(
const common::v1::Sphere*)
const;
127 void operator()(
const capsule&, common::v1::Capsule*)
const;
132 capsule operator()(
const common::v1::Capsule*)
const;
137 void operator()(
const GeometryConfig&, common::v1::Geometry*)
const;
147 void operator()(
const geo_point&, common::v1::GeoPoint*)
const;
152 geo_point operator()(
const common::v1::GeoPoint*)
const;
157 void operator()(
const geo_geometry&, common::v1::GeoGeometry*)
const;
162 geo_geometry operator()(
const common::v1::GeoGeometry*)
const;
167 std::vector<GeometryConfig> operator()(
const common::v1::GetGeometriesResponse*)
const;
The dimensions of a given geometry and the pose of its center.
Definition geometry.hpp:53
const geometry_specifics & get_geometry_specifics() const
The concrete geometry type stored in this object.
GeometryType get_geometry_type() const
Type enumerator for the return value of get_geometry_specifics.
Definition geometry.hpp:34
Definition geometry.hpp:44
Information describing geometries located at a geo_point.
Definition geometry.hpp:96
Definition geometry.hpp:86
Definition proto_convert.hpp:24
Definition proto_convert.hpp:18
Definition geometry.hpp:40