DebugDrawerHelper.cpp
Go to the documentation of this file.
1 /*
2  * This file is part of ArmarX.
3  *
4  * Copyright (C) 2012-2016, High Performance Humanoid Technologies (H2T),
5  * Karlsruhe Institute of Technology (KIT), all rights reserved.
6  *
7  * ArmarX is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License version 2 as
9  * published by the Free Software Foundation.
10  *
11  * ArmarX is distributed in the hope that it will be useful, but
12  * WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program. If not, see <http://www.gnu.org/licenses/>.
18  *
19  * @author Simon Ottenhaus (simon dot ottenhaus at kit dot edu)
20  * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
21  * GNU General Public License
22  */
23 
24 #include "DebugDrawerHelper.h"
25 
26 #include <VirtualRobot/Nodes/RobotNode.h>
27 #include <VirtualRobot/Robot.h>
28 #include <VirtualRobot/math/Helpers.h>
29 
32 
34 
35 using namespace math;
36 
38 {
39  FrameView::FrameView(class DebugDrawerHelper& helper, const Eigen::Matrix4f frame) :
40  _helper{&helper}, _fallbackFrame{frame}
41  {
42  }
43 
44  FrameView::FrameView(class DebugDrawerHelper& helper, const VirtualRobot::RobotNodePtr& rn) :
45  _helper{&helper}, _rn{rn}
46  {
47  }
48 
49  //make global
52  {
54  if (_rn)
55  {
56  return _rn->getGlobalPose(pose);
57  }
58  return _fallbackFrame * pose;
59  }
60 
61  Eigen::Vector3f
62  FrameView::makeGlobalEigen(const Eigen::Vector3f& position) const
63  {
65  if (_rn)
66  {
67  return _rn->getGlobalPosition(position);
68  }
69  return (_fallbackFrame * position.homogeneous()).eval().hnormalized();
70  }
71 
72  Eigen::Vector3f
73  FrameView::makeGlobalDirectionEigen(const Eigen::Vector3f& direction) const
74  {
76  if (_rn)
77  {
78  return ::math::Helpers::TransformDirection(_rn->getGlobalPose(), direction);
79  }
80  return ::math::Helpers::TransformDirection(_fallbackFrame, direction);
81  }
82 
83  PosePtr
85  {
87  return new Pose(makeGlobalEigen(pose));
88  }
89 
91  FrameView::makeGlobal(const Eigen::Vector3f& position) const
92  {
94  return new Vector3(makeGlobalEigen(position));
95  }
96 
98  FrameView::makeGlobalDirection(const Eigen::Vector3f& direction) const
99  {
100  ARMARX_TRACE;
101  return new Vector3(makeGlobalDirectionEigen(direction));
102  }
103 
104  //1st order
106 #define CHECK_AND_ADD(name, type) \
107  if (!_helper->enableVisu) \
108  { \
109  return; \
110  } \
111  _helper->addNewElement(name, type);
112 
113  void
114  FrameView::drawPose(const std::string& name, const Eigen::Matrix4f& pose)
115  {
116  ARMARX_TRACE;
118  _helper->debugDrawerPrx->setPoseVisu(_helper->layerName, name, makeGlobal(pose));
119  }
120 
121  void
122  FrameView::drawPose(const std::string& name, const Eigen::Matrix4f& pose, float scale)
123  {
124  ARMARX_TRACE;
126  _helper->debugDrawerPrx->setScaledPoseVisu(
127  _helper->layerName, name, makeGlobal(pose), scale);
128  }
129 
130  void
131  FrameView::drawBox(const std::string& name,
132  const Eigen::Matrix4f& pose,
133  const Eigen::Vector3f& size,
134  const DrawColor& color)
135  {
136  ARMARX_TRACE;
138  _helper->debugDrawerPrx->setBoxVisu(
139  _helper->layerName, name, makeGlobal(pose), new Vector3(size), color);
140  }
141 
142  void
143  FrameView::drawLine(const std::string& name,
144  const Eigen::Vector3f& p1,
145  const Eigen::Vector3f& p2,
146  float width,
147  const DrawColor& color)
148  {
149  ARMARX_TRACE;
151  _helper->debugDrawerPrx->setLineVisu(
152  _helper->layerName, name, makeGlobal(p1), makeGlobal(p2), width, color);
153  }
154 
155  void
156  FrameView::drawText(const std::string& name,
157  const Eigen::Vector3f& p1,
158  const std::string& text,
159  const DrawColor& color,
160  int size)
161  {
162  ARMARX_TRACE;
164  _helper->debugDrawerPrx->setTextVisu(
165  _helper->layerName, name, text, makeGlobal(p1), color, size);
166  }
167 
168  void
169  FrameView::drawArrow(const std::string& name,
170  const Eigen::Vector3f& pos,
171  const Eigen::Vector3f& direction,
172  const DrawColor& color,
173  float length,
174  float width)
175  {
176  ARMARX_TRACE;
178  _helper->debugDrawerPrx->setArrowVisu(_helper->layerName,
179  name,
180  makeGlobal(pos),
181  makeGlobalDirection(direction),
182  color,
183  length,
184  width);
185  }
186 
187  void
188  FrameView::drawSphere(const std::string& name,
189  const Eigen::Vector3f& position,
190  float size,
191  const DrawColor& color)
192  {
193  ARMARX_TRACE;
194  _helper->debugDrawerPrx->setSphereVisu(
195  _helper->layerName, name, makeGlobal(position), color, size);
196  }
197 
198  void
199  FrameView::drawPointCloud(const std::string& name,
200  const std::vector<Eigen::Vector3f>& points,
201  float pointSize,
202  const DrawColor& color)
203  {
204  ARMARX_TRACE;
206  DebugDrawerColoredPointCloud pc;
207  pc.pointSize = pointSize;
208  for (const Eigen::Vector3f& p : points)
209  {
210  Eigen::Vector3f pg = makeGlobalEigen(p);
211  DebugDrawerColoredPointCloudElement e;
212  e.x = pg(0);
213  e.y = pg(1);
214  e.z = pg(2);
215  e.color =
216  color; //DrawColor24Bit {(Ice::Byte)(color.r * 255), (Ice::Byte)(color.g * 255), (Ice::Byte)(color.b * 255)};
217  pc.points.push_back(e);
218  }
219  _helper->debugDrawerPrx->setColoredPointCloudVisu(_helper->layerName, name, pc);
220  }
221 
222  void
223  FrameView::drawRobot(const std::string& name,
224  const std::string& robotFile,
225  const std::string& armarxProject,
226  const Eigen::Matrix4f& pose,
227  const DrawColor& color)
228  {
229  ARMARX_TRACE;
231  _helper->debugDrawerPrx->setRobotVisu(
232  _helper->layerName, name, robotFile, armarxProject, DrawStyle::FullModel);
233  _helper->debugDrawerPrx->updateRobotPose(_helper->layerName, name, makeGlobal(pose));
234  _helper->debugDrawerPrx->updateRobotColor(_helper->layerName, name, color);
235  }
236 
237  void
238  FrameView::setRobotConfig(const std::string& name, const std::map<std::string, float>& config)
239  {
240  ARMARX_TRACE;
241  _helper->debugDrawerPrx->updateRobotConfig(_helper->layerName, name, config);
242  }
243 
244  void
245  FrameView::setRobotColor(const std::string& name, const DrawColor& color)
246  {
247  ARMARX_TRACE;
248  _helper->debugDrawerPrx->updateRobotColor(_helper->layerName, name, color);
249  }
250 
251  void
252  FrameView::setRobotPose(const std::string& name, const Eigen::Matrix4f& pose)
253  {
254  ARMARX_TRACE;
255  _helper->debugDrawerPrx->updateRobotPose(_helper->layerName, name, makeGlobal(pose));
256  }
257 
258 #undef CHECK_AND_ADD
259 
260  //2nd order
261  void
262  FrameView::drawPoses(const std::string& prefix, const std::vector<Eigen::Matrix4f>& poses)
263  {
264  ARMARX_TRACE;
265  for (std::size_t idx = 0; idx < poses.size(); ++idx)
266  {
267  Eigen::Matrix4f const& pose = poses[idx];
268  drawPose(prefix + std::to_string(idx), pose);
269  }
270  }
271 
272  void
273  FrameView::drawPoses(const std::string& prefix,
274  const std::vector<Eigen::Matrix4f>& poses,
275  float scale)
276  {
277  ARMARX_TRACE;
278  for (std::size_t idx = 0; idx < poses.size(); ++idx)
279  {
280  Eigen::Matrix4f const& pose = poses[idx];
281  drawPose(prefix + std::to_string(idx), pose, scale);
282  }
283  }
284 
285  void
286  FrameView::drawBox(const std::string& name,
287  const Eigen::Vector3f& position,
288  float size,
289  const DrawColor& color)
290  {
291  ARMARX_TRACE;
292  drawBox(name,
293  Helpers::CreatePose(position, Eigen::Matrix3f::Identity()),
294  Eigen::Vector3f(size, size, size),
295  color);
296  }
297 
298  void
299  FrameView::drawBox(const std::string& name,
300  const Eigen::Matrix4f& pose,
301  float size,
302  const DrawColor& color)
303  {
304  ARMARX_TRACE;
305  drawBox(name, pose, Eigen::Vector3f(size, size, size), color);
306  }
307 
308  void
309  FrameView::drawLine(const std::string& name,
310  const Eigen::Vector3f& p1,
311  const Eigen::Vector3f& p2)
312  {
313  ARMARX_TRACE;
315  }
316 
317  void
318  FrameView::drawLines(const std::string& prefix,
319  const std::vector<Eigen::Vector3f>& ps,
320  float width,
321  const DrawColor& color)
322  {
323  ARMARX_TRACE;
324  for (std::size_t idx = 1; idx < ps.size(); ++idx)
325  {
326  drawLine(prefix + std::to_string(idx), ps.at(idx - 1), ps.at(idx), width, color);
327  }
328  }
329 
330  void
331  FrameView::drawLines(const std::string& prefix, const std::vector<Eigen::Vector3f>& ps)
332  {
333  ARMARX_TRACE;
334  for (std::size_t idx = 1; idx < ps.size(); ++idx)
335  {
336  drawLine(prefix + std::to_string(idx), ps.at(idx - 1), ps.at(idx));
337  }
338  }
339 
340  void
341  FrameView::drawLines(const std::string& prefix,
342  const std::vector<Eigen::Matrix4f>& ps,
343  float width,
344  const DrawColor& color)
345  {
346  ARMARX_TRACE;
347  for (std::size_t idx = 1; idx < ps.size(); ++idx)
348  {
349  drawLine(prefix + std::to_string(idx),
350  ps.at(idx - 1).topRightCorner<3, 1>(),
351  ps.at(idx).topRightCorner<3, 1>(),
352  width,
353  color);
354  }
355  }
356 
357  void
358  FrameView::drawLines(const std::string& prefix, const std::vector<Eigen::Matrix4f>& ps)
359  {
360  ARMARX_TRACE;
361  for (std::size_t idx = 1; idx < ps.size(); ++idx)
362  {
363  drawLine(prefix + std::to_string(idx),
364  ps.at(idx - 1).topRightCorner<3, 1>(),
365  ps.at(idx).topRightCorner<3, 1>());
366  }
367  }
368 } // namespace armarx::detail::DebugDrawerHelper
369 
370 namespace armarx
371 {
373  const std::string& layerName,
374  const VirtualRobot::RobotPtr& robot) :
375  FrameView(*this, robot ? robot->getRootNode() : nullptr),
376  debugDrawerPrx(debugDrawerPrx),
377  layerName(layerName),
378  robot(robot)
379  {
380  ARMARX_CHECK_NOT_NULL(debugDrawerPrx);
381  }
382 
383  DebugDrawerHelper::DebugDrawerHelper(const std::string& layerName) :
384  FrameView(*this, nullptr), layerName{layerName}
385  {
386  }
387 
388  //utility
389  void
391  {
392  ARMARX_TRACE;
393  debugDrawerPrx->clearLayer(layerName);
394  oldElements.clear();
395  newElements.clear();
396  }
397 
398  void
400  {
401  ARMARX_TRACE;
402  /*
403  // debug code...
404  std::stringstream ss;
405  ss << "OLD: ";
406  for (const DrawElement& e : oldElements)
407  {
408  ss << e.name << ",";
409  }
410  ss << " NEW: ";
411  for (const DrawElement& e : newElements)
412  {
413  ss << e.name << ",";
414  }
415  ARMARX_IMPORTANT << ss.str();*/
416 
417  for (const DrawElement& old : oldElements)
418  {
419  if (newElements.find(old) == newElements.end())
420  {
421  //ARMARX_IMPORTANT << "removing " << old.name;
422  removeElement(old.name, old.type);
423  }
424  }
425  oldElements = newElements;
426  newElements.clear();
427  }
428 
429  void
431  {
432  this->enableVisu = enableVisu;
433  }
434 
435  void
436  DebugDrawerHelper::removeElement(const std::string& name,
438  {
439  ARMARX_TRACE;
440  switch (type)
441  {
443  debugDrawerPrx->removePoseVisu(layerName, name);
444  return;
446  debugDrawerPrx->removeBoxVisu(layerName, name);
447  return;
449  debugDrawerPrx->removeLineVisu(layerName, name);
450  return;
452  debugDrawerPrx->removeTextVisu(layerName, name);
453  return;
455  debugDrawerPrx->removeArrowVisu(layerName, name);
456  return;
458  debugDrawerPrx->removeColoredPointCloudVisu(layerName, name);
459  return;
461  debugDrawerPrx->removeRobotVisu(layerName, name);
462  return;
463  }
464  }
465 
468  {
469  return robot;
470  }
471 
474  {
475  return debugDrawerPrx;
476  }
477 
478  void
480  {
481  ARMARX_CHECK_NOT_NULL(drawer);
482  debugDrawerPrx = drawer;
483  }
484 
485  void
487  {
488  robot = rob;
489  }
490 
493  {
494  return {*this, frame};
495  }
496 
499  {
500  return {*this, Eigen::Matrix4f::Identity()};
501  }
502 
504  DebugDrawerHelper::inFrame(const std::string& nodeName)
505  {
506  ARMARX_TRACE;
507  ARMARX_CHECK_NOT_NULL(robot);
508  ARMARX_CHECK_EXPRESSION(robot->hasRobotNode(nodeName));
509  return {*this, robot->getRobotNode(nodeName)};
510  }
511 
513  DebugDrawerHelper::inFrame(const VirtualRobot::RobotNodePtr& node)
514  {
515  ARMARX_TRACE;
516  ARMARX_CHECK_NOT_NULL(node);
517  return {*this, node};
518  }
519 
520  void
522  {
523  ARMARX_TRACE;
524  _rn = nullptr;
525  _fallbackFrame = frame;
526  }
527 
528  void
530  {
531  ARMARX_TRACE;
532  _rn = nullptr;
534  }
535 
536  void
537  DebugDrawerHelper::setDefaultFrame(const std::string& nodeName)
538  {
539  ARMARX_TRACE;
540  ARMARX_CHECK_NOT_NULL(robot);
541  ARMARX_CHECK_EXPRESSION(robot->hasRobotNode(nodeName));
542  _rn = robot->getRobotNode(nodeName);
543  }
544 
545  void
546  DebugDrawerHelper::setDefaultFrame(const VirtualRobot::RobotNodePtr& node)
547  {
548  ARMARX_TRACE;
549  ARMARX_CHECK_NOT_NULL(robot);
550  ARMARX_CHECK_EXPRESSION(robot == node->getRobot());
551  _rn = node;
552  }
553 
554  void
555  DebugDrawerHelper::addNewElement(const std::string& name,
557  {
558  ARMARX_TRACE;
559  newElements.insert(DrawElement{name, type});
560  }
561 
562  const DrawColor DebugDrawerHelper::Colors::Red = DrawColor{1, 0, 0, 1};
563  const DrawColor DebugDrawerHelper::Colors::Green = DrawColor{0, 1, 0, 1};
564  const DrawColor DebugDrawerHelper::Colors::Blue = DrawColor{0, 0, 1, 1};
565  const DrawColor DebugDrawerHelper::Colors::Yellow = DrawColor{1, 1, 0, 1};
566  const DrawColor DebugDrawerHelper::Colors::Orange = DrawColor{1, 0.5f, 0, 1};
567 
568  DrawColor
569  DebugDrawerHelper::Colors::Lerp(const DrawColor& a, const DrawColor& b, float f)
570  {
571  return DrawColor{::math::Helpers::Lerp(a.r, b.r, f),
572  ::math::Helpers::Lerp(a.g, b.g, f),
573  ::math::Helpers::Lerp(a.b, b.b, f),
574  ::math::Helpers::Lerp(a.a, b.a, f)};
575  }
576 } // namespace armarx
armarx::DebugDrawerHelper::Colors::Orange
static const DrawColor Orange
Definition: DebugDrawerHelper.h:222
armarx::DebugDrawerHelper::Defaults::lineColor
DrawColor lineColor
Definition: DebugDrawerHelper.h:189
armarx::DebugDrawerHelper::setDefaultFrameToGlobal
void setDefaultFrameToGlobal()
Definition: DebugDrawerHelper.cpp:529
armarx::detail::DebugDrawerHelper::FrameView::drawBox
void drawBox(const std::string &name, const Eigen::Matrix4f &pose, const Eigen::Vector3f &size, const DrawColor &color)
Definition: DebugDrawerHelper.cpp:131
armarx::DebugDrawerHelper::DrawElementType::ColoredPointCloud
@ ColoredPointCloud
armarx::detail::DebugDrawerHelper::FrameView::setRobotPose
void setRobotPose(const std::string &name, const Eigen::Matrix4f &pose)
Definition: DebugDrawerHelper.cpp:252
armarx::detail::DebugDrawerHelper
Definition: DebugDrawerHelper.cpp:37
armarx::detail::DebugDrawerHelper::FrameView::makeGlobal
PosePtr makeGlobal(const Eigen::Matrix4f &pose) const
Definition: DebugDrawerHelper.cpp:84
armarx::navigation::core::Pose
Eigen::Isometry3f Pose
Definition: basic_types.h:31
armarx::detail::DebugDrawerHelper::FrameView::drawLines
void drawLines(const std::string &prefix, const std::vector< Eigen::Vector3f > &ps, float width, const DrawColor &color)
Definition: DebugDrawerHelper.cpp:318
armarx::detail::DebugDrawerHelper::FrameView::setRobotColor
void setRobotColor(const std::string &name, const DrawColor &color)
Definition: DebugDrawerHelper.cpp:245
armarx::detail::DebugDrawerHelper::FrameView::drawPoses
void drawPoses(const std::string &prefix, const std::vector< Eigen::Matrix4f > &poses)
Definition: DebugDrawerHelper.cpp:262
armarx::DebugDrawerHelper::setDebugDrawer
void setDebugDrawer(const DebugDrawerInterfacePrx &drawer)
Definition: DebugDrawerHelper.cpp:479
GfxTL::Matrix4f
MatrixXX< 4, 4, float > Matrix4f
Definition: MatrixXX.h:650
Pose.h
ARMARX_CHECK_NOT_NULL
#define ARMARX_CHECK_NOT_NULL(ptr)
This macro evaluates whether ptr is not null and if it turns out to be false it will throw an Express...
Definition: ExpressionException.h:206
armarx::DebugDrawerHelper::clearLayer
void clearLayer()
Definition: DebugDrawerHelper.cpp:390
armarx::DebugDrawerHelper::setRobot
void setRobot(const VirtualRobot::RobotPtr &rob)
Definition: DebugDrawerHelper.cpp:486
armarx::DebugDrawerHelper::setDefaultFrame
void setDefaultFrame(const Eigen::Matrix4f &frame=Eigen::Matrix4f::Identity())
Definition: DebugDrawerHelper.cpp:521
armarx::DebugDrawerHelper::removeElement
void removeElement(const std::string &name, DrawElementType type)
Definition: DebugDrawerHelper.cpp:436
trace.h
armarx::DebugDrawerHelper::DrawElementType::Arrow
@ Arrow
armarx::detail::DebugDrawerHelper::FrameView::drawPose
void drawPose(const std::string &name, const Eigen::Matrix4f &pose)
Definition: DebugDrawerHelper.cpp:114
armarx::detail::DebugDrawerHelper::FrameView::drawSphere
void drawSphere(const std::string &name, const Eigen::Vector3f &position, float size, const DrawColor &color)
Definition: DebugDrawerHelper.cpp:188
armarx::detail::DebugDrawerHelper::FrameView::makeGlobalDirection
Vector3Ptr makeGlobalDirection(const Eigen::Vector3f &direction) const
Definition: DebugDrawerHelper.cpp:98
armarx::detail::DebugDrawerHelper::FrameView::drawText
void drawText(const std::string &name, const Eigen::Vector3f &p1, const std::string &text, const DrawColor &color, int size)
Definition: DebugDrawerHelper.cpp:156
armarx::detail::DebugDrawerHelper::FrameView::drawPointCloud
void drawPointCloud(const std::string &name, const std::vector< Eigen::Vector3f > &points, float pointSize, const DrawColor &color)
Definition: DebugDrawerHelper.cpp:199
IceInternal::Handle< Pose >
armarx::DebugDrawerHelper::DrawElementType::Box
@ Box
armarx::detail::DebugDrawerHelper::FrameView
This class provides the draw options for a given frame (static Matrix, or a robot node).
Definition: DebugDrawerHelper.h:47
ARMARX_TRACE
#define ARMARX_TRACE
Definition: trace.h:77
armarx::detail::DebugDrawerHelper::FrameView::makeGlobalDirectionEigen
Eigen::Vector3f makeGlobalDirectionEigen(const Eigen::Vector3f &direction) const
Definition: DebugDrawerHelper.cpp:73
GfxTL::Identity
void Identity(MatrixXX< N, N, T > *a)
Definition: MatrixXX.h:570
armarx::ctrlutil::a
double a(double t, double a0, double j)
Definition: CtrlUtil.h:45
armarx::DebugDrawerHelper::Defaults::lineWidth
float lineWidth
Definition: DebugDrawerHelper.h:188
armarx::detail::DebugDrawerHelper::FrameView::FrameView
FrameView(class DebugDrawerHelper &helper, const Eigen::Matrix4f frame=Eigen::Matrix4f::Identity())
Definition: DebugDrawerHelper.cpp:39
armarx::detail::DebugDrawerHelper::FrameView::_helper
class DebugDrawerHelper * _helper
Definition: DebugDrawerHelper.h:165
armarx::DebugDrawerHelper::setVisuEnabled
void setVisuEnabled(bool enableVisu)
Definition: DebugDrawerHelper.cpp:430
armarx::DebugDrawerHelper::cyclicCleanup
void cyclicCleanup()
Definition: DebugDrawerHelper.cpp:399
armarx::detail::DebugDrawerHelper::FrameView::drawLine
void drawLine(const std::string &name, const Eigen::Vector3f &p1, const Eigen::Vector3f &p2, float width, const DrawColor &color)
Definition: DebugDrawerHelper.cpp:143
armarx::DebugDrawerHelper::DrawElementType::Pose
@ Pose
armarx::DebugDrawerHelper::Colors::Blue
static const DrawColor Blue
Definition: DebugDrawerHelper.h:220
armarx::DebugDrawerHelper::DrawElementType::Line
@ Line
armarx::detail::DebugDrawerHelper::FrameView::setRobotConfig
void setRobotConfig(const std::string &name, const std::map< std::string, float > &config)
Definition: DebugDrawerHelper.cpp:238
armarx::DebugDrawerHelper::Colors::Red
static const DrawColor Red
Definition: DebugDrawerHelper.h:218
armarx::detail::DebugDrawerHelper::FrameView::_rn
VirtualRobot::RobotNodePtr _rn
Definition: DebugDrawerHelper.h:167
armarx::DebugDrawerHelper::DrawElement
Definition: DebugDrawerHelper.h:202
armarx::DebugDrawerHelper
The DebugDrawerHelper class provides draw functions in a given frame (static matrix or robot node) an...
Definition: DebugDrawerHelper.h:180
armarx::DebugDrawerHelper::DebugDrawerHelper
DebugDrawerHelper(const DebugDrawerInterfacePrx &debugDrawerPrx, const std::string &layerName, const VirtualRobot::RobotPtr &robot)
Definition: DebugDrawerHelper.cpp:372
armarx::DebugDrawerHelper::defaults
Defaults defaults
Definition: DebugDrawerHelper.h:238
armarx::to_string
const std::string & to_string(const std::string &s)
Definition: StringHelpers.h:41
armarx::DebugDrawerHelper::getDebugDrawer
const DebugDrawerInterfacePrx & getDebugDrawer() const
Definition: DebugDrawerHelper.cpp:473
ExpressionException.h
armarx::detail::DebugDrawerHelper::FrameView::makeGlobalEigen
Eigen::Matrix4f makeGlobalEigen(const Eigen::Matrix4f &pose) const
Definition: DebugDrawerHelper.cpp:51
ARMARX_CHECK_EXPRESSION
#define ARMARX_CHECK_EXPRESSION(expression)
This macro evaluates the expression and if it turns out to be false it will throw an ExpressionExcept...
Definition: ExpressionException.h:73
armarx::DebugDrawerHelper::inGlobalFrame
FrameView inGlobalFrame()
Definition: DebugDrawerHelper.cpp:498
armarx::DebugDrawerHelper::DrawElementType
DrawElementType
Definition: DebugDrawerHelper.h:191
armarx::DebugDrawerHelper::DrawElementType::Text
@ Text
memoryx::KBM::Vector3
Eigen::Vector3d Vector3
Definition: kbm.h:43
armarx::DebugDrawerHelper::Colors::Lerp
static DrawColor Lerp(const DrawColor &a, const DrawColor &b, float f)
Definition: DebugDrawerHelper.cpp:569
IceInternal::ProxyHandle<::IceProxy::armarx::DebugDrawerInterface >
armarx::DebugDrawerHelper::getRobot
const VirtualRobot::RobotPtr & getRobot() const
Definition: DebugDrawerHelper.cpp:467
armarx::DebugDrawerHelper::Colors::Yellow
static const DrawColor Yellow
Definition: DebugDrawerHelper.h:221
CHECK_AND_ADD
#define CHECK_AND_ADD(name, type)
Definition: DebugDrawerHelper.cpp:106
pc
Introduction Thank you for taking interest in our work and downloading this software This library implements the algorithm described in the paper R R R Klein Efficient RANSAC for Point Cloud Shape in Computer Graphics Blackwell June If you use this software you should cite the aforementioned paper in any resulting publication Please send comments or bug reports to Ruwen Roland BUT NOT LIMITED THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY OR CONSEQUENTIAL WHETHER IN STRICT OR EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE Example usage This section shows how to use the library to detect the shapes in a point cloud PointCloud pc
Definition: ReadMe.txt:68
DebugDrawerHelper.h
armarx::detail::DebugDrawerHelper::FrameView::drawRobot
void drawRobot(const std::string &name, const std::string &robotFile, const std::string &armarxProject, const Eigen::Matrix4f &pose, const DrawColor &color)
Definition: DebugDrawerHelper.cpp:223
armarx::detail::DebugDrawerHelper::FrameView::drawArrow
void drawArrow(const std::string &name, const Eigen::Vector3f &pos, const Eigen::Vector3f &direction, const DrawColor &color, float length, float width)
Definition: DebugDrawerHelper.cpp:169
armarx::DebugDrawerHelper::Colors::Green
static const DrawColor Green
Definition: DebugDrawerHelper.h:219
armarx::DebugDrawerHelper::inFrame
FrameView inFrame(const Eigen::Matrix4f &frame=Eigen::Matrix4f::Identity())
Definition: DebugDrawerHelper.cpp:492
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:27
armarx::detail::DebugDrawerHelper::FrameView::_fallbackFrame
Eigen::Matrix4f _fallbackFrame
Definition: DebugDrawerHelper.h:166
VirtualRobot::RobotPtr
std::shared_ptr< class Robot > RobotPtr
Definition: Bus.h:19
armarx::DebugDrawerHelper::DrawElementType::Robot
@ Robot