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/math/Helpers.h>
27 
30 
32 
33 using namespace math;
34 
36 {
37  FrameView::FrameView(class DebugDrawerHelper& helper, const Eigen::Matrix4f frame) :
38  _helper{&helper},
39  _fallbackFrame{frame}
40  {}
41  FrameView::FrameView(class DebugDrawerHelper& helper, const VirtualRobot::RobotNodePtr& rn) :
42  _helper{&helper},
43  _rn{rn}
44  {}
45  //make global
47  {
49  if (_rn)
50  {
51  return _rn->getGlobalPose(pose);
52  }
53  return _fallbackFrame * pose;
54  }
55  Eigen::Vector3f FrameView::makeGlobalEigen(const Eigen::Vector3f& position) const
56  {
58  if (_rn)
59  {
60  return _rn->getGlobalPosition(position);
61  }
62  return (_fallbackFrame * position.homogeneous()).eval().hnormalized();
63  }
64  Eigen::Vector3f FrameView::makeGlobalDirectionEigen(const Eigen::Vector3f& direction) const
65  {
67  if (_rn)
68  {
69  return ::math::Helpers::TransformDirection(_rn->getGlobalPose(), direction);
70  }
71  return ::math::Helpers::TransformDirection(_fallbackFrame, direction);
72  }
74  {
76  return new Pose(makeGlobalEigen(pose));
77  }
78  Vector3Ptr FrameView::makeGlobal(const Eigen::Vector3f& position) const
79  {
81  return new Vector3(makeGlobalEigen(position));
82  }
83  Vector3Ptr FrameView::makeGlobalDirection(const Eigen::Vector3f& direction) const
84  {
86  return new Vector3(makeGlobalDirectionEigen(direction));
87  }
88 
89  //1st order
91 #define CHECK_AND_ADD(name,type) if (!_helper->enableVisu) {return;} _helper->addNewElement(name,type);
92 
93  void FrameView::drawPose(const std::string& name, const Eigen::Matrix4f& pose)
94  {
97  _helper->debugDrawerPrx->setPoseVisu(_helper->layerName, name, makeGlobal(pose));
98  }
99 
100  void FrameView::drawPose(const std::string& name, const Eigen::Matrix4f& pose, float scale)
101  {
102  ARMARX_TRACE;
104  _helper->debugDrawerPrx->setScaledPoseVisu(_helper->layerName, name, makeGlobal(pose), scale);
105  }
106 
107  void FrameView::drawBox(const std::string& name, const Eigen::Matrix4f& pose, const Eigen::Vector3f& size, const DrawColor& color)
108  {
109  ARMARX_TRACE;
111  _helper->debugDrawerPrx->setBoxVisu(_helper->layerName, name, makeGlobal(pose), new Vector3(size), color);
112  }
113 
114  void FrameView::drawLine(const std::string& name, const Eigen::Vector3f& p1, const Eigen::Vector3f& p2, float width, const DrawColor& color)
115  {
116  ARMARX_TRACE;
118  _helper->debugDrawerPrx->setLineVisu(_helper->layerName, name, makeGlobal(p1), makeGlobal(p2), width, color);
119  }
120 
121  void FrameView::drawText(const std::string& name, const Eigen::Vector3f& p1, const std::string& text, const DrawColor& color, int size)
122  {
123  ARMARX_TRACE;
125  _helper->debugDrawerPrx->setTextVisu(_helper->layerName, name, text, makeGlobal(p1), color, size);
126  }
127 
128  void FrameView::drawArrow(const std::string& name, const Eigen::Vector3f& pos, const Eigen::Vector3f& direction, const DrawColor& color, float length, float width)
129  {
130  ARMARX_TRACE;
132  _helper->debugDrawerPrx->setArrowVisu(_helper->layerName, name, makeGlobal(pos), makeGlobalDirection(direction), color, length, width);
133  }
134 
135  void FrameView::drawSphere(const std::string& name, const Eigen::Vector3f& position, float size, const DrawColor& color)
136  {
137  ARMARX_TRACE;
138  _helper->debugDrawerPrx->setSphereVisu(_helper->layerName, name, makeGlobal(position), color, size);
139  }
140 
141  void FrameView::drawPointCloud(const std::string& name, const std::vector<Eigen::Vector3f>& points, float pointSize, const DrawColor& color)
142  {
143  ARMARX_TRACE;
145  DebugDrawerColoredPointCloud pc;
146  pc.pointSize = pointSize;
147  for (const Eigen::Vector3f& p : points)
148  {
149  Eigen::Vector3f pg = makeGlobalEigen(p);
150  DebugDrawerColoredPointCloudElement e;
151  e.x = pg(0);
152  e.y = pg(1);
153  e.z = pg(2);
154  e.color = color; //DrawColor24Bit {(Ice::Byte)(color.r * 255), (Ice::Byte)(color.g * 255), (Ice::Byte)(color.b * 255)};
155  pc.points.push_back(e);
156  }
157  _helper->debugDrawerPrx->setColoredPointCloudVisu(_helper->layerName, name, pc);
158  }
159 
160  void FrameView::drawRobot(const std::string& name, const std::string& robotFile, const std::string& armarxProject, const Eigen::Matrix4f& pose, const DrawColor& color)
161  {
162  ARMARX_TRACE;
164  _helper->debugDrawerPrx->setRobotVisu(_helper->layerName, name, robotFile, armarxProject, DrawStyle::FullModel);
165  _helper->debugDrawerPrx->updateRobotPose(_helper->layerName, name, makeGlobal(pose));
166  _helper->debugDrawerPrx->updateRobotColor(_helper->layerName, name, color);
167  }
168 
169  void FrameView::setRobotConfig(const std::string& name, const std::map<std::string, float>& config)
170  {
171  ARMARX_TRACE;
172  _helper->debugDrawerPrx->updateRobotConfig(_helper->layerName, name, config);
173  }
174  void FrameView::setRobotColor(const std::string& name, const DrawColor& color)
175  {
176  ARMARX_TRACE;
177  _helper->debugDrawerPrx->updateRobotColor(_helper->layerName, name, color);
178  }
179  void FrameView::setRobotPose(const std::string& name, const Eigen::Matrix4f& pose)
180  {
181  ARMARX_TRACE;
182  _helper->debugDrawerPrx->updateRobotPose(_helper->layerName, name, makeGlobal(pose));
183  }
184 #undef CHECK_AND_ADD
185 
186  //2nd order
187  void FrameView::drawPoses(const std::string& prefix, const std::vector<Eigen::Matrix4f>& poses)
188  {
189  ARMARX_TRACE;
190  for (std::size_t idx = 0; idx < poses.size(); ++idx)
191  {
192  Eigen::Matrix4f const& pose = poses[idx];
193  drawPose(prefix + std::to_string(idx), pose);
194  }
195  }
196  void FrameView::drawPoses(const std::string& prefix, const std::vector<Eigen::Matrix4f>& poses, float scale)
197  {
198  ARMARX_TRACE;
199  for (std::size_t idx = 0; idx < poses.size(); ++idx)
200  {
201  Eigen::Matrix4f const& pose = poses[idx];
202  drawPose(prefix + std::to_string(idx), pose, scale);
203  }
204  }
205 
206  void FrameView::drawBox(const std::string& name, const Eigen::Vector3f& position, float size, const DrawColor& color)
207  {
208  ARMARX_TRACE;
209  drawBox(name, Helpers::CreatePose(position, Eigen::Matrix3f::Identity()), Eigen::Vector3f(size, size, size), color);
210  }
211 
212  void FrameView::drawBox(const std::string& name, const Eigen::Matrix4f& pose, float size, const DrawColor& color)
213  {
214  ARMARX_TRACE;
215  drawBox(name, pose, Eigen::Vector3f(size, size, size), color);
216  }
217 
218  void FrameView::drawLine(const std::string& name, const Eigen::Vector3f& p1, const Eigen::Vector3f& p2)
219  {
220  ARMARX_TRACE;
222  }
223 
224  void FrameView::drawLines(const std::string& prefix, const std::vector<Eigen::Vector3f>& ps, float width, const DrawColor& color)
225  {
226  ARMARX_TRACE;
227  for (std::size_t idx = 1; idx < ps.size(); ++idx)
228  {
229  drawLine(prefix + std::to_string(idx), ps.at(idx - 1), ps.at(idx), width, color);
230  }
231  }
232  void FrameView::drawLines(const std::string& prefix, const std::vector<Eigen::Vector3f>& ps)
233  {
234  ARMARX_TRACE;
235  for (std::size_t idx = 1; idx < ps.size(); ++idx)
236  {
237  drawLine(prefix + std::to_string(idx), ps.at(idx - 1), ps.at(idx));
238  }
239  }
240  void FrameView::drawLines(const std::string& prefix, const std::vector<Eigen::Matrix4f>& ps, float width, const DrawColor& color)
241  {
242  ARMARX_TRACE;
243  for (std::size_t idx = 1; idx < ps.size(); ++idx)
244  {
245  drawLine(prefix + std::to_string(idx),
246  ps.at(idx - 1).topRightCorner<3, 1>(),
247  ps.at(idx).topRightCorner<3, 1>(),
248  width, color);
249  }
250  }
251  void FrameView::drawLines(const std::string& prefix, const std::vector<Eigen::Matrix4f>& ps)
252  {
253  ARMARX_TRACE;
254  for (std::size_t idx = 1; idx < ps.size(); ++idx)
255  {
256  drawLine(prefix + std::to_string(idx),
257  ps.at(idx - 1).topRightCorner<3, 1>(),
258  ps.at(idx).topRightCorner<3, 1>());
259  }
260  }
261 }
262 
263 namespace armarx
264 {
266  const DebugDrawerInterfacePrx& debugDrawerPrx,
267  const std::string& layerName,
268  const VirtualRobot::RobotPtr& robot
269  ) :
270  FrameView(*this, robot ? robot->getRootNode() : nullptr),
271  debugDrawerPrx(debugDrawerPrx), layerName(layerName), robot(robot)
272  {
273  ARMARX_CHECK_NOT_NULL(debugDrawerPrx);
274  }
275 
276  DebugDrawerHelper::DebugDrawerHelper(const std::string& layerName) :
277  FrameView(*this, nullptr),
278  layerName{layerName}
279  {}
280  //utility
282  {
283  ARMARX_TRACE;
284  debugDrawerPrx->clearLayer(layerName);
285  oldElements.clear();
286  newElements.clear();
287  }
288 
290  {
291  ARMARX_TRACE;
292  /*
293  // debug code...
294  std::stringstream ss;
295  ss << "OLD: ";
296  for (const DrawElement& e : oldElements)
297  {
298  ss << e.name << ",";
299  }
300  ss << " NEW: ";
301  for (const DrawElement& e : newElements)
302  {
303  ss << e.name << ",";
304  }
305  ARMARX_IMPORTANT << ss.str();*/
306 
307  for (const DrawElement& old : oldElements)
308  {
309  if (newElements.find(old) == newElements.end())
310  {
311  //ARMARX_IMPORTANT << "removing " << old.name;
312  removeElement(old.name, old.type);
313  }
314  }
315  oldElements = newElements;
316  newElements.clear();
317  }
318 
319  void DebugDrawerHelper::setVisuEnabled(bool enableVisu)
320  {
321  this->enableVisu = enableVisu;
322  }
323 
325  {
326  ARMARX_TRACE;
327  switch (type)
328  {
330  debugDrawerPrx->removePoseVisu(layerName, name);
331  return;
333  debugDrawerPrx->removeBoxVisu(layerName, name);
334  return;
336  debugDrawerPrx->removeLineVisu(layerName, name);
337  return;
339  debugDrawerPrx->removeTextVisu(layerName, name);
340  return;
342  debugDrawerPrx->removeArrowVisu(layerName, name);
343  return;
345  debugDrawerPrx->removeColoredPointCloudVisu(layerName, name);
346  return;
348  debugDrawerPrx->removeRobotVisu(layerName, name);
349  return;
350  }
351  }
352 
354  {
355  return robot;
356  }
357 
359  {
360  return debugDrawerPrx;
361  }
362 
364  {
365  ARMARX_CHECK_NOT_NULL(drawer);
366  debugDrawerPrx = drawer;
367  }
368 
370  {
371  robot = rob;
372  }
373 
375  {
376  return {*this, frame};
377  }
379  {
380  return {*this, Eigen::Matrix4f::Identity()};
381  }
383  {
384  ARMARX_TRACE;
385  ARMARX_CHECK_NOT_NULL(robot);
386  ARMARX_CHECK_EXPRESSION(robot->hasRobotNode(nodeName));
387  return {*this, robot->getRobotNode(nodeName)};
388  }
389  DebugDrawerHelper::FrameView DebugDrawerHelper::inFrame(const VirtualRobot::RobotNodePtr& node)
390  {
391  ARMARX_TRACE;
392  ARMARX_CHECK_NOT_NULL(node);
393  return {*this, node};
394  }
395 
397  {
398  ARMARX_TRACE;
399  _rn = nullptr;
400  _fallbackFrame = frame;
401  }
403  {
404  ARMARX_TRACE;
405  _rn = nullptr;
407  }
408  void DebugDrawerHelper::setDefaultFrame(const std::string& nodeName)
409  {
410  ARMARX_TRACE;
411  ARMARX_CHECK_NOT_NULL(robot);
412  ARMARX_CHECK_EXPRESSION(robot->hasRobotNode(nodeName));
413  _rn = robot->getRobotNode(nodeName);
414  }
415  void DebugDrawerHelper::setDefaultFrame(const VirtualRobot::RobotNodePtr& node)
416  {
417  ARMARX_TRACE;
418  ARMARX_CHECK_NOT_NULL(robot);
419  ARMARX_CHECK_EXPRESSION(robot == node->getRobot());
420  _rn = node;
421  }
422 
423  void DebugDrawerHelper::addNewElement(const std::string& name, DebugDrawerHelper::DrawElementType type)
424  {
425  ARMARX_TRACE;
426  newElements.insert(DrawElement {name, type});
427  }
428 
429  const DrawColor DebugDrawerHelper::Colors::Red = DrawColor {1, 0, 0, 1};
430  const DrawColor DebugDrawerHelper::Colors::Green = DrawColor {0, 1, 0, 1};
431  const DrawColor DebugDrawerHelper::Colors::Blue = DrawColor {0, 0, 1, 1};
432  const DrawColor DebugDrawerHelper::Colors::Yellow = DrawColor {1, 1, 0, 1};
433  const DrawColor DebugDrawerHelper::Colors::Orange = DrawColor {1, 0.5f, 0, 1};
434 
435  DrawColor DebugDrawerHelper::Colors::Lerp(const DrawColor& a, const DrawColor& b, float f)
436  {
437  return DrawColor
438  {
439  ::math::Helpers::Lerp(a.r, b.r, f),
440  ::math::Helpers::Lerp(a.g, b.g, f),
441  ::math::Helpers::Lerp(a.b, b.b, f),
442  ::math::Helpers::Lerp(a.a, b.a, f)
443  };
444  }
445 }
armarx::DebugDrawerHelper::Colors::Orange
static const DrawColor Orange
Definition: DebugDrawerHelper.h:155
armarx::DebugDrawerHelper::Defaults::lineColor
DrawColor lineColor
Definition: DebugDrawerHelper.h:132
armarx::DebugDrawerHelper::setDefaultFrameToGlobal
void setDefaultFrameToGlobal()
Definition: DebugDrawerHelper.cpp:402
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:107
armarx::DebugDrawerHelper::DrawElementType::ColoredPointCloud
@ ColoredPointCloud
armarx::detail::DebugDrawerHelper::FrameView::setRobotPose
void setRobotPose(const std::string &name, const Eigen::Matrix4f &pose)
Definition: DebugDrawerHelper.cpp:179
armarx::detail::DebugDrawerHelper
Definition: DebugDrawerHelper.cpp:35
armarx::detail::DebugDrawerHelper::FrameView::makeGlobal
PosePtr makeGlobal(const Eigen::Matrix4f &pose) const
Definition: DebugDrawerHelper.cpp:73
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:224
armarx::detail::DebugDrawerHelper::FrameView::setRobotColor
void setRobotColor(const std::string &name, const DrawColor &color)
Definition: DebugDrawerHelper.cpp:174
armarx::detail::DebugDrawerHelper::FrameView::drawPoses
void drawPoses(const std::string &prefix, const std::vector< Eigen::Matrix4f > &poses)
Definition: DebugDrawerHelper.cpp:187
armarx::DebugDrawerHelper::setDebugDrawer
void setDebugDrawer(const DebugDrawerInterfacePrx &drawer)
Definition: DebugDrawerHelper.cpp:363
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:281
armarx::DebugDrawerHelper::setRobot
void setRobot(const VirtualRobot::RobotPtr &rob)
Definition: DebugDrawerHelper.cpp:369
armarx::DebugDrawerHelper::setDefaultFrame
void setDefaultFrame(const Eigen::Matrix4f &frame=Eigen::Matrix4f::Identity())
Definition: DebugDrawerHelper.cpp:396
armarx::DebugDrawerHelper::removeElement
void removeElement(const std::string &name, DrawElementType type)
Definition: DebugDrawerHelper.cpp:324
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:93
armarx::detail::DebugDrawerHelper::FrameView::drawSphere
void drawSphere(const std::string &name, const Eigen::Vector3f &position, float size, const DrawColor &color)
Definition: DebugDrawerHelper.cpp:135
armarx::detail::DebugDrawerHelper::FrameView::makeGlobalDirection
Vector3Ptr makeGlobalDirection(const Eigen::Vector3f &direction) const
Definition: DebugDrawerHelper.cpp:83
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:121
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:141
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:69
armarx::detail::DebugDrawerHelper::FrameView::makeGlobalDirectionEigen
Eigen::Vector3f makeGlobalDirectionEigen(const Eigen::Vector3f &direction) const
Definition: DebugDrawerHelper.cpp:64
GfxTL::Identity
void Identity(MatrixXX< N, N, T > *a)
Definition: MatrixXX.h:523
armarx::ctrlutil::a
double a(double t, double a0, double j)
Definition: CtrlUtil.h:45
armarx::DebugDrawerHelper::Defaults::lineWidth
float lineWidth
Definition: DebugDrawerHelper.h:131
armarx::detail::DebugDrawerHelper::FrameView::FrameView
FrameView(class DebugDrawerHelper &helper, const Eigen::Matrix4f frame=Eigen::Matrix4f::Identity())
Definition: DebugDrawerHelper.cpp:37
armarx::detail::DebugDrawerHelper::FrameView::_helper
class DebugDrawerHelper * _helper
Definition: DebugDrawerHelper.h:109
armarx::DebugDrawerHelper::setVisuEnabled
void setVisuEnabled(bool enableVisu)
Definition: DebugDrawerHelper.cpp:319
armarx::DebugDrawerHelper::cyclicCleanup
void cyclicCleanup()
Definition: DebugDrawerHelper.cpp:289
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:114
armarx::DebugDrawerHelper::DrawElementType::Pose
@ Pose
armarx::DebugDrawerHelper::Colors::Blue
static const DrawColor Blue
Definition: DebugDrawerHelper.h:153
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:169
armarx::DebugDrawerHelper::Colors::Red
static const DrawColor Red
Definition: DebugDrawerHelper.h:151
armarx::detail::DebugDrawerHelper::FrameView::_rn
VirtualRobot::RobotNodePtr _rn
Definition: DebugDrawerHelper.h:111
armarx::DebugDrawerHelper::DrawElement
Definition: DebugDrawerHelper.h:138
armarx::DebugDrawerHelper
The DebugDrawerHelper class provides draw functions in a given frame (static matrix or robot node) an...
Definition: DebugDrawerHelper.h:124
armarx::DebugDrawerHelper::DebugDrawerHelper
DebugDrawerHelper(const DebugDrawerInterfacePrx &debugDrawerPrx, const std::string &layerName, const VirtualRobot::RobotPtr &robot)
Definition: DebugDrawerHelper.cpp:265
armarx::DebugDrawerHelper::defaults
Defaults defaults
Definition: DebugDrawerHelper.h:169
armarx::to_string
const std::string & to_string(const std::string &s)
Definition: StringHelpers.h:40
armarx::DebugDrawerHelper::getDebugDrawer
const DebugDrawerInterfacePrx & getDebugDrawer() const
Definition: DebugDrawerHelper.cpp:358
ExpressionException.h
armarx::detail::DebugDrawerHelper::FrameView::makeGlobalEigen
Eigen::Matrix4f makeGlobalEigen(const Eigen::Matrix4f &pose) const
Definition: DebugDrawerHelper.cpp:46
GfxTL::Matrix4f
MatrixXX< 4, 4, float > Matrix4f
Definition: MatrixXX.h:601
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:378
armarx::DebugDrawerHelper::DrawElementType
DrawElementType
Definition: DebugDrawerHelper.h:134
armarx::DebugDrawerHelper::DrawElementType::Text
@ Text
memoryx::KBM::Vector3
Eigen::Vector3d Vector3
Definition: kbm.h:41
armarx::DebugDrawerHelper::Colors::Lerp
static DrawColor Lerp(const DrawColor &a, const DrawColor &b, float f)
Definition: DebugDrawerHelper.cpp:435
IceInternal::ProxyHandle<::IceProxy::armarx::DebugDrawerInterface >
armarx::DebugDrawerHelper::getRobot
const VirtualRobot::RobotPtr & getRobot() const
Definition: DebugDrawerHelper.cpp:353
armarx::DebugDrawerHelper::Colors::Yellow
static const DrawColor Yellow
Definition: DebugDrawerHelper.h:154
CHECK_AND_ADD
#define CHECK_AND_ADD(name, type)
Definition: DebugDrawerHelper.cpp:91
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:160
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:128
armarx::DebugDrawerHelper::Colors::Green
static const DrawColor Green
Definition: DebugDrawerHelper.h:152
armarx::DebugDrawerHelper::inFrame
FrameView inFrame(const Eigen::Matrix4f &frame=Eigen::Matrix4f::Identity())
Definition: DebugDrawerHelper.cpp:374
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:28
armarx::detail::DebugDrawerHelper::FrameView::_fallbackFrame
Eigen::Matrix4f _fallbackFrame
Definition: DebugDrawerHelper.h:110
VirtualRobot::RobotPtr
std::shared_ptr< class Robot > RobotPtr
Definition: Bus.h:18
armarx::DebugDrawerHelper::DrawElementType::Robot
@ Robot