Go to the documentation of this file.
26 #include <SimoxUtility/shapes/OrientedBox.h>
27 #include <SimoxUtility/shapes/XYConstrainedOrientedBox.h>
28 #include <VirtualRobot/VirtualRobot.h>
30 #include <RobotAPI/interface/visualization/DebugDrawerInterface.h>
35 class DebugDrawerHelper;
67 void drawBox(
const std::string& name,
69 const Eigen::Vector3f& size,
70 const DrawColor& color);
72 void drawLine(
const std::string& name,
73 const Eigen::Vector3f& p1,
74 const Eigen::Vector3f& p2,
76 const DrawColor& color);
78 void drawText(
const std::string& name,
79 const Eigen::Vector3f& p1,
80 const std::string& text,
81 const DrawColor& color,
85 const Eigen::Vector3f& pos,
86 const Eigen::Vector3f& direction,
87 const DrawColor& color,
92 const Eigen::Vector3f& position,
94 const DrawColor& color);
97 const std::vector<Eigen::Vector3f>& points,
99 const DrawColor& color);
102 const std::string& robotFile,
103 const std::string& armarxProject,
105 const DrawColor& color);
106 void setRobotConfig(
const std::string& name,
const std::map<std::string, float>& config);
107 void setRobotColor(
const std::string& name,
const DrawColor& color);
112 void drawPoses(
const std::string& prefix,
const std::vector<Eigen::Matrix4f>& poses);
113 void drawPoses(
const std::string& prefix,
114 const std::vector<Eigen::Matrix4f>& poses,
117 void drawBox(
const std::string& name,
118 const Eigen::Vector3f& position,
120 const DrawColor& color);
121 void drawBox(
const std::string& name,
124 const DrawColor& color);
126 template <
class FloatT>
130 const DrawColor& color)
133 box.template transformation_centered<float>(),
134 box.template dimensions<float>(),
138 template <
class FloatT>
141 const simox::XYConstrainedOrientedBox<FloatT>& box,
142 const DrawColor& color)
145 box.template transformation_centered<float>(),
146 box.template dimensions<float>(),
151 drawLine(
const std::string& name,
const Eigen::Vector3f& p1,
const Eigen::Vector3f& p2);
153 void drawLines(
const std::string& prefix,
154 const std::vector<Eigen::Vector3f>& ps,
156 const DrawColor& color);
157 void drawLines(
const std::string& prefix,
const std::vector<Eigen::Vector3f>& ps);
158 void drawLines(
const std::string& prefix,
159 const std::vector<Eigen::Matrix4f>& ps,
161 const DrawColor& color);
162 void drawLines(
const std::string& prefix,
const std::vector<Eigen::Matrix4f>& ps);
167 VirtualRobot::RobotNodePtr
_rn;
211 return cmp < 0 || (cmp == 0 &&
type < rhs.
type);
218 static const DrawColor
Red;
223 static DrawColor
Lerp(
const DrawColor&
a,
const DrawColor& b,
float f);
227 const std::string& layerName,
259 std::set<DrawElement> newElements;
260 std::set<DrawElement> oldElements;
261 bool enableVisu =
true;
263 std::string layerName;
static const DrawColor Orange
void setDefaultFrameToGlobal()
void drawBox(const std::string &name, const Eigen::Matrix4f &pose, const Eigen::Vector3f &size, const DrawColor &color)
void setRobotPose(const std::string &name, const Eigen::Matrix4f &pose)
PosePtr makeGlobal(const Eigen::Matrix4f &pose) const
void drawLines(const std::string &prefix, const std::vector< Eigen::Vector3f > &ps, float width, const DrawColor &color)
void setRobotColor(const std::string &name, const DrawColor &color)
void drawPoses(const std::string &prefix, const std::vector< Eigen::Matrix4f > &poses)
void setDebugDrawer(const DebugDrawerInterfacePrx &drawer)
MatrixXX< 4, 4, float > Matrix4f
void setRobot(const VirtualRobot::RobotPtr &rob)
std::shared_ptr< DebugDrawerHelper > DebugDrawerHelperPtr
void setDefaultFrame(const Eigen::Matrix4f &frame=Eigen::Matrix4f::Identity())
void removeElement(const std::string &name, DrawElementType type)
void drawPose(const std::string &name, const Eigen::Matrix4f &pose)
void drawSphere(const std::string &name, const Eigen::Vector3f &position, float size, const DrawColor &color)
Vector3Ptr makeGlobalDirection(const Eigen::Vector3f &direction) const
void drawText(const std::string &name, const Eigen::Vector3f &p1, const std::string &text, const DrawColor &color, int size)
void drawPointCloud(const std::string &name, const std::vector< Eigen::Vector3f > &points, float pointSize, const DrawColor &color)
This class provides the draw options for a given frame (static Matrix, or a robot node).
Eigen::Vector3f makeGlobalDirectionEigen(const Eigen::Vector3f &direction) const
void Identity(MatrixXX< N, N, T > *a)
double a(double t, double a0, double j)
FrameView(class DebugDrawerHelper &helper, const Eigen::Matrix4f frame=Eigen::Matrix4f::Identity())
class DebugDrawerHelper * _helper
void setVisuEnabled(bool enableVisu)
void drawBox(const std::string &name, const simox::XYConstrainedOrientedBox< FloatT > &box, const DrawColor &color)
void drawLine(const std::string &name, const Eigen::Vector3f &p1, const Eigen::Vector3f &p2, float width, const DrawColor &color)
static const DrawColor Blue
void drawBox(const std::string &name, const simox::OrientedBox< FloatT > &box, const DrawColor &color)
void setRobotConfig(const std::string &name, const std::map< std::string, float > &config)
static const DrawColor Red
VirtualRobot::RobotNodePtr _rn
The DebugDrawerHelper class provides draw functions in a given frame (static matrix or robot node) an...
DebugDrawerHelper(const DebugDrawerInterfacePrx &debugDrawerPrx, const std::string &layerName, const VirtualRobot::RobotPtr &robot)
const DebugDrawerInterfacePrx & getDebugDrawer() const
Eigen::Matrix4f makeGlobalEigen(const Eigen::Matrix4f &pose) const
FrameView inGlobalFrame()
static DrawColor Lerp(const DrawColor &a, const DrawColor &b, float f)
const VirtualRobot::RobotPtr & getRobot() const
static const DrawColor Yellow
bool operator<(const DrawElement &rhs) const
void drawRobot(const std::string &name, const std::string &robotFile, const std::string &armarxProject, const Eigen::Matrix4f &pose, const DrawColor &color)
void drawArrow(const std::string &name, const Eigen::Vector3f &pos, const Eigen::Vector3f &direction, const DrawColor &color, float length, float width)
static const DrawColor Green
FrameView inFrame(const Eigen::Matrix4f &frame=Eigen::Matrix4f::Identity())
This file offers overloads of toIce() and fromIce() functions for STL container types.
Eigen::Matrix4f _fallbackFrame
std::shared_ptr< class Robot > RobotPtr