Visu.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  * @package Navigation::ArmarXObjects::NavigationMemory
17  * @author Rainer Kartmann ( rainer dot kartmann at kit dot edu )
18  * @date 2021
19  * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20  * GNU General Public License
21  */
22 
23 #pragma once
24 
25 #include <memory>
26 #include <vector>
27 
33 
36 
38 {
39  class GraphVisu;
40 }
41 
43 {
44 
45  class Visu
46  {
47  public:
54  ~Visu();
55 
56 
57  void drawLocations(std::vector<viz::Layer>& layers, bool enabled);
59  std::vector<viz::Layer>& layers,
60  bool enabled);
61 
62  void drawGraphs(std::vector<viz::Layer>& layers, bool enabled);
63  void drawGraphs(objpose::ObjectPoseClient& objClient,
64  std::vector<viz::Layer>& layers,
65  bool enabled);
66  void drawCostmaps(std::vector<viz::Layer>& layers, bool enabled, float zOffset);
67  void drawHumans(std::vector<viz::Layer>& layers,
68  bool enabled,
69  bool visuTransparent,
70  Duration maxAge);
71 
72  void drawRooms(std::vector<viz::Layer>& layers, bool enabled);
73 
74 
76 
82 
83  std::unique_ptr<navigation::graph::GraphVisu> visu;
84 
85  private:
86  void drawRoom(viz::Layer& layer, const rooms::Room& room, const simox::Color& color) const;
87 
88  void drawLocations(const objpose::ObjectPoseMap& objects,
89  const std::vector<ObjectInfo>& info,
90  viz::Layer& layer);
91  void drawGraphs(const objpose::ObjectPoseMap& objects,
92  const std::vector<ObjectInfo>& info,
93  std::vector<viz::Layer>& layers,
94  bool enabled);
95  };
96 
97 
98 } // namespace armarx::navigation::memory
Client.h
armarx::navigation::memory::Visu::drawLocations
void drawLocations(std::vector< viz::Layer > &layers, bool enabled)
Definition: Visu.cpp:150
armarx::navigation::memory
Definition: ComponentInterface.ice:37
ScopedClient.h
armarx::navigation::memory::Visu::graphSegment
const armem::server::wm::CoreSegment & graphSegment
Definition: Visu.h:78
forward_declarations.h
armarx::navigation::graph
This file is part of ArmarX.
Definition: Visu.h:37
armarx::navigation::memory::Visu::drawCostmaps
void drawCostmaps(std::vector< viz::Layer > &layers, bool enabled, float zOffset)
Definition: Visu.cpp:266
armarx::viz::ScopedClient
viz::Client that will delete (clear) committed layers when destroyed.
Definition: ScopedClient.h:42
armarx::navigation::memory::Visu::arviz
viz::ScopedClient arviz
Definition: Visu.h:75
armarx::objpose::ObjectPoseClient
Provides access to the armarx::objpose::ObjectPoseStorageInterface (aka the object memory).
Definition: ObjectPoseClient.h:18
armarx::navigation::memory::Visu::humanSegment
const armem::server::wm::CoreSegment & humanSegment
Definition: Visu.h:80
armarx::navigation::memory::Visu::drawHumans
void drawHumans(std::vector< viz::Layer > &layers, bool enabled, bool visuTransparent, Duration maxAge)
Definition: Visu.cpp:370
Costmap.h
memory_definitions.h
armarx::navigation::memory::Visu
Definition: Visu.h:45
armarx::navigation::memory::Visu::~Visu
~Visu()
Definition: Visu.cpp:70
armarx::navigation::memory::Visu::Visu
Visu(viz::Client arviz, const armem::server::wm::CoreSegment &locSegment, const armem::server::wm::CoreSegment &graphSegment, const armem::server::wm::CoreSegment &costmapSegment, const armem::server::wm::CoreSegment &humanSegment, const armem::server::wm::CoreSegment &roomsSegment)
Definition: Visu.cpp:54
Color
uint32_t Color
RGBA color.
Definition: color.h:8
armarx::navigation::memory::Visu::locSegment
const armem::server::wm::CoreSegment & locSegment
Definition: Visu.h:77
armarx::navigation::memory::Visu::roomsSegment
const armem::server::wm::CoreSegment & roomsSegment
Definition: Visu.h:81
armarx::navigation::memory::Visu::visu
std::unique_ptr< navigation::graph::GraphVisu > visu
Definition: Visu.h:83
armarx::navigation::graph::GraphVisu
Definition: Visu.h:99
enabled
std::atomic< bool > * enabled
Definition: RemoteGuiWidgetController.cpp:75
ObjectPoseClient.h
armarx::armem::server::wm::CoreSegment
base::CoreSegmentBase
Definition: memory_definitions.h:86
armarx::navigation::memory::Visu::drawRooms
void drawRooms(std::vector< viz::Layer > &layers, bool enabled)
Definition: Visu.cpp:306
types.h
armarx::core::time::Duration
Represents a duration.
Definition: Duration.h:17
armarx::navigation::memory::Visu::drawGraphs
void drawGraphs(std::vector< viz::Layer > &layers, bool enabled)
Definition: Visu.cpp:188
armarx::navigation::memory::Visu::costmapSegment
const armem::server::wm::CoreSegment & costmapSegment
Definition: Visu.h:79
armarx::viz::Client
Definition: Client.h:109
armarx::viz::Layer
Definition: Layer.h:12
armarx::navigation::rooms::Room
Definition: types.h:31
armarx::objpose::ObjectPoseMap
std::map< ObjectID, ObjectPose > ObjectPoseMap
Definition: forward_declarations.h:21