Location.h
Go to the documentation of this file.
1#pragma once
2
3#include <memory>
4#include <optional>
5#include <string>
6
7#include <SimoxUtility/shapes/OrientedBox.h>
8
11
13{
19
21 {
22 std::string source;
23 std::string name;
24
25 LocationId(const std::string& s, const std::string& n) : source(s), name(n)
26 {
27 }
28
29 std::string toString() const;
30 };
31
32 struct Location
33 {
36 std::optional<Names> names;
37
39 const LocationType t,
40 const std::optional<Names>& names = std::nullopt) :
41 id(i), type(t), names(names)
42 {
43 }
44
45 virtual ~Location() = default;
46 };
47
48 struct FramedLocation : public Location
49 {
50 std::string frame;
51 std::string agent;
52 Eigen::Matrix4f pose;
53
55 const LocationType type,
56 const std::string& frame,
57 const std::string& agent,
58 const Eigen::Matrix4f& pose,
59 const std::optional<Names>& names = std::nullopt) :
61 {
62 }
63
64 virtual ~FramedLocation() = default;
65
67 };
68
70 {
71 Eigen::Vector3f extents;
72
74 const LocationType type,
75 const std::string& frame,
76 const std::string& agent,
77 const Eigen::Matrix4f& pose,
78 const Eigen::Vector3f& extents,
79 const std::optional<Names>& names = std::nullopt) :
81 {
82 }
83
84 virtual ~FramedBoxedLocation() = default;
85
87 };
88
89 using FramedBoxedLocationPtr = std::unique_ptr<FramedBoxedLocation>;
90 using FramedLocationPtr = std::unique_ptr<FramedLocation>;
91 using LocationPtr = std::unique_ptr<Location>;
92
93} // namespace armarx::priorknowledge::util
The FramedPose class.
Definition FramedPose.h:281
std::unique_ptr< FramedLocation > FramedLocationPtr
Definition Location.h:90
std::unique_ptr< FramedBoxedLocation > FramedBoxedLocationPtr
Definition Location.h:89
std::unique_ptr< Location > LocationPtr
Definition Location.h:91
FramedBoxedLocation(const LocationId &id, const LocationType type, const std::string &frame, const std::string &agent, const Eigen::Matrix4f &pose, const Eigen::Vector3f &extents, const std::optional< Names > &names=std::nullopt)
Definition Location.h:73
simox::OrientedBox< float > toOrientedBox()
FramedLocation(const LocationId &id, const LocationType type, const std::string &frame, const std::string &agent, const Eigen::Matrix4f &pose, const std::optional< Names > &names=std::nullopt)
Definition Location.h:54
LocationId(const std::string &s, const std::string &n)
Definition Location.h:25
Location(const LocationId &i, const LocationType t, const std::optional< Names > &names=std::nullopt)
Definition Location.h:38
std::optional< Names > names
Definition Location.h:36