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 
25 #include <SimoxUtility/color/interpolation.h>
26 #include <SimoxUtility/math/pose/pose.h>
27 
30 
31 #include "BlackWhitelistUpdate.h"
32 
33 
34 #define FUNCTION_NOT_IMPLEMENTED_MESSAGE \
35  "Function DebugDrawerToArViz::" << __FUNCTION__ << "(): Not implemented."
36 
37 #define LOG_FUNCTION_NOT_IMPLEMENTED_MESSAGE() ARMARX_VERBOSE << FUNCTION_NOT_IMPLEMENTED_MESSAGE
38 
39 namespace armarx
40 {
41 
42  namespace
43  {
44  Eigen::Vector3f
45  toEigen(Vector3BasePtr v)
46  {
48  return {v->x, v->y, v->z};
49  }
50 
51  Eigen::Vector3f
52  toEigen(DebugDrawerPointCloudElement e)
53  {
54  return {e.x, e.y, e.z};
55  }
56 
58  toEigen(QuaternionBasePtr q)
59  {
61  return Eigen::Quaternionf(q->qw, q->qx, q->qy, q->qz);
62  }
63 
65  toEigen(PoseBasePtr pose)
66  {
68  return simox::math::pose(toEigen(pose->position), toEigen(pose->orientation));
69  }
70 
72  toSimox(DrawColor c)
73  {
74  return simox::Color(c.r, c.g, c.b, c.a);
75  }
76 
78  toViz(DrawColor c)
79  {
80  return viz::Color(toSimox(c));
81  }
82  } // namespace
83 
84  void
86  {
87  this->arviz = arviz;
88  }
89 
90  void
91  DebugDrawerToArViz::updateBlackWhitelist(const BlackWhitelistUpdate& update,
92  const Ice::Current&)
93  {
94  std::scoped_lock lock(mutex);
95 
97  ARMARX_VERBOSE << "Updated layer black-whitelist: \n" << layerBlackWhitelist;
98 
99  // Remove all excluded layers.
100  std::vector<viz::Layer> cleared;
101  for (const auto& [name, layer] : layers)
102  {
104  {
105  cleared.push_back(arviz.layer(name));
106  }
107  }
108  if (!cleared.empty())
109  {
110  arviz.commit(cleared);
111  }
112  }
113 
114  void
115  DebugDrawerToArViz::exportScene(const std::string&, const Ice::Current&)
116  {
118  }
119 
120  void
121  DebugDrawerToArViz::exportLayer(const std::string&, const std::string&, const Ice::Current&)
122  {
124  }
125 
126  void
127  DebugDrawerToArViz::setPoseVisu(const std::string& layer,
128  const std::string& name,
129  const PoseBasePtr& globalPose,
130  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)));
138  }
139 
140  void
141  DebugDrawerToArViz::setScaledPoseVisu(const std::string& layer,
142  const std::string& name,
143  const PoseBasePtr& globalPose,
144  Ice::Float scale,
145  const Ice::Current&)
146  {
147  std::scoped_lock lock(mutex);
148  if (layerBlackWhitelist.isExcluded(layer))
149  {
150  return;
151  }
152  setAndCommit(layer, viz::Pose(name).pose(toEigen(globalPose)).scale(scale));
153  }
154 
155  void
156  DebugDrawerToArViz::setLineVisu(const std::string& layer,
157  const std::string& name,
158  const Vector3BasePtr& globalPosition1,
159  const Vector3BasePtr& globalPosition2,
160  Ice::Float lineWidth,
161  const DrawColor& color,
162  const Ice::Current&)
163  {
164  std::scoped_lock lock(mutex);
165  if (layerBlackWhitelist.isExcluded(layer))
166  {
167  return;
168  }
169  setAndCommit(layer,
170  viz::Path(name)
171  .addPoint(toEigen(globalPosition1))
172  .addPoint(toEigen(globalPosition2))
173  .color(toViz(color))
174  .width(lineWidth)
175  .color(simox::Color::black(0)));
176  }
177 
178  void
179  DebugDrawerToArViz::setLineSetVisu(const std::string& layerName,
180  const std::string& name,
181  const DebugDrawerLineSet& lineSet,
182  const Ice::Current&)
183  {
184  std::scoped_lock lock(mutex);
185  if (layerBlackWhitelist.isExcluded(layerName))
186  {
187  return;
188  }
189 
190  viz::Layer& layer = getLayer(layerName);
191  ARMARX_CHECK_EQUAL(lineSet.points.size() % 2, 0) << VAROUT(lineSet.points.size());
192  ARMARX_CHECK_EQUAL(lineSet.intensities.size(), lineSet.points.size() / 2);
193 
194  if (lineSet.useHeatMap)
195  {
196  ARMARX_VERBOSE << "DebugDrawerToArViz::" << __FUNCTION__ << "(): "
197  << "'useHeatMap' not supported.";
198  }
199 
200  simox::Color color0 = toSimox(lineSet.colorNoIntensity);
201  simox::Color color1 = toSimox(lineSet.colorFullIntensity);
202 
203  for (size_t i = 0; i + 1 < lineSet.points.size(); i += 2)
204  {
205  const auto& p1 = lineSet.points[i];
206  const auto& p2 = lineSet.points[i + 1];
207  float intensity = lineSet.intensities[i / 2];
208  simox::Color color = simox::color::interpol::linear(intensity, color0, color1);
209 
210  std::stringstream ss;
211  ss << name << "/" << i << "_" << i + 1;
212  setLayerElement(layer,
213  viz::Polygon(ss.str())
214  .addPoint(toEigen(p1))
215  .addPoint(toEigen(p2))
216  .lineColor(color)
217  .lineWidth(lineSet.lineWidth)
218  .color(simox::Color::black(0)));
219  }
220  arviz.commit({layer});
221  }
222 
223  void
224  DebugDrawerToArViz::setBoxVisu(const std::string& layer,
225  const std::string& name,
226  const PoseBasePtr& globalPose,
227  const Vector3BasePtr& dimensions,
228  const DrawColor& color,
229  const Ice::Current&)
230  {
231  std::scoped_lock lock(mutex);
232  if (layerBlackWhitelist.isExcluded(layer))
233  {
234  return;
235  }
236  setAndCommit(
237  layer,
238  viz::Box(name).pose(toEigen(globalPose)).size(toEigen(dimensions)).color(toViz(color)));
239  }
240 
241  void
242  DebugDrawerToArViz::setTextVisu(const std::string& layer,
243  const std::string& name,
244  const std::string& text,
245  const Vector3BasePtr& globalPosition,
246  const DrawColor& color,
247  Ice::Int size,
248  const Ice::Current&)
249  {
250  std::scoped_lock lock(mutex);
251  if (layerBlackWhitelist.isExcluded(layer))
252  {
253  return;
254  }
255  setAndCommit(layer,
256  viz::Text(name)
257  .text(text)
258  .position(toEigen(globalPosition))
259  .scale(size)
260  .color(toViz(color)));
261  }
262 
263  void
264  DebugDrawerToArViz::setSphereVisu(const std::string& layer,
265  const std::string& name,
266  const Vector3BasePtr& globalPosition,
267  const DrawColor& color,
268  Ice::Float radius,
269  const Ice::Current&)
270  {
271  std::scoped_lock lock(mutex);
272  if (layerBlackWhitelist.isExcluded(layer))
273  {
274  return;
275  }
276  setAndCommit(
277  layer,
278  viz::Sphere(name).position(toEigen(globalPosition)).radius(radius).color(toViz(color)));
279  }
280 
281  void
282  DebugDrawerToArViz::setPointCloudVisu(const std::string& layer,
283  const std::string& name,
284  const DebugDrawerPointCloud& pointCloud,
285  const Ice::Current&)
286  {
287  std::scoped_lock lock(mutex);
288  if (layerBlackWhitelist.isExcluded(layer))
289  {
290  return;
291  }
292 
293  viz::PointCloud cloud(name);
294  for (const auto& p : pointCloud.points)
295  {
296  cloud.addPoint(p.x, p.y, p.z);
297  }
298  setAndCommit(layer, cloud.pointSizeInPixels(pointCloud.pointSize));
299  }
300 
301  void
303  const std::string& name,
304  const DebugDrawerColoredPointCloud& pointCloud,
305  const Ice::Current&)
306  {
307  std::scoped_lock lock(mutex);
308  if (layerBlackWhitelist.isExcluded(layer))
309  {
310  return;
311  }
312 
313  viz::PointCloud cloud(name);
314  for (const auto& p : pointCloud.points)
315  {
316  viz::ColoredPoint cp;
317  cp.x = p.x;
318  cp.y = p.y;
319  cp.z = p.z;
320  cp.color = toViz(p.color);
321  cloud.addPoint(cp);
322  }
323  setAndCommit(layer, cloud.pointSizeInPixels(pointCloud.pointSize));
324  }
325 
326  void
328  const std::string& layer,
329  const std::string& name,
330  const DebugDrawer24BitColoredPointCloud& pointCloud,
331  const Ice::Current&)
332  {
333  std::scoped_lock lock(mutex);
334  if (layerBlackWhitelist.isExcluded(layer))
335  {
336  return;
337  }
338 
339  viz::PointCloud cloud(name);
340  for (const auto& p : pointCloud.points)
341  {
342  viz::ColoredPoint cp;
343  cp.x = p.x;
344  cp.y = p.y;
345  cp.z = p.z;
346  cp.color = viz::Color(simox::Color(p.color.r, p.color.g, p.color.b));
347  cloud.addPoint(cp);
348  }
349  setAndCommit(layer, cloud.pointSizeInPixels(pointCloud.pointSize));
350  }
351 
352  void
353  DebugDrawerToArViz::setPolygonVisu(const std::string& layer,
354  const std::string& name,
355  const PolygonPointList& polygonPoints,
356  const DrawColor& colorInner,
357  const DrawColor& colorBorder,
358  Ice::Float lineWidth,
359  const Ice::Current&)
360  {
361  std::scoped_lock lock(mutex);
362  if (layerBlackWhitelist.isExcluded(layer))
363  {
364  return;
365  }
366 
367  viz::Polygon poly(name);
368  for (const auto& p : polygonPoints)
369  {
370  poly.addPoint(toEigen(p));
371  }
372  setAndCommit(
373  layer,
374  poly.color(toViz(colorInner)).lineColor(toViz(colorBorder)).lineWidth(lineWidth));
375  }
376 
377  void
378  DebugDrawerToArViz::setTriMeshVisu(const std::string& layer,
379  const std::string& name,
380  const DebugDrawerTriMesh& triMesh,
381  const Ice::Current&)
382  {
383  std::scoped_lock lock(mutex);
384  if (layerBlackWhitelist.isExcluded(layer))
385  {
386  return;
387  }
388 
389  std::vector<Eigen::Vector3f> vertices;
390  std::vector<viz::data::Color> colors;
391  std::vector<viz::data::Face> faces;
392  for (const auto& v : triMesh.vertices)
393  {
394  vertices.emplace_back(v.x, v.y, v.z);
395  }
396  for (const auto& c : triMesh.colors)
397  {
398  colors.emplace_back(toViz(c));
399  }
400  for (const auto& f : triMesh.faces)
401  {
402  viz::data::Face& face = faces.emplace_back();
403  face.v0 = f.vertex1.vertexID;
404  face.v1 = f.vertex2.vertexID;
405  face.v2 = f.vertex3.vertexID;
406  face.c0 = f.vertex1.colorID;
407  face.c1 = f.vertex2.colorID;
408  face.c2 = f.vertex3.colorID;
409  }
410  setAndCommit(layer, viz::Mesh(name).vertices(vertices).colors(colors).faces(faces));
411  }
412 
413  void
414  DebugDrawerToArViz::setArrowVisu(const std::string& layer,
415  const std::string& name,
416  const Vector3BasePtr& position,
417  const Vector3BasePtr& direction,
418  const DrawColor& color,
419  Ice::Float length,
420  Ice::Float width,
421  const Ice::Current&)
422  {
423  std::scoped_lock lock(mutex);
424  if (layerBlackWhitelist.isExcluded(layer))
425  {
426  return;
427  }
428  setAndCommit(layer,
429  viz::Arrow(name)
430  .position(toEigen(position))
431  .direction(toEigen(direction))
432  .color(toViz(color))
433  .width(width)
434  .length(length));
435  }
436 
437  void
438  DebugDrawerToArViz::setCylinderVisu(const std::string& layer,
439  const std::string& name,
440  const Vector3BasePtr& globalPosition,
441  const Vector3BasePtr& direction,
442  Ice::Float length,
443  Ice::Float radius,
444  const DrawColor& color,
445  const Ice::Current&)
446  {
447  std::scoped_lock lock(mutex);
448  if (layerBlackWhitelist.isExcluded(layer))
449  {
450  return;
451  }
452  setAndCommit(layer,
453  viz::Cylinder(name)
454  .fromTo(toEigen(globalPosition),
455  toEigen(globalPosition) + length * toEigen(direction))
456  .color(toViz(color))
457  .radius(radius));
458  }
459 
460  void
461  DebugDrawerToArViz::setCircleArrowVisu(const std::string& layer,
462  const std::string& name,
463  const Vector3BasePtr& globalPosition,
464  const Vector3BasePtr& directionVec,
465  Ice::Float radius,
466  Ice::Float circleCompletion,
467  Ice::Float width,
468  const DrawColor& color,
469  const Ice::Current&)
470  {
471  std::scoped_lock lock(mutex);
472  if (layerBlackWhitelist.isExcluded(layer))
473  {
474  return;
475  }
476  setAndCommit(layer,
477  viz::ArrowCircle(name)
478  .position(toEigen(globalPosition))
479  .normal(toEigen(directionVec))
480  .radius(radius)
481  .completion(circleCompletion)
482  .color(toViz(color))
483  .width(width));
484  }
485 
486  void
487  DebugDrawerToArViz::setRobotVisu(const std::string& layer,
488  const std::string& name,
489  const std::string& robotFile,
490  const std::string& armarxProject,
491  DrawStyle drawStyleType,
492  const Ice::Current&)
493  {
494  std::scoped_lock lock(mutex);
495  if (layerBlackWhitelist.isExcluded(layer))
496  {
497  return;
498  }
499 
500  viz::Robot robot = viz::Robot(name).file(armarxProject, robotFile);
501  switch (drawStyleType)
502  {
503  case DrawStyle::CollisionModel:
504  robot.useCollisionModel();
505  break;
506  case DrawStyle::FullModel:
507  robot.useFullModel();
508  break;
509  }
510 
511  robots.emplace(std::make_pair(layer, name), robot);
512  setAndCommit(layer, robot);
513  }
514 
515  void
516  DebugDrawerToArViz::updateRobotPose(const std::string& layer,
517  const std::string& name,
518  const PoseBasePtr& globalPose,
519  const Ice::Current&)
520  {
521  std::scoped_lock lock(mutex);
522  if (layerBlackWhitelist.isExcluded(layer))
523  {
524  return;
525  }
526  if (auto it = robots.find(std::make_pair(layer, name)); it != robots.end())
527  {
528  viz::Robot& robot = it->second;
529  robot.pose(toEigen(globalPose));
530  }
531  arviz.commit({getLayer(layer)});
532  }
533 
534  void
535  DebugDrawerToArViz::updateRobotConfig(const std::string& layer,
536  const std::string& name,
537  const NameValueMap& configuration,
538  const Ice::Current&)
539  {
540  std::scoped_lock lock(mutex);
541  if (layerBlackWhitelist.isExcluded(layer))
542  {
543  return;
544  }
545  if (auto it = robots.find(std::make_pair(layer, name)); it != robots.end())
546  {
547  viz::Robot& robot = it->second;
548  robot.joints(configuration);
549  }
550  arviz.commit({getLayer(layer)});
551  }
552 
553  void
554  DebugDrawerToArViz::updateRobotColor(const std::string& layer,
555  const std::string& name,
556  const DrawColor& color,
557  const Ice::Current&)
558  {
559  std::scoped_lock lock(mutex);
560  if (layerBlackWhitelist.isExcluded(layer))
561  {
562  return;
563  }
564  if (auto it = robots.find(std::make_pair(layer, name)); it != robots.end())
565  {
566  viz::Robot& robot = it->second;
567  robot.overrideColor(toViz(color));
568  }
569  arviz.commit({getLayer(layer)});
570  }
571 
572  void
574  const std::string& name,
575  const std::string& robotNodeName,
576  const DrawColor& color,
577  const Ice::Current&)
578  {
579  (void)layer, (void)name, (void)robotNodeName, (void)color;
581  }
582 
583  void
584  DebugDrawerToArViz::removeRobotVisu(const std::string& layer,
585  const std::string& name,
586  const Ice::Current&)
587  {
588  std::scoped_lock lock(mutex);
589  if (layerBlackWhitelist.isExcluded(layer))
590  {
591  return;
592  }
593  robots.erase(std::make_pair(layer, name));
594  removeAndCommit(layer, name);
595  }
596 
597  void
599  const PoseBasePtr& globalPose,
600  const Ice::Current& c)
601  {
602  setPoseVisu(DEBUG_LAYER_NAME, name, globalPose, c);
603  }
604 
605  void
607  const PoseBasePtr& globalPose,
608  Ice::Float scale,
609  const Ice::Current& c)
610  {
611  setScaledPoseVisu(DEBUG_LAYER_NAME, name, globalPose, scale, c);
612  }
613 
614  void
616  const Vector3BasePtr& globalPosition1,
617  const Vector3BasePtr& globalPosition2,
618  Ice::Float lineWidth,
619  const DrawColor& color,
620  const Ice::Current& c)
621  {
622  setLineVisu(DEBUG_LAYER_NAME, name, globalPosition1, globalPosition2, lineWidth, color, c);
623  }
624 
625  void
627  const DebugDrawerLineSet& lineSet,
628  const Ice::Current& c)
629  {
630  setLineSetVisu(DEBUG_LAYER_NAME, name, lineSet, c);
631  }
632 
633  void
635  const PoseBasePtr& globalPose,
636  const Vector3BasePtr& dimensions,
637  const DrawColor& color,
638  const Ice::Current& c)
639  {
640  setBoxVisu(DEBUG_LAYER_NAME, name, globalPose, dimensions, color, c);
641  }
642 
643  void
645  const std::string& text,
646  const Vector3BasePtr& globalPosition,
647  const DrawColor& color,
648  Ice::Int size,
649  const Ice::Current& c)
650  {
651  setTextVisu(DEBUG_LAYER_NAME, name, text, globalPosition, color, size, c);
652  }
653 
654  void
656  const Vector3BasePtr& globalPosition,
657  const DrawColor& color,
658  Ice::Float radius,
659  const Ice::Current& c)
660  {
661  setSphereVisu(DEBUG_LAYER_NAME, name, globalPosition, color, radius, c);
662  }
663 
664  void
666  const DebugDrawerPointCloud& pointCloud,
667  const Ice::Current& c)
668  {
669  setPointCloudVisu(DEBUG_LAYER_NAME, name, pointCloud, c);
670  }
671 
672  void
674  const std::string& name,
675  const DebugDrawer24BitColoredPointCloud& pointCloud,
676  const Ice::Current& c)
677  {
678  set24BitColoredPointCloudVisu(DEBUG_LAYER_NAME, name, pointCloud, c);
679  }
680 
681  void
683  const PolygonPointList& polygonPoints,
684  const DrawColor& colorInner,
685  const DrawColor& colorBorder,
686  Ice::Float lineWidth,
687  const Ice::Current& c)
688  {
690  DEBUG_LAYER_NAME, name, polygonPoints, colorInner, colorBorder, lineWidth, c);
691  }
692 
693  void
695  const DebugDrawerTriMesh& triMesh,
696  const Ice::Current& c)
697  {
698  setTriMeshVisu(DEBUG_LAYER_NAME, name, triMesh, c);
699  }
700 
701  void
703  const Vector3BasePtr& position,
704  const Vector3BasePtr& direction,
705  const DrawColor& color,
706  Ice::Float length,
707  Ice::Float width,
708  const Ice::Current& c)
709  {
710  setArrowVisu(DEBUG_LAYER_NAME, name, position, direction, color, length, width, c);
711  }
712 
713  void
715  const Vector3BasePtr& globalPosition,
716  const Vector3BasePtr& direction,
717  Ice::Float length,
718  Ice::Float radius,
719  const DrawColor& color,
720  const Ice::Current& c)
721  {
723  DEBUG_LAYER_NAME, name, globalPosition, direction, length, radius, color, c);
724  }
725 
726  void
728  const Vector3BasePtr& globalPosition,
729  const Vector3BasePtr& directionVec,
730  Ice::Float radius,
731  Ice::Float circleCompletion,
732  Ice::Float width,
733  const DrawColor& color,
734  const Ice::Current&)
735  {
736  (void)name, (void)globalPosition, (void)directionVec, (void)radius, (void)circleCompletion,
737  (void)width, (void)color;
739  }
740 
741  void
742  DebugDrawerToArViz::removePoseVisu(const std::string& layer,
743  const std::string& name,
744  const Ice::Current&)
745  {
746  std::scoped_lock lock(mutex);
747  if (layerBlackWhitelist.isIncluded(layer))
748  {
749  removeAndCommit(layer, name);
750  }
751  }
752 
753  void
754  DebugDrawerToArViz::removeLineVisu(const std::string& layer,
755  const std::string& name,
756  const Ice::Current&)
757  {
758  std::scoped_lock lock(mutex);
759  if (layerBlackWhitelist.isIncluded(layer))
760  {
761  removeAndCommit(layer, name);
762  }
763  }
764 
765  void
766  DebugDrawerToArViz::removeLineSetVisu(const std::string& layer,
767  const std::string& name,
768  const Ice::Current&)
769  {
770  std::scoped_lock lock(mutex);
771  if (layerBlackWhitelist.isIncluded(layer))
772  {
773  removeAndCommit(layer, name);
774  }
775  }
776 
777  void
778  DebugDrawerToArViz::removeBoxVisu(const std::string& layer,
779  const std::string& name,
780  const Ice::Current&)
781  {
782  std::scoped_lock lock(mutex);
783  if (layerBlackWhitelist.isIncluded(layer))
784  {
785  removeAndCommit(layer, name);
786  }
787  }
788 
789  void
790  DebugDrawerToArViz::removeTextVisu(const std::string& layer,
791  const std::string& name,
792  const Ice::Current&)
793  {
794  std::scoped_lock lock(mutex);
795  if (layerBlackWhitelist.isIncluded(layer))
796  {
797  removeAndCommit(layer, name);
798  }
799  }
800 
801  void
802  DebugDrawerToArViz::removeSphereVisu(const std::string& layer,
803  const std::string& name,
804  const Ice::Current&)
805  {
806  std::scoped_lock lock(mutex);
807  if (layerBlackWhitelist.isIncluded(layer))
808  {
809  removeAndCommit(layer, name);
810  }
811  }
812 
813  void
815  const std::string& name,
816  const Ice::Current&)
817  {
818  std::scoped_lock lock(mutex);
819  if (layerBlackWhitelist.isIncluded(layer))
820  {
821  removeAndCommit(layer, name);
822  }
823  }
824 
825  void
827  const std::string& name,
828  const Ice::Current&)
829  {
830  std::scoped_lock lock(mutex);
831  if (layerBlackWhitelist.isIncluded(layer))
832  {
833  removeAndCommit(layer, name);
834  }
835  }
836 
837  void
839  const std::string& name,
840  const Ice::Current&)
841  {
842  std::scoped_lock lock(mutex);
843  if (layerBlackWhitelist.isIncluded(layer))
844  {
845  removeAndCommit(layer, name);
846  }
847  }
848 
849  void
850  DebugDrawerToArViz::removePolygonVisu(const std::string& layer,
851  const std::string& name,
852  const Ice::Current&)
853  {
854  std::scoped_lock lock(mutex);
855  if (layerBlackWhitelist.isIncluded(layer))
856  {
857  removeAndCommit(layer, name);
858  }
859  }
860 
861  void
862  DebugDrawerToArViz::removeTriMeshVisu(const std::string& layer,
863  const std::string& name,
864  const Ice::Current&)
865  {
866  std::scoped_lock lock(mutex);
867  if (layerBlackWhitelist.isIncluded(layer))
868  {
869  removeAndCommit(layer, name);
870  }
871  }
872 
873  void
874  DebugDrawerToArViz::removeArrowVisu(const std::string& layer,
875  const std::string& name,
876  const Ice::Current&)
877  {
878  std::scoped_lock lock(mutex);
879  if (layerBlackWhitelist.isIncluded(layer))
880  {
881  removeAndCommit(layer, name);
882  }
883  }
884 
885  void
886  DebugDrawerToArViz::removeCylinderVisu(const std::string& layer,
887  const std::string& name,
888  const Ice::Current&)
889  {
890  std::scoped_lock lock(mutex);
891  if (layerBlackWhitelist.isIncluded(layer))
892  {
893  removeAndCommit(layer, name);
894  }
895  }
896 
897  void
898  DebugDrawerToArViz::removeCircleVisu(const std::string& layer,
899  const std::string& name,
900  const Ice::Current&)
901  {
902  std::scoped_lock lock(mutex);
903  if (layerBlackWhitelist.isIncluded(layer))
904  {
905  removeAndCommit(layer, name);
906  }
907  }
908 
909  void
910  DebugDrawerToArViz::removePoseDebugLayerVisu(const std::string& name, const Ice::Current&)
911  {
912  removePointCloudVisu(DEBUG_LAYER_NAME, name);
913  }
914 
915  void
916  DebugDrawerToArViz::removeLineDebugLayerVisu(const std::string& name, const Ice::Current&)
917  {
918  removeLineVisu(DEBUG_LAYER_NAME, name);
919  }
920 
921  void
922  DebugDrawerToArViz::removeLineSetDebugLayerVisu(const std::string& name, const Ice::Current&)
923  {
924  removeLineSetVisu(DEBUG_LAYER_NAME, name);
925  }
926 
927  void
928  DebugDrawerToArViz::removeBoxDebugLayerVisu(const std::string& name, const Ice::Current&)
929  {
930  removeBoxVisu(DEBUG_LAYER_NAME, name);
931  }
932 
933  void
934  DebugDrawerToArViz::removeTextDebugLayerVisu(const std::string& name, const Ice::Current&)
935  {
936  removeTextVisu(DEBUG_LAYER_NAME, name);
937  }
938 
939  void
940  DebugDrawerToArViz::removeSphereDebugLayerVisu(const std::string& name, const Ice::Current&)
941  {
942  removeSphereVisu(DEBUG_LAYER_NAME, name);
943  }
944 
945  void
946  DebugDrawerToArViz::removePointCloudDebugLayerVisu(const std::string& name, const Ice::Current&)
947  {
948  removePointCloudVisu(DEBUG_LAYER_NAME, name);
949  }
950 
951  void
953  const Ice::Current&)
954  {
955  removeColoredPointCloudVisu(DEBUG_LAYER_NAME, name);
956  }
957 
958  void
960  const Ice::Current&)
961  {
962  remove24BitColoredPointCloudVisu(DEBUG_LAYER_NAME, name);
963  }
964 
965  void
966  DebugDrawerToArViz::removePolygonDebugLayerVisu(const std::string& name, const Ice::Current&)
967  {
968  removePolygonVisu(DEBUG_LAYER_NAME, name);
969  }
970 
971  void
972  DebugDrawerToArViz::removeTriMeshDebugLayerVisu(const std::string& name, const Ice::Current&)
973  {
974  removeTriMeshVisu(DEBUG_LAYER_NAME, name);
975  }
976 
977  void
978  DebugDrawerToArViz::removeArrowDebugLayerVisu(const std::string& name, const Ice::Current&)
979  {
980  removeArrowVisu(DEBUG_LAYER_NAME, name);
981  }
982 
983  void
984  DebugDrawerToArViz::removeCylinderDebugLayerVisu(const std::string& name, const Ice::Current&)
985  {
986  removeCylinderVisu(DEBUG_LAYER_NAME, name);
987  }
988 
989  void
990  DebugDrawerToArViz::removeCircleDebugLayerVisu(const std::string& name, const Ice::Current&)
991  {
992  removeCircleVisu(DEBUG_LAYER_NAME, name);
993  }
994 
995  void
996  DebugDrawerToArViz::clearAll(const Ice::Current&)
997  {
998  std::scoped_lock lock(mutex);
999 
1000  std::vector<viz::Layer> commit;
1001  commit.reserve(layers.size());
1002  for (auto& [name, layer] : layers)
1003  {
1004  layer.clear();
1005  commit.push_back(layer);
1006  }
1007  arviz.commit(commit);
1008  }
1009 
1010  void
1011  DebugDrawerToArViz::clearLayer(const std::string& layerName, const Ice::Current&)
1012  {
1013  std::scoped_lock lock(mutex);
1014 
1015  viz::Layer layer = getLayer(layerName);
1016  layer.clear();
1017  arviz.commit({layer});
1018  }
1019 
1020  void
1022  {
1023  clearLayer(DEBUG_LAYER_NAME);
1024  }
1025 
1026  void
1027  DebugDrawerToArViz::enableLayerVisu(const std::string& layer, bool visible, const Ice::Current&)
1028  {
1029  (void)layer, (void)visible;
1031  }
1032 
1033  void
1034  DebugDrawerToArViz::enableDebugLayerVisu(bool visible, const Ice::Current&)
1035  {
1036  enableLayerVisu(DEBUG_LAYER_NAME, visible);
1037  }
1038 
1039  Ice::StringSeq
1040  DebugDrawerToArViz::layerNames(const Ice::Current&)
1041  {
1043  return {};
1044  }
1045 
1046  LayerInformationSequence
1048  {
1050  return {};
1051  }
1052 
1053  bool
1054  DebugDrawerToArViz::hasLayer(const std::string&, const Ice::Current&)
1055  {
1057  return false;
1058  }
1059 
1060  void
1061  DebugDrawerToArViz::removeLayer(const std::string&, const Ice::Current&)
1062  {
1064  }
1065 
1066  void
1068  {
1070  }
1071 
1072  void
1074  {
1076  }
1077 
1078  void
1079  DebugDrawerToArViz::enableSelections(const std::string&, const Ice::Current&)
1080  {
1082  }
1083 
1084  void
1085  DebugDrawerToArViz::disableSelections(const std::string&, const Ice::Current&)
1086  {
1088  }
1089 
1090  void
1091  DebugDrawerToArViz::clearSelections(const std::string&, const Ice::Current&)
1092  {
1094  }
1095 
1096  void
1097  DebugDrawerToArViz::select(const std::string& layer,
1098  const std::string& elementName,
1099  const Ice::Current&)
1100  {
1101  (void)layer, (void)elementName;
1103  }
1104 
1105  void
1106  DebugDrawerToArViz::deselect(const std::string& layer,
1107  const std::string& elementName,
1108  const Ice::Current&)
1109  {
1110  (void)layer, (void)elementName;
1112  }
1113 
1114  DebugDrawerSelectionList
1116  {
1118  return {};
1119  }
1120 
1121  viz::Layer&
1122  DebugDrawerToArViz::getLayer(const std::string& layerName)
1123  {
1124  if (auto it = layers.find(layerName); it != layers.end())
1125  {
1126  return it->second;
1127  }
1128  else
1129  {
1130  return layers.emplace(layerName, arviz.layer(layerName)).first->second;
1131  }
1132  }
1133 
1134  viz::data::ElementSeq::iterator
1135  DebugDrawerToArViz::findLayerElement(viz::Layer& layer, const std::string& elementName)
1136  {
1137  return std::find_if(layer.data_.elements.begin(),
1138  layer.data_.elements.end(),
1139  [&elementName](const viz::data::ElementPtr& e)
1140  { return e->id == elementName; });
1141  }
1142 
1143  void
1144  DebugDrawerToArViz::removeLayerElement(viz::Layer& layer, const std::string& name)
1145  {
1146  auto it = findLayerElement(layer, name);
1147  if (it != layer.data_.elements.end())
1148  {
1149  layer.data_.elements.erase(it);
1150  }
1151  }
1152 
1153  void
1154  DebugDrawerToArViz::removeAndCommit(const std::string& layerName, const std::string& name)
1155  {
1156  viz::Layer& layer = getLayer(layerName);
1157  removeLayerElement(layer, name);
1158  arviz.commit({layer});
1159  }
1160 
1161 } // namespace armarx
armarx::DebugDrawerToArViz::removeSphereDebugLayerVisu
void removeSphereDebugLayerVisu(const std::string &name, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:940
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:644
armarx::DebugDrawerToArViz::layerNames
Ice::StringSeq layerNames(const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:1040
armarx::viz::Client::commit
CommitResult commit(StagedCommit const &commit)
Definition: Client.cpp:89
ARMARX_VERBOSE
#define ARMARX_VERBOSE
Definition: Logging.h:187
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:727
armarx::DebugDrawerToArViz::layerBlackWhitelist
armarx::StringBlackWhitelist layerBlackWhitelist
Definition: DebugDrawerToArViz.h:400
armarx::DebugDrawerToArViz::removePointCloudDebugLayerVisu
void removePointCloudDebugLayerVisu(const std::string &name, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:946
armarx::VariantType::Float
const VariantTypeId Float
Definition: Variant.h:919
armarx::DebugDrawerToArViz::exportLayer
void exportLayer(const std::string &filename, const std::string &layerName, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:121
armarx::DebugDrawerToArViz::removeTextVisu
void removeTextVisu(const std::string &layer, const std::string &name, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:790
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:438
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:264
armarx::DebugDrawerToArViz::set24BitColoredPointCloudDebugLayerVisu
void set24BitColoredPointCloudDebugLayerVisu(const std::string &name, const DebugDrawer24BitColoredPointCloud &pointCloud, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:673
armarx::updateBlackWhitelist
void updateBlackWhitelist(StringBlackWhitelist &bw, const armarx::BlackWhitelistUpdate &update)
Definition: BlackWhitelistUpdate.h:13
armarx::viz::toEigen
Eigen::Matrix4f toEigen(data::GlobalPose const &pose)
Definition: Interaction.h:48
armarx::DebugDrawerToArViz::removeSphereVisu
void removeSphereVisu(const std::string &layer, const std::string &name, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:802
armarx::viz::Layer::clear
void clear()
Definition: Layer.h:24
armarx::DebugDrawerToArViz::removeLineDebugLayerVisu
void removeLineDebugLayerVisu(const std::string &name, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:916
GfxTL::Matrix4f
MatrixXX< 4, 4, float > Matrix4f
Definition: MatrixXX.h:650
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:910
armarx::viz::Mesh
Definition: Mesh.h:28
armarx::DebugDrawerToArViz::enableSelections
void enableSelections(const std::string &, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:1079
armarx::DebugDrawerToArViz::removePointCloudVisu
void removePointCloudVisu(const std::string &layer, const std::string &name, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:814
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:714
armarx::DebugDrawerToArViz::setTriMeshDebugLayerVisu
void setTriMeshDebugLayerVisu(const std::string &name, const DebugDrawerTriMesh &triMesh, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:694
armarx::viz::Arrow
Definition: Elements.h:196
c
constexpr T c
Definition: UnscentedKalmanFilterTest.cpp:46
armarx::DebugDrawerToArViz::enableAllLayers
void enableAllLayers(const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:1073
armarx::DebugDrawerToArViz::removeBoxVisu
void removeBoxVisu(const std::string &layer, const std::string &name, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:778
armarx::DebugDrawerToArViz::removeCylinderVisu
void removeCylinderVisu(const std::string &layer, const std::string &name, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:886
armarx::DebugDrawerToArViz::removeTriMeshVisu
void removeTriMeshVisu(const std::string &layer, const std::string &name, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:862
armarx::DebugDrawerToArViz::select
void select(const std::string &layer, const std::string &elementName, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:1097
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:327
armarx::viz::Sphere
Definition: Elements.h:133
armarx::DebugDrawerToArViz::removePolygonVisu
void removePolygonVisu(const std::string &layer, const std::string &name, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:850
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:414
armarx::DebugDrawerToArViz::removeArrowVisu
void removeArrowVisu(const std::string &layer, const std::string &name, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:874
armarx::DebugDrawerToArViz::disableAllLayers
void disableAllLayers(const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:1067
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:127
armarx::viz::Robot::useFullModel
Robot & useFullModel()
Definition: Robot.h:42
armarx::DebugDrawerToArViz::removeLineVisu
void removeLineVisu(const std::string &layer, const std::string &name, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:754
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:156
armarx::DebugDrawerToArViz::clearAll
void clearAll(const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:996
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:41
armarx::DebugDrawerToArViz::remove24BitColoredPointCloudVisu
void remove24BitColoredPointCloudVisu(const std::string &layer, const std::string &name, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:838
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:461
armarx::viz::Robot::joints
Robot & joints(std::map< std::string, float > const &values)
Definition: Robot.h:74
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:634
armarx::DebugDrawerToArViz::deselect
void deselect(const std::string &layer, const std::string &elementName, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:1106
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:224
armarx::DebugDrawerToArViz::remove24BitColoredPointCloudDebugLayerVisu
void remove24BitColoredPointCloudDebugLayerVisu(const std::string &name, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:959
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:573
armarx::viz::Polygon::addPoint
Polygon & addPoint(Eigen::Vector3f p)
Definition: Elements.h:302
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:141
armarx::DebugDrawerToArViz::setPoseDebugLayerVisu
void setPoseDebugLayerVisu(const std::string &name, const PoseBasePtr &globalPose, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:598
armarx::viz::PointCloud::pointSizeInPixels
PointCloud & pointSizeInPixels(float s)
Definition: PointCloud.h:53
armarx::viz::Layer::data_
data::LayerUpdate data_
Definition: Layer.h:57
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:516
armarx::armem::human::Robot
@ Robot
Definition: util.h:17
armarx::DebugDrawerToArViz::removeCircleVisu
void removeCircleVisu(const std::string &layer, const std::string &name, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:898
armarx::DebugDrawerToArViz::removeRobotVisu
void removeRobotVisu(const std::string &layer, const std::string &name, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:584
armarx::viz::Cylinder
Definition: Elements.h:71
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:30
armarx::viz::Color
Definition: Color.h:12
armarx::viz::Robot::useCollisionModel
Robot & useCollisionModel()
Definition: Robot.h:34
DebugDrawerToArViz.h
armarx::trajectory::interpolate::linear
ReturnT linear(float t, const VariantValue &lhs, const VariantValue &rhs)
Definition: linear.h:58
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:302
armarx::viz::Robot::overrideColor
Robot & overrideColor(Color c)
Definition: Robot.h:50
armarx::viz::PointCloud
Definition: PointCloud.h:19
armarx::DebugDrawerToArViz::clearDebugLayer
void clearDebugLayer(const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:1021
armarx::DebugDrawerToArViz::hasLayer
bool hasLayer(const std::string &, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:1054
armarx::viz::Box
Definition: Elements.h:47
armarx::DebugDrawerToArViz::layerInformation
LayerInformationSequence layerInformation(const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:1047
armarx::viz::Pose
Definition: Elements.h:178
armarx::viz::Robot
Definition: Robot.h:10
armarx::DebugDrawerToArViz::removeColoredPointCloudVisu
void removeColoredPointCloudVisu(const std::string &layer, const std::string &name, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:826
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:487
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:554
Eigen::Quaternionf
Quaternion< float, 0 > Quaternionf
Definition: EigenForwardDeclarations.h:61
armarx::viz::Polygon
Definition: Elements.h:260
armarx::DebugDrawerToArViz::setPointCloudDebugLayerVisu
void setPointCloudDebugLayerVisu(const std::string &name, const DebugDrawerPointCloud &pointCloud, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:665
armarx::DebugDrawerToArViz::clearLayer
void clearLayer(const std::string &layer, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:1011
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:682
LOG_FUNCTION_NOT_IMPLEMENTED_MESSAGE
#define LOG_FUNCTION_NOT_IMPLEMENTED_MESSAGE()
Definition: DebugDrawerToArViz.cpp:37
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:179
armarx::DebugDrawerToArViz::setScaledPoseDebugLayerVisu
void setScaledPoseDebugLayerVisu(const std::string &name, const PoseBasePtr &globalPose, Ice::Float scale, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:606
armarx::viz::Text
Definition: Elements.h:183
armarx::armem::server::ltm::util::mongodb::detail::update
bool update(mongocxx::collection &coll, const nlohmann::json &query, const nlohmann::json &update)
Definition: mongodb.cpp:68
armarx::DebugDrawerToArViz::removeCircleDebugLayerVisu
void removeCircleDebugLayerVisu(const std::string &name, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:990
armarx::DebugDrawerToArViz::disableSelections
void disableSelections(const std::string &, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:1085
armarx::DebugDrawerToArViz::clearSelections
void clearSelections(const std::string &, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:1091
BlackWhitelistUpdate.h
ExpressionException.h
armarx::DebugDrawerToArViz::enableDebugLayerVisu
void enableDebugLayerVisu(bool visible, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:1034
armarx::control::njoint_controller::platform::platform_follower_controller::NameValueMap
std::map< std::string, float > NameValueMap
Definition: PlatformFollowerController.h:88
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:535
armarx::DebugDrawerToArViz::removeTextDebugLayerVisu
void removeTextDebugLayerVisu(const std::string &name, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:934
armarx::ctrlutil::v
double v(double t, double v0, double a0, double j)
Definition: CtrlUtil.h:39
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:282
armarx::DebugDrawerToArViz::removeColoredPointCloudDebugLayerVisu
void removeColoredPointCloudDebugLayerVisu(const std::string &name, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:952
armarx::viz::ElementOps::pose
DerivedT & pose(Eigen::Matrix4f const &pose)
Definition: ElementOps.h:176
armarx::DebugDrawerToArViz::removeBoxDebugLayerVisu
void removeBoxDebugLayerVisu(const std::string &name, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:928
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:615
VAROUT
#define VAROUT(x)
Definition: StringHelpers.h:198
armarx::Quaternion< float, 0 >
armarx::DebugDrawerToArViz::removeLayer
void removeLayer(const std::string &, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:1061
armarx::viz::ElementOps::color
DerivedT & color(Color color)
Definition: ElementOps.h:218
armarx::DebugDrawerToArViz::removePolygonDebugLayerVisu
void removePolygonDebugLayerVisu(const std::string &name, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:966
armarx::DebugDrawerToArViz::setLineSetDebugLayerVisu
void setLineSetDebugLayerVisu(const std::string &name, const DebugDrawerLineSet &lineSet, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:626
armarx::VariantType::Int
const VariantTypeId Int
Definition: Variant.h:917
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:353
armarx::DebugDrawerToArViz::getSelections
DebugDrawerSelectionList getSelections(const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:1115
armarx::DebugDrawerToArViz::exportScene
void exportScene(const std::string &filename, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:115
armarx::DebugDrawerToArViz::removeArrowDebugLayerVisu
void removeArrowDebugLayerVisu(const std::string &name, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:978
armarx::DebugDrawerToArViz::updateBlackWhitelist
void updateBlackWhitelist(const BlackWhitelistUpdate &update, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:91
Logging.h
armarx::viz::PointCloud::addPoint
PointCloud & addPoint(ColoredPoint const &p)
Definition: PointCloud.h:81
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:1027
armarx::viz::Client::layer
Layer layer(std::string const &name) const
Definition: Client.cpp:80
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:378
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:702
armarx::viz::Client
Definition: Client.h:117
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:242
armarx::DebugDrawerToArViz::removeLineSetVisu
void removeLineSetVisu(const std::string &layer, const std::string &name, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:766
armarx::DebugDrawerToArViz::removePoseVisu
void removePoseVisu(const std::string &layer, const std::string &name, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:742
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:655
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:27
armarx::DebugDrawerToArViz::removeLineSetDebugLayerVisu
void removeLineSetDebugLayerVisu(const std::string &name, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:922
armarx::DebugDrawerToArViz::removeTriMeshDebugLayerVisu
void removeTriMeshDebugLayerVisu(const std::string &name, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:972
armarx::DebugDrawerToArViz::removeCylinderDebugLayerVisu
void removeCylinderDebugLayerVisu(const std::string &name, const Ice::Current &=Ice::emptyCurrent) override
Definition: DebugDrawerToArViz.cpp:984
armarx::DebugDrawerToArViz::setArViz
void setArViz(viz::Client arviz)
Definition: DebugDrawerToArViz.cpp:85
armarx::viz::ArrowCircle
Definition: Elements.h:229