DebugDrawerToArViz.cpp
Go to the documentation of this file.
1 /*
2  * This file is part of ArmarX.
3  *
4  * ArmarX is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License version 2 as
6  * published by the Free Software Foundation.
7  *
8  * ArmarX is distributed in the hope that it will be useful, but
9  * WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  *
16  * @package RobotAPI::ArmarXObjects::DebugDrawerToArViz
17  * @author Rainer Kartmann ( rainer dot kartmann at kit dot edu )
18  * @date 2020
19  * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20  * GNU General Public License
21  */
22 
23 #include "DebugDrawerToArViz.h"
24 #include "BlackWhitelistUpdate.h"
25 
28 
29 #include <SimoxUtility/color/interpolation.h>
30 #include <SimoxUtility/math/pose/pose.h>
31 
32 
33 #define FUNCTION_NOT_IMPLEMENTED_MESSAGE \
34  "Function DebugDrawerToArViz::" << __FUNCTION__ << "(): Not implemented."
35 
36 #define LOG_FUNCTION_NOT_IMPLEMENTED_MESSAGE() \
37  ARMARX_VERBOSE << FUNCTION_NOT_IMPLEMENTED_MESSAGE
38 
39 
40 namespace armarx
41 {
42 
43  namespace
44  {
45  Eigen::Vector3f toEigen(Vector3BasePtr v)
46  {
48  return { v->x, v->y, v->z };
49  }
50 
51  Eigen::Vector3f toEigen(DebugDrawerPointCloudElement e)
52  {
53  return { e.x, e.y, e.z };
54  }
55 
56  Eigen::Quaternionf toEigen(QuaternionBasePtr q)
57  {
59  return Eigen::Quaternionf(q->qw, q->qx, q->qy, q->qz);
60  }
61 
62  Eigen::Matrix4f toEigen(PoseBasePtr pose)
63  {
65  return simox::math::pose(toEigen(pose->position), toEigen(pose->orientation));
66  }
67 
68 
69  simox::Color toSimox(DrawColor c)
70  {
71  return simox::Color(c.r, c.g, c.b, c.a);
72  }
73 
74  viz::Color toViz(DrawColor c)
75  {
76  return viz::Color(toSimox(c));
77  }
78  }
79 
80 
82  {
83  this->arviz = arviz;
84  }
85 
86 
87  void DebugDrawerToArViz::updateBlackWhitelist(const BlackWhitelistUpdate& update, const Ice::Current&)
88  {
89  std::scoped_lock lock(mutex);
90 
92  ARMARX_VERBOSE << "Updated layer black-whitelist: \n" << layerBlackWhitelist;
93 
94  // Remove all excluded layers.
95  std::vector<viz::Layer> cleared;
96  for (const auto& [name, layer] : layers)
97  {
99  {
100  cleared.push_back(arviz.layer(name));
101  }
102  }
103  if (!cleared.empty())
104  {
105  arviz.commit(cleared);
106  }
107  }
108 
109 
110  void DebugDrawerToArViz::exportScene(const std::string&, const Ice::Current&)
111  {
113  }
114  void DebugDrawerToArViz::exportLayer(const std::string&, const std::string&, const Ice::Current&)
115  {
117  }
118 
119 
120  void DebugDrawerToArViz::setPoseVisu(const std::string& layer, const std::string& name, const PoseBasePtr& globalPose, const Ice::Current&)
121  {
122  std::scoped_lock lock(mutex);
123  if (layerBlackWhitelist.isExcluded(layer))
124  {
125  return;
126  }
127  setAndCommit(layer, viz::Pose(name).pose(toEigen(globalPose)));
128  }
129 
130  void DebugDrawerToArViz::setScaledPoseVisu(const std::string& layer, const std::string& name, const PoseBasePtr& globalPose, Ice::Float scale, const Ice::Current&)
131  {
132  std::scoped_lock lock(mutex);
133  if (layerBlackWhitelist.isExcluded(layer))
134  {
135  return;
136  }
137  setAndCommit(layer, viz::Pose(name).pose(toEigen(globalPose)).scale(scale));
138  }
139 
140  void DebugDrawerToArViz::setLineVisu(const std::string& layer, const std::string& name, const Vector3BasePtr& globalPosition1, const Vector3BasePtr& globalPosition2, Ice::Float lineWidth, const DrawColor& color, const Ice::Current&)
141  {
142  std::scoped_lock lock(mutex);
143  if (layerBlackWhitelist.isExcluded(layer))
144  {
145  return;
146  }
147  setAndCommit(layer, viz::Path(name).addPoint(toEigen(globalPosition1)).addPoint(toEigen(globalPosition2))
148  .color(toViz(color)).width(lineWidth).color(simox::Color::black(0)));
149  }
150 
151  void DebugDrawerToArViz::setLineSetVisu(const std::string& layerName, const std::string& name, const DebugDrawerLineSet& lineSet, const Ice::Current&)
152  {
153  std::scoped_lock lock(mutex);
154  if (layerBlackWhitelist.isExcluded(layerName))
155  {
156  return;
157  }
158 
159  viz::Layer& layer = getLayer(layerName);
160  ARMARX_CHECK_EQUAL(lineSet.points.size() % 2, 0) << VAROUT(lineSet.points.size());
161  ARMARX_CHECK_EQUAL(lineSet.intensities.size(), lineSet.points.size() / 2);
162 
163  if (lineSet.useHeatMap)
164  {
165  ARMARX_VERBOSE << "DebugDrawerToArViz::" << __FUNCTION__ << "(): " << "'useHeatMap' not supported.";
166  }
167 
168  simox::Color color0 = toSimox(lineSet.colorNoIntensity);
169  simox::Color color1 = toSimox(lineSet.colorFullIntensity);
170 
171  for (size_t i = 0; i + 1 < lineSet.points.size(); i += 2)
172  {
173  const auto& p1 = lineSet.points[i];
174  const auto& p2 = lineSet.points[i + 1];
175  float intensity = lineSet.intensities[i / 2];
176  simox::Color color = simox::color::interpol::linear(intensity, color0, color1);
177 
178  std::stringstream ss;
179  ss << name << "/" << i << "_" << i + 1;
180  setLayerElement(layer, viz::Polygon(ss.str()).addPoint(toEigen(p1)).addPoint(toEigen(p2))
181  .lineColor(color).lineWidth(lineSet.lineWidth).color(simox::Color::black(0)));
182  }
183  arviz.commit({layer});
184  }
185 
186  void DebugDrawerToArViz::setBoxVisu(const std::string& layer, const std::string& name, const PoseBasePtr& globalPose, const Vector3BasePtr& dimensions, const DrawColor& color, const Ice::Current&)
187  {
188  std::scoped_lock lock(mutex);
189  if (layerBlackWhitelist.isExcluded(layer))
190  {
191  return;
192  }
193  setAndCommit(layer, viz::Box(name).pose(toEigen(globalPose)).size(toEigen(dimensions)).color(toViz(color)));
194  }
195 
196  void DebugDrawerToArViz::setTextVisu(const std::string& layer, const std::string& name, const std::string& text, const Vector3BasePtr& globalPosition, const DrawColor& color, Ice::Int size, const Ice::Current&)
197  {
198  std::scoped_lock lock(mutex);
199  if (layerBlackWhitelist.isExcluded(layer))
200  {
201  return;
202  }
203  setAndCommit(layer, viz::Text(name).text(text).position(toEigen(globalPosition))
204  .scale(size).color(toViz(color)));
205  }
206 
207  void DebugDrawerToArViz::setSphereVisu(const std::string& layer, const std::string& name, const Vector3BasePtr& globalPosition, const DrawColor& color, Ice::Float radius, const Ice::Current&)
208  {
209  std::scoped_lock lock(mutex);
210  if (layerBlackWhitelist.isExcluded(layer))
211  {
212  return;
213  }
214  setAndCommit(layer, viz::Sphere(name).position(toEigen(globalPosition)).radius(radius).color(toViz(color)));
215  }
216 
217  void DebugDrawerToArViz::setPointCloudVisu(const std::string& layer, const std::string& name, const DebugDrawerPointCloud& pointCloud, const Ice::Current&)
218  {
219  std::scoped_lock lock(mutex);
220  if (layerBlackWhitelist.isExcluded(layer))
221  {
222  return;
223  }
224 
225  viz::PointCloud cloud(name);
226  for (const auto& p : pointCloud.points)
227  {
228  cloud.addPoint(p.x, p.y, p.z);
229  }
230  setAndCommit(layer, cloud.pointSizeInPixels(pointCloud.pointSize));
231  }
232 
233  void DebugDrawerToArViz::setColoredPointCloudVisu(const std::string& layer, const std::string& name, const DebugDrawerColoredPointCloud& pointCloud, const Ice::Current&)
234  {
235  std::scoped_lock lock(mutex);
236  if (layerBlackWhitelist.isExcluded(layer))
237  {
238  return;
239  }
240 
241  viz::PointCloud cloud(name);
242  for (const auto& p : pointCloud.points)
243  {
244  viz::ColoredPoint cp;
245  cp.x = p.x;
246  cp.y = p.y;
247  cp.z = p.z;
248  cp.color = toViz(p.color);
249  cloud.addPoint(cp);
250  }
251  setAndCommit(layer, cloud.pointSizeInPixels(pointCloud.pointSize));
252  }
253 
254  void DebugDrawerToArViz::set24BitColoredPointCloudVisu(const std::string& layer, const std::string& name, const DebugDrawer24BitColoredPointCloud& pointCloud, const Ice::Current&)
255  {
256  std::scoped_lock lock(mutex);
257  if (layerBlackWhitelist.isExcluded(layer))
258  {
259  return;
260  }
261 
262  viz::PointCloud cloud(name);
263  for (const auto& p : pointCloud.points)
264  {
265  viz::ColoredPoint cp;
266  cp.x = p.x;
267  cp.y = p.y;
268  cp.z = p.z;
269  cp.color = viz::Color(simox::Color(p.color.r, p.color.g, p.color.b));
270  cloud.addPoint(cp);
271  }
272  setAndCommit(layer, cloud.pointSizeInPixels(pointCloud.pointSize));
273  }
274 
275  void DebugDrawerToArViz::setPolygonVisu(const std::string& layer, const std::string& name, const PolygonPointList& polygonPoints, const DrawColor& colorInner, const DrawColor& colorBorder, Ice::Float lineWidth, const Ice::Current&)
276  {
277  std::scoped_lock lock(mutex);
278  if (layerBlackWhitelist.isExcluded(layer))
279  {
280  return;
281  }
282 
283  viz::Polygon poly(name);
284  for (const auto& p : polygonPoints)
285  {
286  poly.addPoint(toEigen(p));
287  }
288  setAndCommit(layer, poly.color(toViz(colorInner)).lineColor(toViz(colorBorder)).lineWidth(lineWidth));
289  }
290 
291  void DebugDrawerToArViz::setTriMeshVisu(const std::string& layer, const std::string& name, const DebugDrawerTriMesh& triMesh, const Ice::Current&)
292  {
293  std::scoped_lock lock(mutex);
294  if (layerBlackWhitelist.isExcluded(layer))
295  {
296  return;
297  }
298 
299  std::vector<Eigen::Vector3f> vertices;
300  std::vector<viz::data::Color> colors;
301  std::vector<viz::data::Face> faces;
302  for (const auto& v : triMesh.vertices)
303  {
304  vertices.emplace_back(v.x, v.y, v.z);
305  }
306  for (const auto& c : triMesh.colors)
307  {
308  colors.emplace_back(toViz(c));
309  }
310  for (const auto& f : triMesh.faces)
311  {
312  viz::data::Face& face = faces.emplace_back();
313  face.v0 = f.vertex1.vertexID;
314  face.v1 = f.vertex2.vertexID;
315  face.v2 = f.vertex3.vertexID;
316  face.c0 = f.vertex1.colorID;
317  face.c1 = f.vertex2.colorID;
318  face.c2 = f.vertex3.colorID;
319  }
320  setAndCommit(layer, viz::Mesh(name).vertices(vertices).colors(colors).faces(faces));
321  }
322 
323  void DebugDrawerToArViz::setArrowVisu(const std::string& layer, const std::string& name, const Vector3BasePtr& position, const Vector3BasePtr& direction, const DrawColor& color, Ice::Float length, Ice::Float width, const Ice::Current&)
324  {
325  std::scoped_lock lock(mutex);
326  if (layerBlackWhitelist.isExcluded(layer))
327  {
328  return;
329  }
330  setAndCommit(layer, viz::Arrow(name).position(toEigen(position)).direction(toEigen(direction))
331  .color(toViz(color)).width(width).length(length));
332  }
333 
334  void DebugDrawerToArViz::setCylinderVisu(const std::string& layer, const std::string& name, const Vector3BasePtr& globalPosition, const Vector3BasePtr& direction, Ice::Float length, Ice::Float radius, const DrawColor& color, const Ice::Current&)
335  {
336  std::scoped_lock lock(mutex);
337  if (layerBlackWhitelist.isExcluded(layer))
338  {
339  return;
340  }
341  setAndCommit(layer, viz::Cylinder(name)
342  .fromTo(toEigen(globalPosition), toEigen(globalPosition) + length * toEigen(direction))
343  .color(toViz(color)).radius(radius));
344  }
345 
346  void DebugDrawerToArViz::setCircleArrowVisu(const std::string& layer, const std::string& name, const Vector3BasePtr& globalPosition, const Vector3BasePtr& directionVec, Ice::Float radius, Ice::Float circleCompletion, Ice::Float width, const DrawColor& color, const Ice::Current&)
347  {
348  std::scoped_lock lock(mutex);
349  if (layerBlackWhitelist.isExcluded(layer))
350  {
351  return;
352  }
353  setAndCommit(layer, viz::ArrowCircle(name).position(toEigen(globalPosition)).normal(toEigen(directionVec))
354  .radius(radius).completion(circleCompletion).color(toViz(color)).width(width));
355  }
356 
357 
358  void DebugDrawerToArViz::setRobotVisu(const std::string& layer, const std::string& name, const std::string& robotFile, const std::string& armarxProject, DrawStyle drawStyleType, const Ice::Current&)
359  {
360  std::scoped_lock lock(mutex);
361  if (layerBlackWhitelist.isExcluded(layer))
362  {
363  return;
364  }
365 
366  viz::Robot robot = viz::Robot(name).file(armarxProject, robotFile);
367  switch (drawStyleType)
368  {
369  case DrawStyle::CollisionModel:
370  robot.useCollisionModel();
371  break;
372  case DrawStyle::FullModel:
373  robot.useFullModel();
374  break;
375  }
376 
377  robots.emplace(std::make_pair(layer, name), robot);
378  setAndCommit(layer, robot);
379  }
380 
381  void DebugDrawerToArViz::updateRobotPose(const std::string& layer, const std::string& name, const PoseBasePtr& globalPose, const Ice::Current&)
382  {
383  std::scoped_lock lock(mutex);
384  if (layerBlackWhitelist.isExcluded(layer))
385  {
386  return;
387  }
388  if (auto it = robots.find(std::make_pair(layer, name)); it != robots.end())
389  {
390  viz::Robot& robot = it->second;
391  robot.pose(toEigen(globalPose));
392  }
393  arviz.commit({getLayer(layer)});
394  }
395 
396  void DebugDrawerToArViz::updateRobotConfig(const std::string& layer, const std::string& name, const NameValueMap& configuration, const Ice::Current&)
397  {
398  std::scoped_lock lock(mutex);
399  if (layerBlackWhitelist.isExcluded(layer))
400  {
401  return;
402  }
403  if (auto it = robots.find(std::make_pair(layer, name)); it != robots.end())
404  {
405  viz::Robot& robot = it->second;
406  robot.joints(configuration);
407  }
408  arviz.commit({getLayer(layer)});
409  }
410 
411  void DebugDrawerToArViz::updateRobotColor(const std::string& layer, const std::string& name, const DrawColor& color, const Ice::Current&)
412  {
413  std::scoped_lock lock(mutex);
414  if (layerBlackWhitelist.isExcluded(layer))
415  {
416  return;
417  }
418  if (auto it = robots.find(std::make_pair(layer, name)); it != robots.end())
419  {
420  viz::Robot& robot = it->second;
421  robot.overrideColor(toViz(color));
422  }
423  arviz.commit({getLayer(layer)});
424  }
425 
426  void DebugDrawerToArViz::updateRobotNodeColor(const std::string& layer, const std::string& name, const std::string& robotNodeName, const DrawColor& color, const Ice::Current&)
427  {
428  (void) layer, (void) name, (void) robotNodeName, (void) color;
430  }
431 
432  void DebugDrawerToArViz::removeRobotVisu(const std::string& layer, const std::string& name, const Ice::Current&)
433  {
434  std::scoped_lock lock(mutex);
435  if (layerBlackWhitelist.isExcluded(layer))
436  {
437  return;
438  }
439  robots.erase(std::make_pair(layer, name));
440  removeAndCommit(layer, name);
441  }
442 
443 
444  void DebugDrawerToArViz::setPoseDebugLayerVisu(const std::string& name, const PoseBasePtr& globalPose, const Ice::Current& c)
445  {
446  setPoseVisu(DEBUG_LAYER_NAME, name, globalPose, c);
447  }
448  void DebugDrawerToArViz::setScaledPoseDebugLayerVisu(const std::string& name, const PoseBasePtr& globalPose, Ice::Float scale, const Ice::Current& c)
449  {
450  setScaledPoseVisu(DEBUG_LAYER_NAME, name, globalPose, scale, c);
451  }
452  void DebugDrawerToArViz::setLineDebugLayerVisu(const std::string& name, const Vector3BasePtr& globalPosition1, const Vector3BasePtr& globalPosition2, Ice::Float lineWidth, const DrawColor& color, const Ice::Current& c)
453  {
454  setLineVisu(DEBUG_LAYER_NAME, name, globalPosition1, globalPosition2, lineWidth, color, c);
455  }
456  void DebugDrawerToArViz::setLineSetDebugLayerVisu(const std::string& name, const DebugDrawerLineSet& lineSet, const Ice::Current& c)
457  {
458  setLineSetVisu(DEBUG_LAYER_NAME, name, lineSet, c);
459  }
460  void DebugDrawerToArViz::setBoxDebugLayerVisu(const std::string& name, const PoseBasePtr& globalPose, const Vector3BasePtr& dimensions, const DrawColor& color, const Ice::Current& c)
461  {
462  setBoxVisu(DEBUG_LAYER_NAME, name, globalPose, dimensions, color, c);
463  }
464  void DebugDrawerToArViz::setTextDebugLayerVisu(const std::string& name, const std::string& text, const Vector3BasePtr& globalPosition, const DrawColor& color, Ice::Int size, const Ice::Current& c)
465  {
466  setTextVisu(DEBUG_LAYER_NAME, name, text, globalPosition, color, size, c);
467  }
468  void DebugDrawerToArViz::setSphereDebugLayerVisu(const std::string& name, const Vector3BasePtr& globalPosition, const DrawColor& color, Ice::Float radius, const Ice::Current& c)
469  {
470  setSphereVisu(DEBUG_LAYER_NAME, name, globalPosition, color, radius, c);
471  }
472  void DebugDrawerToArViz::setPointCloudDebugLayerVisu(const std::string& name, const DebugDrawerPointCloud& pointCloud, const Ice::Current& c)
473  {
474  setPointCloudVisu(DEBUG_LAYER_NAME, name, pointCloud, c);
475  }
476  void DebugDrawerToArViz::set24BitColoredPointCloudDebugLayerVisu(const std::string& name, const DebugDrawer24BitColoredPointCloud& pointCloud, const Ice::Current& c)
477  {
478  set24BitColoredPointCloudVisu(DEBUG_LAYER_NAME, name, pointCloud, c);
479  }
480  void DebugDrawerToArViz::setPolygonDebugLayerVisu(const std::string& name, const PolygonPointList& polygonPoints, const DrawColor& colorInner, const DrawColor& colorBorder, Ice::Float lineWidth, const Ice::Current& c)
481  {
482  setPolygonVisu(DEBUG_LAYER_NAME, name, polygonPoints, colorInner, colorBorder, lineWidth, c);
483  }
484  void DebugDrawerToArViz::setTriMeshDebugLayerVisu(const std::string& name, const DebugDrawerTriMesh& triMesh, const Ice::Current& c)
485  {
486  setTriMeshVisu(DEBUG_LAYER_NAME, name, triMesh, c);
487  }
488  void DebugDrawerToArViz::setArrowDebugLayerVisu(const std::string& name, const Vector3BasePtr& position, const Vector3BasePtr& direction, const DrawColor& color, Ice::Float length, Ice::Float width, const Ice::Current& c)
489  {
490  setArrowVisu(DEBUG_LAYER_NAME, name, position, direction, color, length, width, c);
491  }
492  void DebugDrawerToArViz::setCylinderDebugLayerVisu(const std::string& name, const Vector3BasePtr& globalPosition, const Vector3BasePtr& direction, Ice::Float length, Ice::Float radius, const DrawColor& color, const Ice::Current& c)
493  {
494  setCylinderVisu(DEBUG_LAYER_NAME, name, globalPosition, direction, length, radius, color, c);
495  }
496  void DebugDrawerToArViz::setCircleDebugLayerVisu(const std::string& name, const Vector3BasePtr& globalPosition, const Vector3BasePtr& directionVec, Ice::Float radius, Ice::Float circleCompletion, Ice::Float width, const DrawColor& color, const Ice::Current&)
497  {
498  (void) name, (void) globalPosition, (void) directionVec, (void) radius, (void) circleCompletion, (void) width, (void) color;
500  }
501 
502 
503  void DebugDrawerToArViz::removePoseVisu(const std::string& layer, const std::string& name, const Ice::Current&)
504  {
505  std::scoped_lock lock(mutex);
506  if (layerBlackWhitelist.isIncluded(layer))
507  {
508  removeAndCommit(layer, name);
509  }
510  }
511  void DebugDrawerToArViz::removeLineVisu(const std::string& layer, const std::string& name, const Ice::Current&)
512  {
513  std::scoped_lock lock(mutex);
514  if (layerBlackWhitelist.isIncluded(layer))
515  {
516  removeAndCommit(layer, name);
517  }
518  }
519  void DebugDrawerToArViz::removeLineSetVisu(const std::string& layer, const std::string& name, const Ice::Current&)
520  {
521  std::scoped_lock lock(mutex);
522  if (layerBlackWhitelist.isIncluded(layer))
523  {
524  removeAndCommit(layer, name);
525  }
526  }
527  void DebugDrawerToArViz::removeBoxVisu(const std::string& layer, const std::string& name, const Ice::Current&)
528  {
529  std::scoped_lock lock(mutex);
530  if (layerBlackWhitelist.isIncluded(layer))
531  {
532  removeAndCommit(layer, name);
533  }
534  }
535  void DebugDrawerToArViz::removeTextVisu(const std::string& layer, const std::string& name, const Ice::Current&)
536  {
537  std::scoped_lock lock(mutex);
538  if (layerBlackWhitelist.isIncluded(layer))
539  {
540  removeAndCommit(layer, name);
541  }
542  }
543  void DebugDrawerToArViz::removeSphereVisu(const std::string& layer, const std::string& name, const Ice::Current&)
544  {
545  std::scoped_lock lock(mutex);
546  if (layerBlackWhitelist.isIncluded(layer))
547  {
548  removeAndCommit(layer, name);
549  }
550  }
551  void DebugDrawerToArViz::removePointCloudVisu(const std::string& layer, const std::string& name, const Ice::Current&)
552  {
553  std::scoped_lock lock(mutex);
554  if (layerBlackWhitelist.isIncluded(layer))
555  {
556  removeAndCommit(layer, name);
557  }
558  }
559  void DebugDrawerToArViz::removeColoredPointCloudVisu(const std::string& layer, const std::string& name, const Ice::Current&)
560  {
561  std::scoped_lock lock(mutex);
562  if (layerBlackWhitelist.isIncluded(layer))
563  {
564  removeAndCommit(layer, name);
565  }
566  }
567  void DebugDrawerToArViz::remove24BitColoredPointCloudVisu(const std::string& layer, const std::string& name, const Ice::Current&)
568  {
569  std::scoped_lock lock(mutex);
570  if (layerBlackWhitelist.isIncluded(layer))
571  {
572  removeAndCommit(layer, name);
573  }
574  }
575  void DebugDrawerToArViz::removePolygonVisu(const std::string& layer, const std::string& name, const Ice::Current&)
576  {
577  std::scoped_lock lock(mutex);
578  if (layerBlackWhitelist.isIncluded(layer))
579  {
580  removeAndCommit(layer, name);
581  }
582  }
583  void DebugDrawerToArViz::removeTriMeshVisu(const std::string& layer, const std::string& name, const Ice::Current&)
584  {
585  std::scoped_lock lock(mutex);
586  if (layerBlackWhitelist.isIncluded(layer))
587  {
588  removeAndCommit(layer, name);
589  }
590  }
591  void DebugDrawerToArViz::removeArrowVisu(const std::string& layer, const std::string& name, const Ice::Current&)
592  {
593  std::scoped_lock lock(mutex);
594  if (layerBlackWhitelist.isIncluded(layer))
595  {
596  removeAndCommit(layer, name);
597  }
598  }
599  void DebugDrawerToArViz::removeCylinderVisu(const std::string& layer, const std::string& name, const Ice::Current&)
600  {
601  std::scoped_lock lock(mutex);
602  if (layerBlackWhitelist.isIncluded(layer))
603  {
604  removeAndCommit(layer, name);
605  }
606  }
607  void DebugDrawerToArViz::removeCircleVisu(const std::string& layer, const std::string& name, const Ice::Current&)
608  {
609  std::scoped_lock lock(mutex);
610  if (layerBlackWhitelist.isIncluded(layer))
611  {
612  removeAndCommit(layer, name);
613  }
614  }
615 
616 
617  void DebugDrawerToArViz::removePoseDebugLayerVisu(const std::string& name, const Ice::Current&)
618  {
619  removePointCloudVisu(DEBUG_LAYER_NAME, name);
620  }
621  void DebugDrawerToArViz::removeLineDebugLayerVisu(const std::string& name, const Ice::Current&)
622  {
623  removeLineVisu(DEBUG_LAYER_NAME, name);
624  }
625  void DebugDrawerToArViz::removeLineSetDebugLayerVisu(const std::string& name, const Ice::Current&)
626  {
627  removeLineSetVisu(DEBUG_LAYER_NAME, name);
628  }
629  void DebugDrawerToArViz::removeBoxDebugLayerVisu(const std::string& name, const Ice::Current&)
630  {
631  removeBoxVisu(DEBUG_LAYER_NAME, name);
632  }
633  void DebugDrawerToArViz::removeTextDebugLayerVisu(const std::string& name, const Ice::Current&)
634  {
635  removeTextVisu(DEBUG_LAYER_NAME, name);
636  }
637  void DebugDrawerToArViz::removeSphereDebugLayerVisu(const std::string& name, const Ice::Current&)
638  {
639  removeSphereVisu(DEBUG_LAYER_NAME, name);
640  }
641  void DebugDrawerToArViz::removePointCloudDebugLayerVisu(const std::string& name, const Ice::Current&)
642  {
643  removePointCloudVisu(DEBUG_LAYER_NAME, name);
644  }
645  void DebugDrawerToArViz::removeColoredPointCloudDebugLayerVisu(const std::string& name, const Ice::Current&)
646  {
647  removeColoredPointCloudVisu(DEBUG_LAYER_NAME, name);
648  }
649  void DebugDrawerToArViz::remove24BitColoredPointCloudDebugLayerVisu(const std::string& name, const Ice::Current&)
650  {
651  remove24BitColoredPointCloudVisu(DEBUG_LAYER_NAME, name);
652  }
653  void DebugDrawerToArViz::removePolygonDebugLayerVisu(const std::string& name, const Ice::Current&)
654  {
655  removePolygonVisu(DEBUG_LAYER_NAME, name);
656  }
657  void DebugDrawerToArViz::removeTriMeshDebugLayerVisu(const std::string& name, const Ice::Current&)
658  {
659  removeTriMeshVisu(DEBUG_LAYER_NAME, name);
660  }
661  void DebugDrawerToArViz::removeArrowDebugLayerVisu(const std::string& name, const Ice::Current&)
662  {
663  removeArrowVisu(DEBUG_LAYER_NAME, name);
664  }
665  void DebugDrawerToArViz::removeCylinderDebugLayerVisu(const std::string& name, const Ice::Current&)
666  {
667  removeCylinderVisu(DEBUG_LAYER_NAME, name);
668  }
669  void DebugDrawerToArViz::removeCircleDebugLayerVisu(const std::string& name, const Ice::Current&)
670  {
671  removeCircleVisu(DEBUG_LAYER_NAME, name);
672  }
673 
674  void DebugDrawerToArViz::clearAll(const Ice::Current&)
675  {
676  std::scoped_lock lock(mutex);
677 
678  std::vector<viz::Layer> commit;
679  commit.reserve(layers.size());
680  for (auto& [name, layer] : layers)
681  {
682  layer.clear();
683  commit.push_back(layer);
684  }
685  arviz.commit(commit);
686  }
687  void DebugDrawerToArViz::clearLayer(const std::string& layerName, const Ice::Current&)
688  {
689  std::scoped_lock lock(mutex);
690 
691  viz::Layer layer = getLayer(layerName);
692  layer.clear();
693  arviz.commit({layer});
694  }
695  void DebugDrawerToArViz::clearDebugLayer(const Ice::Current&)
696  {
697  clearLayer(DEBUG_LAYER_NAME);
698  }
699 
700  void DebugDrawerToArViz::enableLayerVisu(const std::string& layer, bool visible, const Ice::Current&)
701  {
702  (void) layer, (void) visible;
704  }
705  void DebugDrawerToArViz::enableDebugLayerVisu(bool visible, const Ice::Current&)
706  {
707  enableLayerVisu(DEBUG_LAYER_NAME, visible);
708  }
709 
710  Ice::StringSeq DebugDrawerToArViz::layerNames(const Ice::Current&)
711  {
713  return {};
714  }
715  LayerInformationSequence DebugDrawerToArViz::layerInformation(const Ice::Current&)
716  {
718  return {};
719  }
720 
721  bool DebugDrawerToArViz::hasLayer(const std::string&, const Ice::Current&)
722  {
724  return false;
725  }
726  void DebugDrawerToArViz::removeLayer(const std::string&, const Ice::Current&)
727  {
729  }
730 
731  void DebugDrawerToArViz::disableAllLayers(const Ice::Current&)
732  {
734  }
735  void DebugDrawerToArViz::enableAllLayers(const Ice::Current&)
736  {
738  }
739 
740  void DebugDrawerToArViz::enableSelections(const std::string&, const Ice::Current&)
741  {
743  }
744  void DebugDrawerToArViz::disableSelections(const std::string&, const Ice::Current&)
745  {
747  }
748  void DebugDrawerToArViz::clearSelections(const std::string&, const Ice::Current&)
749  {
751  }
752 
753  void DebugDrawerToArViz::select(const std::string& layer, const std::string& elementName, const Ice::Current&)
754  {
755  (void) layer, (void) elementName;
757  }
758  void DebugDrawerToArViz::deselect(const std::string& layer, const std::string& elementName, const Ice::Current&)
759  {
760  (void) layer, (void) elementName;
762  }
763 
764  DebugDrawerSelectionList DebugDrawerToArViz::getSelections(const Ice::Current&)
765  {
767  return {};
768  }
769 
770 
771  viz::Layer& DebugDrawerToArViz::getLayer(const std::string& layerName)
772  {
773  if (auto it = layers.find(layerName); it != layers.end())
774  {
775  return it->second;
776  }
777  else
778  {
779  return layers.emplace(layerName, arviz.layer(layerName)).first->second;
780  }
781  }
782 
783  viz::data::ElementSeq::iterator DebugDrawerToArViz::findLayerElement(viz::Layer& layer, const std::string& elementName)
784  {
785  return std::find_if(layer.data_.elements.begin(), layer.data_.elements.end(),
786  [&elementName](const viz::data::ElementPtr & e)
787  {
788  return e->id == elementName;
789  });
790  }
791 
792  void DebugDrawerToArViz::removeLayerElement(viz::Layer& layer, const std::string& name)
793  {
794  auto it = findLayerElement(layer, name);
795  if (it != layer.data_.elements.end())
796  {
797  layer.data_.elements.erase(it);
798  }
799  }
800 
801  void DebugDrawerToArViz::removeAndCommit(const std::string& layerName, const std::string& name)
802  {
803  viz::Layer& layer = getLayer(layerName);
804  removeLayerElement(layer, name);
805  arviz.commit({layer});
806  }
807 
808 }
armarx::DebugDrawerToArViz::removeSphereDebugLayerVisu
void removeSphereDebugLayerVisu(const std::string &name, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:637
armarx::DebugDrawerToArViz::setTextDebugLayerVisu
void setTextDebugLayerVisu(const std::string &name, const std::string &text, const Vector3BasePtr &globalPosition, const DrawColor &color, Ice::Int size, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:464
armarx::DebugDrawerToArViz::layerNames
Ice::StringSeq layerNames(const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:710
armarx::viz::Client::commit
CommitResult commit(StagedCommit const &commit)
Definition: Client.cpp:80
ARMARX_VERBOSE
#define ARMARX_VERBOSE
Definition: Logging.h:180
armarx::DebugDrawerToArViz::setCircleDebugLayerVisu
void setCircleDebugLayerVisu(const std::string &name, const Vector3BasePtr &globalPosition, const Vector3BasePtr &directionVec, Ice::Float radius, Ice::Float circleCompletion, Ice::Float width, const DrawColor &color, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:496
armarx::DebugDrawerToArViz::layerBlackWhitelist
armarx::StringBlackWhitelist layerBlackWhitelist
Definition: DebugDrawerToArViz.h:199
armarx::DebugDrawerToArViz::removePointCloudDebugLayerVisu
void removePointCloudDebugLayerVisu(const std::string &name, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:641
armarx::VariantType::Float
const VariantTypeId Float
Definition: Variant.h:918
armarx::DebugDrawerToArViz::exportLayer
void exportLayer(const std::string &filename, const std::string &layerName, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:114
armarx::DebugDrawerToArViz::removeTextVisu
void removeTextVisu(const std::string &layer, const std::string &name, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:535
armarx::DebugDrawerToArViz::setCylinderVisu
void setCylinderVisu(const std::string &layer, const std::string &name, const Vector3BasePtr &globalPosition, const Vector3BasePtr &direction, Ice::Float length, Ice::Float radius, const DrawColor &color, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:334
armarx::DebugDrawerToArViz::setSphereVisu
void setSphereVisu(const std::string &layer, const std::string &name, const Vector3BasePtr &globalPosition, const DrawColor &color, Ice::Float radius, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:207
armarx::DebugDrawerToArViz::set24BitColoredPointCloudDebugLayerVisu
void set24BitColoredPointCloudDebugLayerVisu(const std::string &name, const DebugDrawer24BitColoredPointCloud &pointCloud, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:476
armarx::updateBlackWhitelist
void updateBlackWhitelist(StringBlackWhitelist &bw, const armarx::BlackWhitelistUpdate &update)
Definition: BlackWhitelistUpdate.h:15
armarx::viz::toEigen
Eigen::Matrix4f toEigen(data::GlobalPose const &pose)
Definition: Interaction.h:46
armarx::DebugDrawerToArViz::removeSphereVisu
void removeSphereVisu(const std::string &layer, const std::string &name, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:543
armarx::viz::Layer::clear
void clear()
Definition: Layer.h:23
armarx::DebugDrawerToArViz::removeLineDebugLayerVisu
void removeLineDebugLayerVisu(const std::string &name, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:621
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::DebugDrawerToArViz::removePoseDebugLayerVisu
void removePoseDebugLayerVisu(const std::string &name, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:617
armarx::viz::Mesh
Definition: Mesh.h:28
armarx::DebugDrawerToArViz::enableSelections
void enableSelections(const std::string &, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:740
armarx::DebugDrawerToArViz::removePointCloudVisu
void removePointCloudVisu(const std::string &layer, const std::string &name, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:551
armarx::DebugDrawerToArViz::setCylinderDebugLayerVisu
void setCylinderDebugLayerVisu(const std::string &name, const Vector3BasePtr &globalPosition, const Vector3BasePtr &direction, Ice::Float length, Ice::Float radius, const DrawColor &color, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:492
armarx::DebugDrawerToArViz::setTriMeshDebugLayerVisu
void setTriMeshDebugLayerVisu(const std::string &name, const DebugDrawerTriMesh &triMesh, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:484
armarx::viz::Arrow
Definition: Elements.h:198
c
constexpr T c
Definition: UnscentedKalmanFilterTest.cpp:43
armarx::DebugDrawerToArViz::enableAllLayers
void enableAllLayers(const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:735
armarx::navigation::platform_controller::platform_global_trajectory::NameValueMap
std::map< std::string, float > NameValueMap
Definition: PlatformGlobalTrajectoryController.h:93
armarx::DebugDrawerToArViz::removeBoxVisu
void removeBoxVisu(const std::string &layer, const std::string &name, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:527
armarx::DebugDrawerToArViz::removeCylinderVisu
void removeCylinderVisu(const std::string &layer, const std::string &name, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:599
armarx::DebugDrawerToArViz::removeTriMeshVisu
void removeTriMeshVisu(const std::string &layer, const std::string &name, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:583
armarx::DebugDrawerToArViz::select
void select(const std::string &layer, const std::string &elementName, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:753
armarx::DebugDrawerToArViz::set24BitColoredPointCloudVisu
void set24BitColoredPointCloudVisu(const std::string &layer, const std::string &name, const DebugDrawer24BitColoredPointCloud &pointCloud, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:254
armarx::viz::Sphere
Definition: Elements.h:134
armarx::DebugDrawerToArViz::removePolygonVisu
void removePolygonVisu(const std::string &layer, const std::string &name, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:575
armarx::DebugDrawerToArViz::setArrowVisu
void setArrowVisu(const std::string &layer, const std::string &name, const Vector3BasePtr &position, const Vector3BasePtr &direction, const DrawColor &color, Ice::Float length, Ice::Float width, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:323
armarx::DebugDrawerToArViz::removeArrowVisu
void removeArrowVisu(const std::string &layer, const std::string &name, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:591
armarx::DebugDrawerToArViz::disableAllLayers
void disableAllLayers(const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:731
armarx::DebugDrawerToArViz::setPoseVisu
void setPoseVisu(const std::string &layer, const std::string &name, const PoseBasePtr &globalPose, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:120
armarx::viz::Robot::useFullModel
Robot & useFullModel()
Definition: Robot.h:29
armarx::DebugDrawerToArViz::removeLineVisu
void removeLineVisu(const std::string &layer, const std::string &name, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:511
armarx::DebugDrawerToArViz::setLineVisu
void setLineVisu(const std::string &layer, const std::string &name, const Vector3BasePtr &globalPosition1, const Vector3BasePtr &globalPosition2, Ice::Float lineWidth, const DrawColor &color, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:140
armarx::DebugDrawerToArViz::clearAll
void clearAll(const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:674
armarx::BlackWhitelist::isExcluded
bool isExcluded(const Key &element) const
An element is excluded if (1) it is in the blacklist, or (2) it is not in the non-empty whitelist.
Definition: BlackWhitelist.h:42
armarx::DebugDrawerToArViz::remove24BitColoredPointCloudVisu
void remove24BitColoredPointCloudVisu(const std::string &layer, const std::string &name, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:567
armarx::DebugDrawerToArViz::setCircleArrowVisu
void setCircleArrowVisu(const std::string &layer, const std::string &name, const Vector3BasePtr &globalPosition, const Vector3BasePtr &directionVec, Ice::Float radius, Ice::Float circleCompletion, Ice::Float width, const DrawColor &color, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:346
armarx::viz::Robot::joints
Robot & joints(std::map< std::string, float > const &values)
Definition: Robot.h:57
armarx::DebugDrawerToArViz::setBoxDebugLayerVisu
void setBoxDebugLayerVisu(const std::string &name, const PoseBasePtr &globalPose, const Vector3BasePtr &dimensions, const DrawColor &color, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:460
armarx::DebugDrawerToArViz::deselect
void deselect(const std::string &layer, const std::string &elementName, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:758
armarx::DebugDrawerToArViz::setBoxVisu
void setBoxVisu(const std::string &layer, const std::string &name, const PoseBasePtr &globalPose, const Vector3BasePtr &dimensions, const DrawColor &color, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:186
armarx::DebugDrawerToArViz::remove24BitColoredPointCloudDebugLayerVisu
void remove24BitColoredPointCloudDebugLayerVisu(const std::string &name, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:649
Color
uint32_t Color
RGBA color.
Definition: color.h:8
armarx::DebugDrawerToArViz::updateRobotNodeColor
void updateRobotNodeColor(const std::string &layer, const std::string &name, const std::string &robotNodeName, const DrawColor &color, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:426
armarx::viz::Polygon::addPoint
Polygon & addPoint(Eigen::Vector3f p)
Definition: Elements.h:294
armarx::DebugDrawerToArViz::setScaledPoseVisu
void setScaledPoseVisu(const std::string &layer, const std::string &name, const PoseBasePtr &globalPose, Ice::Float scale, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:130
armarx::DebugDrawerToArViz::setPoseDebugLayerVisu
void setPoseDebugLayerVisu(const std::string &name, const PoseBasePtr &globalPose, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:444
armarx::viz::PointCloud::pointSizeInPixels
PointCloud & pointSizeInPixels(float s)
Definition: PointCloud.h:55
armarx::viz::Layer::data_
data::LayerUpdate data_
Definition: Layer.h:53
armarx::DebugDrawerToArViz::updateRobotPose
void updateRobotPose(const std::string &layer, const std::string &name, const PoseBasePtr &globalPose, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:381
armarx::armem::human::Robot
@ Robot
Definition: util.h:14
armarx::DebugDrawerToArViz::removeCircleVisu
void removeCircleVisu(const std::string &layer, const std::string &name, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:607
armarx::DebugDrawerToArViz::removeRobotVisu
void removeRobotVisu(const std::string &layer, const std::string &name, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:432
armarx::viz::Cylinder
Definition: Elements.h:74
armarx::BlackWhitelist::isIncluded
bool isIncluded(const Key &element) const
An element is included if (1) it is not in the blacklist, and (2) the whitelist is empty or it contai...
Definition: BlackWhitelist.h:32
armarx::viz::Color
Definition: Color.h:13
armarx::viz::Robot::useCollisionModel
Robot & useCollisionModel()
Definition: Robot.h:22
DebugDrawerToArViz.h
armarx::trajectory::interpolate::linear
ReturnT linear(float t, const VariantValue &lhs, const VariantValue &rhs)
Definition: linear.h:56
armarx::DebugDrawerToArViz::setColoredPointCloudVisu
void setColoredPointCloudVisu(const std::string &layer, const std::string &name, const DebugDrawerColoredPointCloud &pointCloud, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:233
armarx::viz::Robot::overrideColor
Robot & overrideColor(Color c)
Definition: Robot.h:36
armarx::viz::PointCloud
Definition: PointCloud.h:21
armarx::DebugDrawerToArViz::clearDebugLayer
void clearDebugLayer(const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:695
armarx::DebugDrawerToArViz::hasLayer
bool hasLayer(const std::string &, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:721
armarx::viz::Box
Definition: Elements.h:51
armarx::DebugDrawerToArViz::layerInformation
LayerInformationSequence layerInformation(const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:715
armarx::viz::Pose
Definition: Elements.h:179
armarx::viz::Robot
Definition: Robot.h:9
armarx::DebugDrawerToArViz::removeColoredPointCloudVisu
void removeColoredPointCloudVisu(const std::string &layer, const std::string &name, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:559
armarx::DebugDrawerToArViz::setRobotVisu
void setRobotVisu(const std::string &layer, const std::string &name, const std::string &robotFile, const std::string &armarxProject, DrawStyle drawStyleType, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:358
armarx::DebugDrawerToArViz::updateRobotColor
void updateRobotColor(const std::string &layer, const std::string &name, const DrawColor &color, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:411
Eigen::Quaternionf
Quaternion< float, 0 > Quaternionf
Definition: EigenForwardDeclarations.h:61
armarx::viz::Polygon
Definition: Elements.h:258
armarx::DebugDrawerToArViz::setPointCloudDebugLayerVisu
void setPointCloudDebugLayerVisu(const std::string &name, const DebugDrawerPointCloud &pointCloud, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:472
armarx::DebugDrawerToArViz::clearLayer
void clearLayer(const std::string &layer, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:687
armarx::DebugDrawerToArViz::setPolygonDebugLayerVisu
void setPolygonDebugLayerVisu(const std::string &name, const PolygonPointList &polygonPoints, const DrawColor &colorInner, const DrawColor &colorBorder, Ice::Float lineWidth, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:480
LOG_FUNCTION_NOT_IMPLEMENTED_MESSAGE
#define LOG_FUNCTION_NOT_IMPLEMENTED_MESSAGE()
Definition: DebugDrawerToArViz.cpp:36
q
#define q
armarx::DebugDrawerToArViz::setLineSetVisu
void setLineSetVisu(const std::string &layer, const std::string &name, const DebugDrawerLineSet &lineSet, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:151
armarx::DebugDrawerToArViz::setScaledPoseDebugLayerVisu
void setScaledPoseDebugLayerVisu(const std::string &name, const PoseBasePtr &globalPose, Ice::Float scale, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:448
armarx::viz::Text
Definition: Elements.h:185
armarx::armem::server::ltm::util::mongodb::detail::update
bool update(mongocxx::collection &coll, const nlohmann::json &query, const nlohmann::json &update)
Definition: mongodb.cpp:67
armarx::DebugDrawerToArViz::removeCircleDebugLayerVisu
void removeCircleDebugLayerVisu(const std::string &name, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:669
armarx::DebugDrawerToArViz::disableSelections
void disableSelections(const std::string &, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:744
armarx::DebugDrawerToArViz::clearSelections
void clearSelections(const std::string &, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:748
BlackWhitelistUpdate.h
ExpressionException.h
armarx::DebugDrawerToArViz::enableDebugLayerVisu
void enableDebugLayerVisu(bool visible, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:705
armarx::DebugDrawerToArViz::updateRobotConfig
void updateRobotConfig(const std::string &layer, const std::string &name, const NameValueMap &configuration, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:396
armarx::DebugDrawerToArViz::removeTextDebugLayerVisu
void removeTextDebugLayerVisu(const std::string &name, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:633
armarx::ctrlutil::v
double v(double t, double v0, double a0, double j)
Definition: CtrlUtil.h:39
GfxTL::Matrix4f
MatrixXX< 4, 4, float > Matrix4f
Definition: MatrixXX.h:601
armarx::DebugDrawerToArViz::setPointCloudVisu
void setPointCloudVisu(const std::string &layer, const std::string &name, const DebugDrawerPointCloud &pointCloud, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:217
armarx::DebugDrawerToArViz::removeColoredPointCloudDebugLayerVisu
void removeColoredPointCloudDebugLayerVisu(const std::string &name, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:645
armarx::viz::ElementOps::pose
DerivedT & pose(Eigen::Matrix4f const &pose)
Definition: ElementOps.h:159
armarx::DebugDrawerToArViz::removeBoxDebugLayerVisu
void removeBoxDebugLayerVisu(const std::string &name, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:629
armarx::DebugDrawerToArViz::setLineDebugLayerVisu
void setLineDebugLayerVisu(const std::string &name, const Vector3BasePtr &globalPosition1, const Vector3BasePtr &globalPosition2, Ice::Float lineWidth, const DrawColor &color, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:452
VAROUT
#define VAROUT(x)
Definition: StringHelpers.h:182
armarx::Quaternion< float, 0 >
armarx::DebugDrawerToArViz::removeLayer
void removeLayer(const std::string &, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:726
armarx::viz::ElementOps::color
DerivedT & color(Color color)
Definition: ElementOps.h:195
armarx::DebugDrawerToArViz::removePolygonDebugLayerVisu
void removePolygonDebugLayerVisu(const std::string &name, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:653
armarx::DebugDrawerToArViz::setLineSetDebugLayerVisu
void setLineSetDebugLayerVisu(const std::string &name, const DebugDrawerLineSet &lineSet, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:456
armarx::VariantType::Int
const VariantTypeId Int
Definition: Variant.h:916
armarx::DebugDrawerToArViz::setPolygonVisu
void setPolygonVisu(const std::string &layer, const std::string &name, const PolygonPointList &polygonPoints, const DrawColor &colorInner, const DrawColor &colorBorder, Ice::Float lineWidth, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:275
armarx::DebugDrawerToArViz::getSelections
DebugDrawerSelectionList getSelections(const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:764
armarx::DebugDrawerToArViz::exportScene
void exportScene(const std::string &filename, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:110
armarx::DebugDrawerToArViz::removeArrowDebugLayerVisu
void removeArrowDebugLayerVisu(const std::string &name, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:661
armarx::DebugDrawerToArViz::updateBlackWhitelist
void updateBlackWhitelist(const BlackWhitelistUpdate &update, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:87
Logging.h
armarx::viz::PointCloud::addPoint
PointCloud & addPoint(ColoredPoint const &p)
Definition: PointCloud.h:83
armarx::viz::Path
Definition: Path.h:31
ARMARX_CHECK_EQUAL
#define ARMARX_CHECK_EQUAL(lhs, rhs)
This macro evaluates whether lhs is equal (==) rhs and if it turns out to be false it will throw an E...
Definition: ExpressionException.h:130
armarx::DebugDrawerToArViz::enableLayerVisu
void enableLayerVisu(const std::string &layer, bool visible, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:700
armarx::viz::Client::layer
Layer layer(std::string const &name) const
Definition: Client.cpp:73
armarx::DebugDrawerToArViz::setTriMeshVisu
void setTriMeshVisu(const std::string &layer, const std::string &name, const DebugDrawerTriMesh &triMesh, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:291
armarx::DebugDrawerToArViz::setArrowDebugLayerVisu
void setArrowDebugLayerVisu(const std::string &name, const Vector3BasePtr &position, const Vector3BasePtr &direction, const DrawColor &color, Ice::Float length, Ice::Float width, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:488
armarx::viz::Client
Definition: Client.h:109
armarx::viz::Layer
Definition: Layer.h:12
armarx::DebugDrawerToArViz::setTextVisu
void setTextVisu(const std::string &layer, const std::string &name, const std::string &text, const Vector3BasePtr &globalPosition, const DrawColor &color, Ice::Int size, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:196
armarx::DebugDrawerToArViz::removeLineSetVisu
void removeLineSetVisu(const std::string &layer, const std::string &name, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:519
armarx::DebugDrawerToArViz::removePoseVisu
void removePoseVisu(const std::string &layer, const std::string &name, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:503
armarx::DebugDrawerToArViz::setSphereDebugLayerVisu
void setSphereDebugLayerVisu(const std::string &name, const Vector3BasePtr &globalPosition, const DrawColor &color, Ice::Float radius, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:468
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:28
armarx::DebugDrawerToArViz::removeLineSetDebugLayerVisu
void removeLineSetDebugLayerVisu(const std::string &name, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:625
armarx::DebugDrawerToArViz::removeTriMeshDebugLayerVisu
void removeTriMeshDebugLayerVisu(const std::string &name, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:657
armarx::DebugDrawerToArViz::removeCylinderDebugLayerVisu
void removeCylinderDebugLayerVisu(const std::string &name, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:665
armarx::DebugDrawerToArViz::setArViz
void setArViz(viz::Client arviz)
Definition: DebugDrawerToArViz.cpp:81
armarx::viz::ArrowCircle
Definition: Elements.h:229