SceneProvider.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 Fabian Reister ( fabian dot reister at kit dot edu )
17 * @date 2022
18 * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
19 * GNU General Public License
20 */
21
22#pragma once
23
24#include <string>
25#include <vector>
26
27#include <VirtualRobot/VirtualRobot.h>
28
30
33
40
42{
43 namespace graph
44 {
45 class Reader;
46 }
47
48 namespace costmap
49 {
50 class Reader;
51 }
52
53 namespace human
54 {
55 class Reader;
56 }
57
59 {
60 class Reader;
61 }
62
63} // namespace armarx::navigation::memory::client
64
66{
67
69 {
70 public:
89
90 struct Config
91 {
92 std::string robotName;
93
94 std::string staticCostmapProviderName = "distance_to_obstacle_costmap_provider";
95 std::string staticCostmapName = "distance_to_obstacles";
96 std::string costmap3dProviderName = "orientation_aware_costmap3d_provider";
97 std::string costmap3dName = "distance_to_obstacles";
98
99 std::string humanProviderName = "dynamic_scene_provider";
100 std::string laserScannerFeaturesProviderName = "dynamic_scene_provider";
101
102 std::vector<std::string> primitiveApproximationModels = {"navigation"};
103 };
104
105 SceneProvider(const InjectedServices& srv, const Config& config);
106
107 const core::Scene& scene() const override;
108
109 bool initialize(const DateTime& timestamp) override;
110 bool synchronize(const DateTime& timestamp, bool fullUpdate) override;
111
112
113 private:
114 VirtualRobot::RobotConstPtr getRobot(const DateTime& timestamp) const;
115 core::StaticScene getStaticScene(const DateTime& timestamp) const;
116 core::DynamicScene getDynamicScene(const DateTime& timestamp);
117 core::SceneGraph getSceneGraph(const DateTime& timestamp) const;
118
119 InjectedServices srv;
120 Config config;
121
122 core::Scene scn;
123
124
125 // internal cache
126 mutable VirtualRobot::SceneObjectSetPtr objects;
127 };
128} // namespace armarx::navigation::server::scene_provider
std::string timestamp()
Represents a point in time.
Definition DateTime.h:25
bool initialize(const DateTime &timestamp) override
bool synchronize(const DateTime &timestamp, bool fullUpdate) override
SceneProvider(const InjectedServices &srv, const Config &config)
Provides access to the armarx::objpose::ObjectPoseStorageInterface (aka the object memory).
This file is part of ArmarX.
Definition Reader.cpp:38
This file is part of ArmarX.
Definition Reader.cpp:25
memory::client::laser_scanner_features::Reader * laserScannerFeaturesReader