ArVizDrawer.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 RobotComponents::ArmarXObjects::
17 * @author Fabian Reister ( fabian dot reister 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
26#include <Eigen/Geometry>
27
29// TODO(fabian.reister): use forward decl
30#include <RobotComponents/libraries/cartographer/map_registration/MapRegistration.h>
31
32namespace armarx
33{
34
35}
36
37namespace armarx::viz
38{
39 struct Layer;
40}
41
43{
45 {
46 public:
48 virtual ~ArVizDrawer();
49
50 void drawFrames(const Eigen::Affine3f& world_T_map);
51
52 void drawPointCloud(const MapRegistration::PointCloud& cloud,
53 const Eigen::Affine3f& world_T_map);
54
55 void drawClusters(const MapRegistration::Clusters& clusters,
56 const Eigen::Affine3f& world_T_map);
57
58 void drawRobotPoses(const std::vector<Eigen::Affine3f>& robotPoses,
59 const Eigen::Affine3f& world_T_map);
60
61 void drawModels(const std::vector<wykobi::Model>& models);
62
63 void drawModelAssociations(const std::vector<MapRegistration::Association>& associations,
64 const Eigen::Affine3f& world_T_map);
65
66 void drawMapBoundaries(const RotatedRect& boundingRect, const Eigen::Affine3f& world_T_map);
67
68 void drawSelectedBoundingBoxCorner(const Eigen::Affine3f& boundingBoxCornerPose,
69 const Eigen::Affine3f& world_T_map);
70
71 void clear();
72
73 protected:
74 void drawCluster(const MapRegistration::Cluster& cluster,
75 const Eigen::Affine3f& world_T_map,
76 viz::Layer& layer) const;
77
78 void drawRobotPose(const Eigen::Affine3f& robotPose,
79 const Eigen::Affine3f& world_T_map,
80 viz::Layer& layer) const;
81
82 void drawModel(const wykobi::Model& model, viz::Layer& layer) const;
83
84 void drawModelAssociation(const MapRegistration::Association& association,
85 const Eigen::Affine3f& world_T_map,
86 viz::Layer& layer) const;
87
88 private:
89 struct
90 {
91 std::string mapBoundaries{"map_boundaries"};
92 std::string modelSceneAssociations{"model_scene_associations"};
93 std::string sceneModels{"scene_models"};
94 std::string robotPoses{"robot_poses"};
95 std::string selectedBoundingBoxCorner{"selected_bounding_box_corner"};
96 std::string clusters{"clusters"};
97 std::string pointCloud{"point_cloud"};
98 std::string frames{"frames"};
99 } layers;
100 };
101
102} // namespace armarx::cartographer
void drawModelAssociations(const std::vector< MapRegistration::Association > &associations, const Eigen::Affine3f &world_T_map)
void drawCluster(const MapRegistration::Cluster &cluster, const Eigen::Affine3f &world_T_map, viz::Layer &layer) const
void drawClusters(const MapRegistration::Clusters &clusters, const Eigen::Affine3f &world_T_map)
void drawMapBoundaries(const RotatedRect &boundingRect, const Eigen::Affine3f &world_T_map)
void drawPointCloud(const MapRegistration::PointCloud &cloud, const Eigen::Affine3f &world_T_map)
void drawSelectedBoundingBoxCorner(const Eigen::Affine3f &boundingBoxCornerPose, const Eigen::Affine3f &world_T_map)
void drawModel(const wykobi::Model &model, viz::Layer &layer) const
void drawFrames(const Eigen::Affine3f &world_T_map)
ArVizDrawer(armarx::viz::Client &arviz)
void drawRobotPose(const Eigen::Affine3f &robotPose, const Eigen::Affine3f &world_T_map, viz::Layer &layer) const
void drawModelAssociation(const MapRegistration::Association &association, const Eigen::Affine3f &world_T_map, viz::Layer &layer) const
void drawRobotPoses(const std::vector< Eigen::Affine3f > &robotPoses, const Eigen::Affine3f &world_T_map)
void drawModels(const std::vector< wykobi::Model > &models)
viz::Client that will delete (clear) committed layers when destroyed.
Layer layer(std::string const &name) const override
This file is part of ArmarX.
This file offers overloads of toIce() and fromIce() functions for STL container types.