Go to the documentation of this file.
26 #include <VirtualRobot/Robot.h>
27 #include <SimoxUtility/shapes/OrientedBox.h>
28 #include <SimoxUtility/shapes/XYConstrainedOrientedBox.h>
30 #include <RobotAPI/interface/visualization/DebugDrawerInterface.h>
35 class DebugDrawerHelper;
66 void drawBox(
const std::string& name,
const Eigen::Matrix4f& pose,
const Eigen::Vector3f& size,
const DrawColor& color);
68 void drawLine(
const std::string& name,
const Eigen::Vector3f& p1,
const Eigen::Vector3f& p2,
float width,
const DrawColor& color);
70 void drawText(
const std::string& name,
const Eigen::Vector3f& p1,
const std::string& text,
const DrawColor& color,
int size);
72 void drawArrow(
const std::string& name,
const Eigen::Vector3f& pos,
const Eigen::Vector3f& direction,
const DrawColor& color,
float length,
float width);
74 void drawSphere(
const std::string& name,
const Eigen::Vector3f& position,
float size,
const DrawColor& color);
76 void drawPointCloud(
const std::string& name,
const std::vector<Eigen::Vector3f>& points,
float pointSize,
const DrawColor& color);
78 void drawRobot(
const std::string& name,
const std::string& robotFile,
const std::string& armarxProject,
const Eigen::Matrix4f& pose,
const DrawColor& color);
79 void setRobotConfig(
const std::string& name,
const std::map<std::string, float>& config);
80 void setRobotColor(
const std::string& name,
const DrawColor& color);
85 void drawPoses(
const std::string& prefix,
const std::vector<Eigen::Matrix4f>& poses);
86 void drawPoses(
const std::string& prefix,
const std::vector<Eigen::Matrix4f>& poses,
float scale);
88 void drawBox(
const std::string& name,
const Eigen::Vector3f& position,
float size,
const DrawColor& color);
90 template<
class FloatT>
93 drawBox(name, box.template transformation_centered<float>(), box.template dimensions<float>(), color);
95 template<
class FloatT>
96 void drawBox(
const std::string& name,
const simox::XYConstrainedOrientedBox<FloatT>& box,
const DrawColor& color)
98 drawBox(name, box.template transformation_centered<float>(), box.template dimensions<float>(), color);
102 void drawLine(
const std::string& name,
const Eigen::Vector3f& p1,
const Eigen::Vector3f& p2);
104 void drawLines(
const std::string& prefix,
const std::vector<Eigen::Vector3f>& ps,
float width,
const DrawColor& color);
105 void drawLines(
const std::string& prefix,
const std::vector<Eigen::Vector3f>& ps);
106 void drawLines(
const std::string& prefix,
const std::vector<Eigen::Matrix4f>& ps,
float width,
const DrawColor& color);
107 void drawLines(
const std::string& prefix,
const std::vector<Eigen::Matrix4f>& ps);
111 VirtualRobot::RobotNodePtr
_rn;
145 return cmp < 0 || (cmp == 0 &&
type < rhs.
type);
151 static const DrawColor
Red;
156 static DrawColor
Lerp(
const DrawColor&
a,
const DrawColor& b,
float f);
190 std::set<DrawElement> newElements;
191 std::set<DrawElement> oldElements;
192 bool enableVisu =
true;
194 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)
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
MatrixXX< 4, 4, float > Matrix4f
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