8#include <viam/sdk/common/mesh.hpp>
9#include <viam/sdk/common/pose.hpp>
10#include <viam/sdk/common/proto_convert.hpp>
11#include <viam/sdk/spatialmath/orientation.hpp>
17class RectangularPrism;
22class GetGeometriesResponse;
34enum class GeometryType { box, sphere, capsule, point, mesh };
40 friend bool operator==(
const box&,
const box&) =
default;
44 friend bool operator==(
const sphere&,
const sphere&) =
default;
53using geometry_specifics = std::variant<struct box, struct sphere, struct capsule, mesh>;
63 double get_theta()
const;
65 const pose& get_pose()
const;
74 const Orientation& get_orientation()
const;
76 const std::string& get_label()
const;
82 geometry_specifics geometry_specifics_;
85 Orientation orientation_;
92 double longitude = 0.0, latitude = 0.0;
95 friend std::ostream& operator<<(std::ostream& os,
const geo_point& v);
101 std::vector<GeometryConfig> geometries;
106namespace proto_convert_details {
110 void operator()(
const box&, common::v1::RectangularPrism*)
const;
115 box operator()(
const common::v1::RectangularPrism*)
const;
120 void operator()(
const sphere&, common::v1::Sphere*)
const;
125 sphere operator()(
const common::v1::Sphere*)
const;
130 void operator()(
const capsule&, common::v1::Capsule*)
const;
135 capsule operator()(
const common::v1::Capsule*)
const;
140 void operator()(
const GeometryConfig&, common::v1::Geometry*)
const;
150 void operator()(
const geo_point&, common::v1::GeoPoint*)
const;
155 geo_point operator()(
const common::v1::GeoPoint*)
const;
160 void operator()(
const geo_geometry&, common::v1::GeoGeometry*)
const;
165 geo_geometry operator()(
const common::v1::GeoGeometry*)
const;
170 std::vector<GeometryConfig> operator()(
const common::v1::GetGeometriesResponse*)
const;
The dimensions of a given geometry and the pose of its center.
Definition geometry.hpp:56
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:36
Definition geometry.hpp:46
Information describing geometries located at a geo_point.
Definition geometry.hpp:99
Definition geometry.hpp:89
Definition proto_convert.hpp:24
Definition proto_convert.hpp:18
Definition geometry.hpp:42