ArmarXVisualizer.h
Go to the documentation of this file.
1#pragma once
2
4
5#include <RobotAPI/interface/visualization/DebugDrawerInterface.h>
6
7#include <SemanticObjectRelations/Hooks/VisualizerInterface.h>
8
9namespace armarx::semantic
10{
11
12 /**
13 * @brief Implementation of semrel::VisualizerInterface for ArmarX
14 * (using the DebugDrawer).
15 */
16 class ArmarXVisualizer : public semrel::VisualizerInterface
17 {
18 public:
19 static void setAsImplementation(const armarx::DebugDrawerInterfacePrx& debugDrawer);
20
22
23 virtual void clearAll() override;
24 virtual void clearLayer(const std::string& layer) override;
25
26 virtual void drawLine(semrel::VisuMetaInfo id,
27 const Eigen::Vector3f& start,
28 const Eigen::Vector3f& end,
29 float lineWidth,
30 semrel::DrawColor color) override;
31 virtual void drawArrow(semrel::VisuMetaInfo id,
32 const Eigen::Vector3f& origin,
33 const Eigen::Vector3f& direction,
34 float length,
35 float width,
36 semrel::DrawColor color) override;
37 virtual void
38 drawBox(semrel::VisuMetaInfo id, const semrel::Box& box, semrel::DrawColor color) override;
39 virtual void drawCylinder(semrel::VisuMetaInfo id,
40 const semrel::Cylinder& cylinder,
41 semrel::DrawColor color) override;
42 virtual void drawSphere(semrel::VisuMetaInfo id,
43 const semrel::Sphere& sphere,
44 semrel::DrawColor color) override;
45 virtual void drawPolygon(semrel::VisuMetaInfo id,
46 const std::vector<Eigen::Vector3f>& polygonPoints,
47 float lineWidth,
48 semrel::DrawColor colorInner,
49 semrel::DrawColor colorBorder) override;
50 virtual void drawTriMesh(semrel::VisuMetaInfo id,
51 const semrel::TriMesh& mesh,
52 semrel::DrawColor color) override;
53 virtual void drawText(semrel::VisuMetaInfo id,
54 const std::string& text,
55 const Eigen::Vector3f& position,
56 float size,
57 semrel::DrawColor color) override;
58 virtual void drawPointCloud(semrel::VisuMetaInfo id,
59 const std::vector<Eigen::Vector3f>& cloud,
60 float pointSize,
61 semrel::DrawColor color) override;
62
63 private:
65 };
66} // namespace armarx::semantic
67
69{
70 extern const std::string visualizationLevelName;
71 extern const std::string visualizationLevelDescription;
72} // namespace armarx::semantic::properties::defaults
73
75{
76
79 const std::string& propertyName = defaults::visualizationLevelName,
80 semrel::VisuLevel defaultLevel = semrel::VisuLevel::RESULT,
81 const std::string& description = defaults::visualizationLevelDescription);
82
83 semrel::VisuLevel
85 const std::string& propertyName = defaults::visualizationLevelName);
86
88 const std::string& propertyName = defaults::visualizationLevelName);
89
90} // namespace armarx::semantic::properties
Default component property definition container.
Definition Component.h:70
Abstract PropertyUser class.
virtual void drawCylinder(semrel::VisuMetaInfo id, const semrel::Cylinder &cylinder, semrel::DrawColor color) override
virtual void drawLine(semrel::VisuMetaInfo id, const Eigen::Vector3f &start, const Eigen::Vector3f &end, float lineWidth, semrel::DrawColor color) override
virtual void clearLayer(const std::string &layer) override
virtual void drawPointCloud(semrel::VisuMetaInfo id, const std::vector< Eigen::Vector3f > &cloud, float pointSize, semrel::DrawColor color) override
virtual void drawPolygon(semrel::VisuMetaInfo id, const std::vector< Eigen::Vector3f > &polygonPoints, float lineWidth, semrel::DrawColor colorInner, semrel::DrawColor colorBorder) override
virtual void drawTriMesh(semrel::VisuMetaInfo id, const semrel::TriMesh &mesh, semrel::DrawColor color) override
virtual void drawText(semrel::VisuMetaInfo id, const std::string &text, const Eigen::Vector3f &position, float size, semrel::DrawColor color) override
virtual void drawBox(semrel::VisuMetaInfo id, const semrel::Box &box, semrel::DrawColor color) override
virtual void drawArrow(semrel::VisuMetaInfo id, const Eigen::Vector3f &origin, const Eigen::Vector3f &direction, float length, float width, semrel::DrawColor color) override
ArmarXVisualizer(armarx::DebugDrawerInterfacePrx const &debugDrawer)
virtual void drawSphere(semrel::VisuMetaInfo id, const semrel::Sphere &sphere, semrel::DrawColor color) override
static void setAsImplementation(const armarx::DebugDrawerInterfacePrx &debugDrawer)
const std::string visualizationLevelDescription
semrel::VisuLevel getVisualizationLevel(armarx::PropertyUser &defs, const std::string &propertyName=defaults::visualizationLevelName)
void defineVisualizationLevel(armarx::ComponentPropertyDefinitions &defs, const std::string &propertyName=defaults::visualizationLevelName, semrel::VisuLevel defaultLevel=semrel::VisuLevel::RESULT, const std::string &description=defaults::visualizationLevelDescription)
void setMinimumVisuLevel(armarx::PropertyUser &defs, const std::string &propertyName=defaults::visualizationLevelName)
::IceInternal::ProxyHandle<::IceProxy::armarx::DebugDrawerInterface > DebugDrawerInterfacePrx