LocationUtils.h
Go to the documentation of this file.
1
/**
2
* This file is part of ArmarX.
3
*
4
* ArmarX is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License version 2 as
6
* published by the Free Software Foundation.
7
*
8
* ArmarX is distributed in the hope that it will be useful, but
9
* WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU General Public License for more details.
12
*
13
* You should have received a copy of the GNU General Public License
14
* along with this program. If not, see <http://www.gnu.org/licenses/>.
15
*
16
* @author Tobias Gröger ( tobias dot groeger at student dot kit dot edu )
17
* @date 2023
18
* @copyright http://www.gnu.org/licenses/gpl-2.0.txt
19
* GNU General Public License
20
*/
21
22
#pragma once
23
24
#include <optional>
25
26
#include <
RobotAPI/libraries/ArmarXObjects/ObjectPoseClient.h
>
27
28
#include <
armarx/navigation/core/basic_types.h
>
29
30
namespace
armarx::navigation::core
31
{
32
33
struct
ResolvedLocation
34
{
35
std::optional<Pose>
pose
;
36
std::string
errorMsg
;
// error message in case the pose is not set
37
38
ResolvedLocation
(
const
Pose
&
pose
) :
pose
(
pose
)
39
{
40
}
41
42
ResolvedLocation
(
const
std::string&
errorMsg
) :
errorMsg
(
errorMsg
)
43
{
44
}
45
};
46
47
/*!
48
* \brief Resolve the FramedPose of a location to a global pose.
49
* \param instanceID instance to use if the location is relative to an object class
50
*
51
* When the location is relative to a specific instance the parameter instanceID is ignored.
52
* Otherwise (the location is relative to a object class) it is set as the instance of that class.
53
* The object pose and info is fetched through a network call.
54
* For a cached version see below.
55
*/
56
ResolvedLocation
resolveLocation
(
const
objpose::ObjectPoseClient
& client,
57
const
FramedPose
& framedPose,
58
const
std::string& instanceID =
""
);
59
60
/*!
61
* \brief Resolve the FramedPose of a location to a global pose.
62
* \param instanceID instance to use if the location is relative to an object class
63
*
64
* When the location is relative to a specific instance the parameter instanceID is ignored.
65
* Otherwise (the location is relative to a object class) it is set as the instance of that class.
66
*/
67
ResolvedLocation
resolveLocation
(
const
objpose::ObjectPoseMap
& objects,
68
const
std::vector<ObjectInfo>& info,
69
const
FramedPose
& framedPose,
70
const
std::string& instanceID =
""
);
71
72
}
// namespace armarx::navigation::core
armarx::navigation::core::ResolvedLocation::ResolvedLocation
ResolvedLocation(const std::string &errorMsg)
Definition:
LocationUtils.h:42
armarx::navigation::core::ResolvedLocation::errorMsg
std::string errorMsg
Definition:
LocationUtils.h:36
armarx::navigation::core::resolveLocation
void resolveLocation(Graph::Vertex &vertex, const aron::data::DictPtr &locationData)
Definition:
Graph.cpp:244
armarx::navigation::core::Pose
Eigen::Isometry3f Pose
Definition:
basic_types.h:31
basic_types.h
armarx::FramedPose
The FramedPose class.
Definition:
FramedPose.h:258
armarx::navigation::core
This file is part of ArmarX.
Definition:
aron_conversions.cpp:13
armarx::objpose::ObjectPoseClient
Provides access to the armarx::objpose::ObjectPoseStorageInterface (aka the object memory).
Definition:
ObjectPoseClient.h:18
armarx::navigation::core::ResolvedLocation::ResolvedLocation
ResolvedLocation(const Pose &pose)
Definition:
LocationUtils.h:38
armarx::navigation::core::ResolvedLocation
Definition:
LocationUtils.h:33
armarx::navigation::core::ResolvedLocation::pose
std::optional< Pose > pose
Definition:
LocationUtils.h:35
ObjectPoseClient.h
armarx::objpose::ObjectPoseMap
std::map< ObjectID, ObjectPose > ObjectPoseMap
Definition:
forward_declarations.h:21
armarx
navigation
core
LocationUtils.h
Generated on Sat Oct 5 2024 09:14:07 for armarx_documentation by
1.8.17