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#include <string>
26#include <vector>
27
32
34
36{
37
39 {
40 std::optional<Pose> pose;
41 std::string errorMsg; // error message in case the pose is not set
42
44 {
45 }
46
48 {
49 }
50 };
51
52 /*!
53 * \brief Resolve the FramedPose of a location to a global pose.
54 * \param instanceID instance to use if the location is relative to an object class
55 *
56 * When the location is relative to a specific instance the parameter instanceID is ignored.
57 * Otherwise (the location is relative to a object class) it is set as the instance of that class.
58 * The object pose and info is fetched through a network call.
59 * For a cached version see below.
60 */
61 ResolvedLocation resolveLocation(const objpose::ObjectPoseClient& client,
62 const FramedPose& framedPose,
63 const std::string& instanceID = "");
64
65 /*!
66 * \brief Resolve the FramedPose of a location to a global pose.
67 * \param instanceID instance to use if the location is relative to an object class
68 *
69 * When the location is relative to a specific instance the parameter instanceID is ignored.
70 * Otherwise (the location is relative to a object class) it is set as the instance of that class.
71 */
72 ResolvedLocation resolveLocation(const objpose::ObjectPoseMap& objects,
73 const std::vector<ObjectInfo>& info,
74 const FramedPose& framedPose,
75 const std::string& instanceID = "");
76
77} // namespace armarx::navigation::core
The FramedPose class.
Definition FramedPose.h:281
Provides access to the armarx::objpose::ObjectPoseStorageInterface (aka the object memory).
This file is part of ArmarX.
This file is part of ArmarX.
void resolveLocation(Graph::Vertex &vertex, const aron::data::DictPtr &locationData)
Definition Graph.cpp:267
Eigen::Isometry3f Pose
Definition basic_types.h:31
std::map< ObjectID, ObjectPose > ObjectPoseMap
ResolvedLocation(const std::string &errorMsg)