VizHelperRVIZ.cpp
Go to the documentation of this file.
1 
19 #include "ISM/utility/GeometryHelper.hpp"
20 
21 //Local includes
22 
23 namespace VIZ
24 {
25 
26 std::map<Eigen::Vector3i, bool, cmpVector3i > VizHelperRVIZ::binDrawn;
27 geometry_msgs::Point VizHelperRVIZ::pointToPointMsg(ISM::PointPtr point)
28 {
29  geometry_msgs::Point retPoint;
30  retPoint.x = point->eigen.x();
31  retPoint.y = point->eigen.y();
32  retPoint.z = point->eigen.z();
33  return retPoint;
34 }
35 
36 geometry_msgs::Quaternion VizHelperRVIZ::quatToQuaternionMsg(ISM::QuaternionPtr quat)
37 {
38  geometry_msgs::Quaternion retQuat;
39  retQuat.w = quat->eigen.w();
40  retQuat.x = quat->eigen.x();
41  retQuat.y = quat->eigen.y();
42  retQuat.z = quat->eigen.z();
43  return retQuat;
44 }
45 
47  ISM::ObjectPtr o, std::string baseFrame, std::string ns, int32_t id, double bin_size,
48  std_msgs::ColorRGBA binColor,
49  std_msgs::ColorRGBA voteColor)
50 {
52  ISM::PointPtr referencePoint = ISM::GeometryHelper::applyQuatAndRadiusToPose(o->pose,
53  vote->objectToRefQuat, vote->radius);
54  ISM::PosePtr destPose = ISM::GeometryHelper::getReferencePose(o->pose, referencePoint,
55  vote->objectToRefPoseQuat);
57  m.header.stamp = ros::Time::now();
58  m.header.frame_id = baseFrame;
59  m.ns = ns;
60  m.id = id;
61  m.type = visualization_msgs::Marker::ARROW;
62  m.scale.x = 0.003;
63  m.scale.y = 0.003;
64  m.scale.z = 0.003;
65  geometry_msgs::Point pO;
66  pO.x = o->pose->point->eigen.x();
67  pO.y = o->pose->point->eigen.y();
68  pO.z = o->pose->point->eigen.z();
69  geometry_msgs::Point pD;
70  pD.x = destPose->point->eigen.x();
71  pD.y = destPose->point->eigen.y();
72  pD.z = destPose->point->eigen.z();
73  m.points.push_back(pO);
74  m.points.push_back(pD);
75  m.lifetime = ros::Duration();
76  m.color = voteColor;
77  result.markers.push_back(m);
78 
79  auto refBin = getBinFromPoint(referencePoint, bin_size, baseFrame, binColor);
80  auto destBin = getBinFromPoint(destPose->point, bin_size, baseFrame, binColor);
81 
84  id + 1, 0.005, voteColor, d.toSec(), id + 2);
85  result.markers.insert(result.markers.end(), orient.markers.begin(), orient.markers.end());
86  return result;
87 }
88 
90  (ISM::PosePtr pose, std::string baseFrame, std::string markerNamespace, int id, float radius,
91  std_msgs::ColorRGBA color, double markerLifetime, int axesFirstId)
92 {
93  const double length = radius * 2;
94  const float scale = radius / 5 * 2;
96  result.markers.push_back(createSphereMarker(pose->point, baseFrame, markerNamespace, id,
97  radius, color, markerLifetime));
98 
99  std_msgs::ColorRGBA xAxeColor = createColorRGBA(1.0, 0.0, 0.0, 1.0);
100  std_msgs::ColorRGBA yAxeColor = createColorRGBA(0.0, 1.0, 0.0, 1.0);
101  std_msgs::ColorRGBA zAxeColor = createColorRGBA(0.0, 0.0, 1.0, 1.0);
102 
103  auto rot = ISM::GeometryHelper::quatToEigenQuat(pose->quat);
104  Eigen::Vector3d xV = rot._transformVector(Eigen::Vector3d::UnitX());
105  Eigen::Vector3d yV = rot._transformVector(Eigen::Vector3d::UnitY());
106  Eigen::Vector3d zV = rot._transformVector(Eigen::Vector3d::UnitZ());
107 
109  markerNamespace, axesFirstId, scale, scale, scale, xAxeColor, markerLifetime);
110  xAxe.type = visualization_msgs::Marker::ARROW;
111  xAxe.action = visualization_msgs::Marker::ADD;
112  geometry_msgs::Point xAxePStart;
113  xAxePStart.x = pose->point->eigen.x();
114  xAxePStart.y = pose->point->eigen.y();
115  xAxePStart.z = pose->point->eigen.z();
116  geometry_msgs::Point xAxePEnd;
117  xAxePEnd.x = pose->point->eigen.x() + xV.x() * length;
118  xAxePEnd.y = pose->point->eigen.y() + xV.y() * length;
119  xAxePEnd.z = pose->point->eigen.z() + xV.z() * length;
120  xAxe.points.push_back(xAxePStart);
121  xAxe.points.push_back(xAxePEnd);
122  result.markers.push_back(xAxe);
123 
125  markerNamespace, axesFirstId + 1, scale, scale, scale, yAxeColor, markerLifetime);
126  yAxe.type = visualization_msgs::Marker::ARROW;
127  yAxe.action = visualization_msgs::Marker::ADD;
128  geometry_msgs::Point yAxePStart;
129  yAxePStart.x = pose->point->eigen.x();
130  yAxePStart.y = pose->point->eigen.y();
131  yAxePStart.z = pose->point->eigen.z();
132  geometry_msgs::Point yAxePEnd;
133  yAxePEnd.x = pose->point->eigen.x() + yV.x() * length;
134  yAxePEnd.y = pose->point->eigen.y() + yV.y() * length;
135  yAxePEnd.z = pose->point->eigen.z() + yV.z() * length;
136  yAxe.points.push_back(yAxePStart);
137  yAxe.points.push_back(yAxePEnd);
138  result.markers.push_back(yAxe);
139 
141  markerNamespace, axesFirstId + 2, scale, scale, scale, zAxeColor, markerLifetime);
142  zAxe.type = visualization_msgs::Marker::ARROW;
143  zAxe.action = visualization_msgs::Marker::ADD;
144  geometry_msgs::Point zAxePStart;
145  zAxePStart.x = pose->point->eigen.x();
146  zAxePStart.y = pose->point->eigen.y();
147  zAxePStart.z = pose->point->eigen.z();
148  geometry_msgs::Point zAxePEnd;
149  zAxePEnd.x = pose->point->eigen.x() + zV.x() * length;
150  zAxePEnd.y = pose->point->eigen.y() + zV.y() * length;
151  zAxePEnd.z = pose->point->eigen.z() + zV.z() * length;
152  zAxe.points.push_back(zAxePStart);
153  zAxe.points.push_back(zAxePEnd);
154  result.markers.push_back(zAxe);
155 
156  return result;
157 }
158 
159 
160 std::vector<ISM::PosePtr> VizHelperRVIZ::posesFromTrack(ISM::TrackPtr track)
161 {
162  std::vector<ISM::PosePtr> trackPoses;
163  for (auto& obj : track->objects)
164  {
165  if (obj)
166  {
167  trackPoses.push_back(obj->pose);
168  }
169  else
170  {
171  /* to maintain the trajectory length */
172  trackPoses.push_back(ISM::PosePtr());
173  }
174  }
175 
176  return trackPoses;
177 }
178 
179 ColorRGBA VizHelperRVIZ::createColorRGBA(float red, float green, float blue, float alpha)
180 {
181  ColorRGBA retColor;
182 
183  retColor.r = red;
184  retColor.g = green;
185  retColor.b = blue;
186  retColor.a = alpha;
187 
188  return retColor;
189 }
190 
192 {
193  if(rgba.size() != 4){
194  ROS_ERROR("Calling VizHelperRVIZ::createColorRGBA with a vector with size != 4 [current size: %zu]", rgba.size());
195  return createColorRGBA(0, 0, 0, 0);
196  }
197  return createColorRGBA(rgba[0], rgba[1], rgba[2], rgba[3]);
198 }
199 
200 ColorRGBA VizHelperRVIZ::hsvToRGBA(double hue, double saturation, double value)
201 {
202  ColorRGBA retColor;
203 
204  const int hi = hue / 60;
205  const double f = (hue / 60.0 - (double) hi);
206  const double p = value * (1 - saturation);
207  const double q = value * (1 - saturation * f);
208  const double t = value * (1 - saturation * (1 - f));
209 
210  switch (hi) {
211  case 1:
212  retColor = VizHelperRVIZ::createColorRGBA(q, value, p, 1.0);
213  break;
214  case 2:
215  retColor = VizHelperRVIZ::createColorRGBA(p, value, t, 1.0);
216  break;
217  case 3:
218  retColor = VizHelperRVIZ::createColorRGBA(p, q, value, 1.0);
219  break;
220  case 4:
221  retColor = VizHelperRVIZ::createColorRGBA(t, p, value, 1.0);
222  break;
223  case 5:
224  retColor = VizHelperRVIZ::createColorRGBA(value, p, q, 1.0);
225  break;
226  default:
227  retColor = VizHelperRVIZ::createColorRGBA(value, t, p, 1.0);
228  break;
229  }
230 
231  return retColor;
232 }
233 
235 {
236  double hue = (120.0 * std::pow(confidence, 5.0));
237  return VizHelperRVIZ::hsvToRGBA(hue, 1.0, 1.0);
238 }
239 
240 ColorRGBA VizHelperRVIZ::getColorOfObject(const ISM::Object &object)
241 {
242  std::string observedId = object.observedId;
243  std::vector<float> rgba;
244  if ( ( observedId.length() == 12 ) && ( observedId.find_first_not_of("0123456789") == std::string::npos ) )
245  {
246  try
247  {
248  for (int i = 0; i <= 3; i++)
249  {
250  std::string temp;
251 
252  temp = observedId.substr( (i * 3), 3 );
253  rgba.push_back(std::stof(temp) / 100.0);
254  }
255  }
256  catch (std::invalid_argument& ia)
257  {
258  rgba.clear();
259  rgba.push_back(0);
260  rgba.push_back(0);
261  rgba.push_back(0);
262  rgba.push_back(1);
263  }
264  }
265  else
266  {
267  rgba.push_back(0);
268  rgba.push_back(0);
269  rgba.push_back(0);
270  rgba.push_back(0);
271  }
272  return VizHelperRVIZ::createColorRGBA(rgba);
273 }
274 
275 ColorRGBA VizHelperRVIZ::getColorOfObject(const ISM::ObjectPtr object_ptr)
276 {
277  return getColorOfObject(*object_ptr);
278 }
279 
280 
281 Marker VizHelperRVIZ::createMarkerWithoutTypeAndPose(std::string baseFrame, std::string markerNamespace, int id, float xScale, float yScale,
282  float zScale, ColorRGBA color, double markerLifetime)
283 {
284  Marker retMarker;
285 
286  retMarker.header.frame_id = baseFrame;
287  retMarker.header.stamp = ros::Time::now();
288  retMarker.ns = markerNamespace;
289  retMarker.id = id;
290  retMarker.scale.x = xScale;
291  retMarker.scale.y = yScale;
292  retMarker.scale.z = zScale;
293  retMarker.color = color;
294  retMarker.lifetime = ros::Duration(markerLifetime);
295 
296  return retMarker;
297 }
298 
299 
300 
301 Marker VizHelperRVIZ::createSphereMarker(ISM::PointPtr point, std::string baseFrame,
302  std::string markerNamespace, int id, float radius, ColorRGBA color, double markerLifetime)
303 {
304  Marker retMarker = VizHelperRVIZ::createMarkerWithoutTypeAndPose(baseFrame, markerNamespace, id, radius, radius, radius, color, markerLifetime);
305 
306  const std::string conePath = "package://asr_ism_visualizations/rsc/sphere.dae";
307  retMarker.pose.position = pointToPointMsg(point);
308 
309  retMarker.type = Marker::MESH_RESOURCE;
310  retMarker.mesh_resource = conePath;
311  retMarker.mesh_use_embedded_materials = true;
312  return retMarker;
313 }
314 
315 Marker VizHelperRVIZ::createConeMarker(ISM::PosePtr pose, std::string baseFrame,
316  std::string markerNamespace, int id, float radius, ColorRGBA color, double markerLifetime)
317 {
318  Marker retMarker = VizHelperRVIZ::createMarkerWithoutTypeAndPose(baseFrame, markerNamespace, id, radius, radius, radius, color, markerLifetime);
319 
320  const std::string conePath = "package://asr_ism_visualizations/rsc/openCone.dae";
321  retMarker.pose.position = pointToPointMsg(pose->point);
322  retMarker.pose.orientation = quatToQuaternionMsg(pose->quat);
323 
324  retMarker.type = Marker::MESH_RESOURCE;
325  retMarker.mesh_resource = conePath;
326  retMarker.mesh_use_embedded_materials = true;
327 
328  return retMarker;
329 }
330 
331 Marker VizHelperRVIZ::createCylinderMarker(ISM::PosePtr pose, std::string baseFrame,
332  std::string markerNamespace, int id, float radius, float height, ColorRGBA color, double markerLifetime)
333 {
334  Marker retMarker = VizHelperRVIZ::createMarkerWithoutTypeAndPose(baseFrame, markerNamespace, id, radius, radius, height, color, markerLifetime);
335 
336  retMarker.type = Marker::CYLINDER;
337  retMarker.pose.position = VizHelperRVIZ::pointToPointMsg(pose->point);
338  retMarker.pose.orientation = VizHelperRVIZ::quatToQuaternionMsg(pose->quat);
339 
340  return retMarker;
341 }
342 
343 Marker VizHelperRVIZ::createArrowMarkerToPoint(ISM::PointPtr from, ISM::PointPtr to, std::string baseFrame, std::string markerNamespace,
344  int id, float xScale, float yScale, float zScale, ColorRGBA color, double markerLifetime)
345 {
346  Marker retMarker = VizHelperRVIZ::createMarkerWithoutTypeAndPose(baseFrame, markerNamespace, id, xScale, yScale, zScale, color, markerLifetime);
347 
348  retMarker.type = Marker::ARROW;
349  retMarker.points.push_back(VizHelperRVIZ::pointToPointMsg(from));
350  retMarker.points.push_back(VizHelperRVIZ::pointToPointMsg(to));
351 
352  return retMarker;
353 }
354 
355 Marker VizHelperRVIZ::createArrowMarkerToPoint(ISM::PointPtr from, ISM::PointPtr to, std::string baseFrame, std::string markerNamespace,
356  int id, float xScale, float yScale, float zScale, ColorRGBA color, double markerLifetime, double minLength)
357 {
358  if (ISM::GeometryHelper::getDistanceBetweenPoints(from, to) < minLength)
359  {
360  ISM::PointPtr newFrom(new ISM::Point(to->eigen.x(), to->eigen.y(), to->eigen.z()));
361  newFrom->eigen.z() += minLength;
362 
363  return VizHelperRVIZ::createArrowMarkerToPoint(newFrom, to, baseFrame, markerNamespace, id, xScale, yScale, zScale, color, markerLifetime);
364  }
365  else
366  {
367  return VizHelperRVIZ::createArrowMarkerToPoint(from, to, baseFrame, markerNamespace, id, xScale, yScale, zScale, color, markerLifetime);
368  }
369 
370 }
371 
372 MarkerArray VizHelperRVIZ::createCoordinateArrow(std::vector< std::pair< ISM::PointPtr, std::vector<ISM::PosePtr> > > poses_vec, std::string baseFrame,
373  std::string markerNamespace, float arrowScale, float axisScale, ColorRGBA color, double markerLifetime)
374 {
375 
376  MarkerArray retMarkers;
377  std::vector<geometry_msgs::Point> axisPoints;
378 
379  Marker arrowMarker = VizHelperRVIZ::createMarkerWithoutTypeAndPose(baseFrame, markerNamespace, 0 ,arrowScale, 0, 0, color, markerLifetime);
380  Marker xAxisMarker = VizHelperRVIZ::createMarkerWithoutTypeAndPose(baseFrame, markerNamespace, 1, arrowScale, 0, 0, VizHelperRVIZ::createColorRGBA(1, 0, 0, 0.5), markerLifetime);;
381  Marker yAxisMarker = VizHelperRVIZ::createMarkerWithoutTypeAndPose(baseFrame, markerNamespace, 2, arrowScale, 0, 0, VizHelperRVIZ::createColorRGBA(0, 1, 0, 0.5), markerLifetime);;
382  Marker zAxisMarker = VizHelperRVIZ::createMarkerWithoutTypeAndPose(baseFrame, markerNamespace, 3, arrowScale, 0, 0, VizHelperRVIZ::createColorRGBA(0, 0, 1, 0.5), markerLifetime);;
383 
384  arrowMarker.type = Marker::LINE_LIST;
385  xAxisMarker.type = Marker::LINE_LIST;
386  yAxisMarker.type = Marker::LINE_LIST;
387  zAxisMarker.type = Marker::LINE_LIST;
388 
389  for(size_t i = 0; i < poses_vec.size(); i++){
390  for (ISM::PosePtr to : poses_vec[i].second)
391  {
392  arrowMarker.points.push_back(VizHelperRVIZ::pointToPointMsg(poses_vec[i].first));
393  arrowMarker.points.push_back(VizHelperRVIZ::pointToPointMsg(to->point));
394 
395  axisPoints = VizHelperRVIZ::calculateAxesPoints(to->point, to->quat, axisScale);
396  xAxisMarker.points.push_back(VizHelperRVIZ::pointToPointMsg(to->point));
397  xAxisMarker.points.push_back(axisPoints[0]);
398  yAxisMarker.points.push_back(VizHelperRVIZ::pointToPointMsg(to->point));
399  yAxisMarker.points.push_back(axisPoints[1]);
400  zAxisMarker.points.push_back(VizHelperRVIZ::pointToPointMsg(to->point));
401  zAxisMarker.points.push_back(axisPoints[2]);
402 
403  }
404  }
405 
406  retMarkers.markers.push_back(arrowMarker);
407  retMarkers.markers.push_back(xAxisMarker);
408  retMarkers.markers.push_back(yAxisMarker);
409  retMarkers.markers.push_back(zAxisMarker);
410 
411  return retMarkers;
412 }
413 
414 Marker VizHelperRVIZ::createLineArrow(ISM::PointPtr fromPoint, std::vector<ISM::PosePtr> toPoses, std::string baseFrame,
415  std::string markerNamespace, int& id, float arrowScale, ColorRGBA color, double markerLifetime)
416 {
417 
418  Marker retMarker = VizHelperRVIZ::createMarkerWithoutTypeAndPose(baseFrame, markerNamespace, ++id, arrowScale, 0, 0, color, markerLifetime);
419  retMarker.type = Marker::LINE_LIST;
420  for (ISM::PosePtr toPose : toPoses)
421  {
422  retMarker.points.push_back(VizHelperRVIZ::pointToPointMsg(fromPoint));
423  retMarker.points.push_back(VizHelperRVIZ::pointToPointMsg(toPose->point));
424  }
425  return retMarker;
426 }
427 Marker VizHelperRVIZ::createLineMarkerFormPair(std::vector<std::pair<ISM::PointPtr, ISM::PointPtr>> pointPair, std::string baseFrame,
428  std::string markerNamespace, float arrowScale, ColorRGBA color, double markerLifetime)
429 {
430 
431  Marker retMarker = VizHelperRVIZ::createMarkerWithoutTypeAndPose(baseFrame, markerNamespace, 0, arrowScale, 0, 0, color, markerLifetime);
432  retMarker.type = Marker::LINE_LIST;
433  for (std::pair<ISM::PointPtr, ISM::PointPtr> onePointPair : pointPair)
434  {
435  retMarker.points.push_back(VizHelperRVIZ::pointToPointMsg(onePointPair.first));
436  retMarker.points.push_back(VizHelperRVIZ::pointToPointMsg(onePointPair.second));
437  }
438  return retMarker;
439 }
440 
441 Marker VizHelperRVIZ::createMeshMarker(ISM::PosePtr pose, std::string baseFrame, std::string markerNamespace, int id,
442  ColorRGBA color, double markerLifetime, std::string resourcePath)
443 
444 {
445  double scaling = 0.001;/* the model size unit is mm */
446  if(resourcePath.compare("package://asr_visualization_server/res/maus.dae") == 0){
447  scaling = 0.0007;
448  }
449  else if(resourcePath.compare("package://asr_visualization_server/res/monitor.dae") == 0){
450  scaling = 0.0006;
451  }
452  else if(resourcePath.compare("package://asr_visualization_server/res/tastatur.dae") == 0){
453  scaling = 0.001;
454  }
455  Marker retMarker = VizHelperRVIZ::createMarkerWithoutTypeAndPose(baseFrame, markerNamespace, id,
456  scaling, scaling, scaling,
457  color, markerLifetime);
458 
459  retMarker.type = Marker::MESH_RESOURCE;
460  retMarker.mesh_resource = resourcePath;
461  retMarker.mesh_use_embedded_materials = true;
462 
463  retMarker.pose.position = VizHelperRVIZ::pointToPointMsg(pose->point);
464  retMarker.pose.orientation = VizHelperRVIZ::quatToQuaternionMsg(pose->quat);
465 
466  return retMarker;
467 }
468 
469 MarkerArray VizHelperRVIZ::createTrackMarkers(std::vector<ISM::PosePtr> trackPoses, std::string baseFrame,
470  std::string markerNamespace, float lineWidth,
471  ColorRGBA color, double markerLifetime)
472 {
473  MarkerArray retMarkers;
474  Marker tempMarker;
475  MarkerArray tempMarkers;
476 
477  /* actual line representing the track */
478  Marker lineMarker;
479  lineMarker = VizHelperRVIZ::createMarkerWithoutTypeAndPose(baseFrame, markerNamespace, 0, lineWidth, 0.0, 0.0,
480  color, markerLifetime);
481  lineMarker.type = Marker::LINE_STRIP;
482 
483  bool stillSearchingStartPosition = true;
484  for (unsigned int i = 0; i < trackPoses.size(); i++)
485  {
486  if (trackPoses[i] == nullptr)
487  {
488  continue;
489  }
490 
491  //ToDo make useFrames dynamic_reconfigure
492  bool useFrames = true;
493  /* sphere to determine the temporary position on the track */
494  if (stillSearchingStartPosition)
495  {
496  if(useFrames){
497  tempMarkers = VizHelperRVIZ::createCoordinateMarker(trackPoses[i], baseFrame, markerNamespace + "_start_position", i * 3, lineWidth * 1, lineWidth / 2, markerLifetime);
498  }else{
499  tempMarker = VizHelperRVIZ::createSphereMarker(trackPoses[i]->point, baseFrame, markerNamespace + "_start_position", i, lineWidth * 1.05,
500  VizHelperRVIZ::createColorRGBA(1.0, 0.0, 0.0, 1.0), markerLifetime);
501  }
502 
503  stillSearchingStartPosition = false;
504  }
505  else
506  {
507  if(useFrames){
508  tempMarkers = VizHelperRVIZ::createCoordinateMarker(trackPoses[i], baseFrame, markerNamespace + "_start_position", i * 3, lineWidth * 1, lineWidth / 4, markerLifetime);
509  }else{
510  tempMarker = VizHelperRVIZ::createSphereMarker(trackPoses[i]->point, baseFrame, markerNamespace + "_positions", i, lineWidth, color, markerLifetime);
511 
512  }
513  }
514  if(useFrames){
515  retMarkers.markers.insert(retMarkers.markers.end(), tempMarkers.markers.begin(), tempMarkers.markers.end());
516  }else{
517  retMarkers.markers.push_back(tempMarker);
518  }
519 
520 
521  lineMarker.points.push_back(VizHelperRVIZ::pointToPointMsg(trackPoses[i]->point));
522  }
523  retMarkers.markers.push_back(lineMarker);
524 
525  return retMarkers;
526 }
527 
529  const ISM::PointPtr point, double sensivity, std::string baseFrame, std_msgs::ColorRGBA color)
530 {
532  Eigen::Vector3i bin;
533  bin.x() = static_cast<int>(floor(point->eigen.x() / sensivity));
534  bin.y() = static_cast<int>(floor(point->eigen.y() / sensivity));
535  bin.z() = static_cast<int>(floor(point->eigen.z() / sensivity));
536  if(binDrawn[bin] == false)
537  {
538  std::stringstream ss;
539  ss << "Bin: "<< "X:" << bin.x() << " Y:" << bin.y() << " Z:" << bin.z();
540  binM.markers.push_back(VizHelperRVIZ::getBinMarker(bin, sensivity, ss.str(), 0, baseFrame, color));
541  binDrawn[bin] = true;
542  }
543  return binM;
544 }
545 
546 
547 visualization_msgs::Marker VizHelperRVIZ::getBinMarker(Eigen::Vector3i bin, double bin_size,
548  std::string desc, int id, std::string baseFrame, std_msgs::ColorRGBA color)
549 {
550  return getBinMarker(bin.x(), bin.y(), bin.z(), bin_size, desc, id, baseFrame, color);
551 }
552 
553 visualization_msgs::Marker VizHelperRVIZ::getBinMarker(int x, int y, int z, double bin_size,
554  std::string desc, int id, std::string baseFrame, std_msgs::ColorRGBA color)
555 {
556  Eigen::Vector3d bin(x,y,z);
557  Eigen::Vector3d binCenter = bin * bin_size;
558  return pointToCube(desc, id, baseFrame, binCenter.x(), binCenter.y(), binCenter.z(),
559  bin_size, color);
560 }
561 
562 std::vector<geometry_msgs::Point> VizHelperRVIZ::calculateAxesPoints(ISM::PointPtr point,ISM::QuaternionPtr quat, float scale)
563 {
564  std::vector<geometry_msgs::Point> result;
565 
566  const Eigen::Quaternion<double> rot = ISM::GeometryHelper::quatToEigenQuat(quat);
567 
568  // Fix: wrong driection for X and Y. But why?
569  const Eigen::Vector3d xV = rot._transformVector(-Eigen::Vector3d::UnitX());
570  const Eigen::Vector3d yV = rot._transformVector(-Eigen::Vector3d::UnitY());
571  const Eigen::Vector3d zV = rot._transformVector(Eigen::Vector3d::UnitZ());
572 
573 
574  result.push_back(VizHelperRVIZ::createPoint(point->eigen.x() + xV.x() * scale, point->eigen.y() + xV.y() * scale, point->eigen.z() + xV.z() * scale));
575  result.push_back(VizHelperRVIZ::createPoint(point->eigen.x() + yV.x() * scale, point->eigen.y() + yV.y() * scale, point->eigen.z() + yV.z() * scale));
576  result.push_back(VizHelperRVIZ::createPoint(point->eigen.x() + zV.x() * scale, point->eigen.y() + zV.y() * scale, point->eigen.z() + zV.z() * scale));
577 
578  return result;
579 }
580 
581 
582 
583 
584 geometry_msgs::Point VizHelperRVIZ::createPoint(double x, double y, double z)
585 {
586  geometry_msgs::Point retPoint;
587  retPoint.x = x;
588  retPoint.y = y;
589  retPoint.z = z;
590  return retPoint;
591 }
592 
593 MarkerArray VizHelperRVIZ::createRingMarker(ISM::PosePtr pose, std::string baseFrame, std::string markerNamespace, float scale, ColorRGBA x, ColorRGBA y,
594  ColorRGBA z, ColorRGBA a, ColorRGBA b, ColorRGBA g, double markerLifetime)
595 {
596  MarkerArray retMarkers;
597 
598  const std::string arrowPath = "package://asr_ism_visualizations/rsc/arrow.dae";
599  const std::string ringPath = "package://asr_ism_visualizations/rsc/ring.dae";
600 
601  const geometry_msgs::Point markerPoint = pointToPointMsg(pose->point);
602 
603  const geometry_msgs::Quaternion qx = quatToQuaternionMsg(ISM::GeometryHelper::getQuatFromRPY(pose->quat, 0.0, 90.0, 0.0));
604  const geometry_msgs::Quaternion qy = quatToQuaternionMsg(ISM::GeometryHelper::getQuatFromRPY(pose->quat, -90.0, 0.0, 0.0));
605  const geometry_msgs::Quaternion qz = quatToQuaternionMsg(ISM::GeometryHelper::getQuatFromRPY(pose->quat, 0.0, 0.0, 0.0));
606 
607 
608  Marker xMarker = createMarkerWithoutTypeAndPose(baseFrame, markerNamespace, 0, scale, scale, scale, x, markerLifetime);
609  xMarker.pose.position = markerPoint;
610  xMarker.pose.orientation = qx;
611  xMarker.type = Marker::MESH_RESOURCE;
612  xMarker.mesh_resource = arrowPath;
613  retMarkers.markers.push_back(xMarker);
614 
615  Marker yMarker = createMarkerWithoutTypeAndPose(baseFrame, markerNamespace, 1, scale, scale, scale, y, markerLifetime);
616  yMarker.pose.position = markerPoint;
617  yMarker.pose.orientation = qy;
618  yMarker.type = Marker::MESH_RESOURCE;
619  yMarker.mesh_resource = arrowPath;
620  retMarkers.markers.push_back(yMarker);
621 
622  Marker zMarker = createMarkerWithoutTypeAndPose(baseFrame, markerNamespace, 2, scale, scale, scale, z, markerLifetime);
623  zMarker.pose.position = markerPoint;
624  zMarker.pose.orientation = qz;
625  zMarker.type = Marker::MESH_RESOURCE;
626  zMarker.mesh_resource = arrowPath;
627  retMarkers.markers.push_back(zMarker);
628 
629  Marker aMarker = createMarkerWithoutTypeAndPose(baseFrame, markerNamespace, 3, scale, scale, scale, a, markerLifetime);
630  aMarker.pose.position = markerPoint;
631  aMarker.pose.orientation = qx;
632  aMarker.type = Marker::MESH_RESOURCE;
633  aMarker.mesh_resource = ringPath;
634  retMarkers.markers.push_back(aMarker);
635 
636  Marker bMarker = createMarkerWithoutTypeAndPose(baseFrame, markerNamespace, 4, scale, scale, scale, b, markerLifetime);
637  bMarker.pose.position = markerPoint;
638  bMarker.pose.orientation = qy;
639  bMarker.type = Marker::MESH_RESOURCE;
640  bMarker.mesh_resource = ringPath;
641  retMarkers.markers.push_back(bMarker);
642 
643  Marker gMarker = createMarkerWithoutTypeAndPose(baseFrame, markerNamespace, 5, scale, scale, scale, g, markerLifetime);
644  gMarker.pose.position = markerPoint;
645  gMarker.pose.orientation = qz;
646  gMarker.type = Marker::MESH_RESOURCE;
647  gMarker.mesh_resource = ringPath;
648  retMarkers.markers.push_back(gMarker);
649 
650  return retMarkers;
651 }
652 MarkerArray VizHelperRVIZ::createCubeArrow(ISM::PosePtr pose, std::string baseFrame, std::string markerNamespace, int& id, float scale,
653  ColorRGBA cubeColor, ColorRGBA arrowColor, double markerLifetime)
654 {
655  MarkerArray retMarkers;
656 
657  const std::string openCubeMeshResourcePath = "package://asr_ism_visualizations/rsc/openCube.dae";
658  const std::string openPyramidMeshResourcePath = "package://asr_ism_visualizations/rsc/openPyramid.dae";
659 
660 
661  Marker cube = createMarkerWithoutTypeAndPose(baseFrame, markerNamespace, ++id, scale, scale, scale, cubeColor, markerLifetime);
662  cube.type = Marker::MESH_RESOURCE;
663  cube.mesh_resource = openCubeMeshResourcePath;
664  cube.pose.position = pointToPointMsg(pose->point);
665  cube.pose.orientation = quatToQuaternionMsg(pose->quat);
666  retMarkers.markers.push_back(cube);
667 
668  Marker arrow = createMarkerWithoutTypeAndPose(baseFrame, markerNamespace, ++id, scale, scale, scale, arrowColor, markerLifetime);
669  arrow.type = Marker::MESH_RESOURCE;
670  arrow.mesh_resource = openPyramidMeshResourcePath;
671  arrow.pose.position = pointToPointMsg(pose->point);
672  arrow.pose.orientation = quatToQuaternionMsg(pose->quat);
673  retMarkers.markers.push_back(arrow);
674 
675  return retMarkers;
676 }
677 
678 geometry_msgs::Point VizHelperRVIZ::genCuboidPoint(int xp, int yp, int zp, double x, double y,
679  double z, double xwidth, double ywidth, double zwidth)
680 {
681  geometry_msgs::Point p;
682  p.x = x + (double)xp * xwidth / (double) 2;
683  p.y = y + (double)yp * ywidth / (double) 2;
684  p.z = z + (double)zp * zwidth / (double) 2;
685  return p;
686 }
687 
688 Marker VizHelperRVIZ::pointToCuboid(std::string ns, int32_t id, std::string frame,
689  double x, double y, double z, double xwitdh, double ywidth, double zwidth,
690  std_msgs::ColorRGBA color)
691 {
694 
695  pMark.header.frame_id = frame;
696 
697  pMark.header.stamp = ros::Time::now();
698 
699  // Set the namespace and id for this marker. This serves to create a unique ID
700  // Any marker sent with the same namespace and id will overwrite the old one
701  pMark.ns = ns;
702  pMark.id = id;
703 
704  // Set the marker type. Initially this is CUBE, and cycles between that and SPHERE, ARROW, and CYLINDER
705  pMark.type = visualization_msgs::Marker::LINE_STRIP;
706 
707  // Set the marker action. Options are ADD and DELETE
708  pMark.action = visualization_msgs::Marker::ADD;
709 
710  boost::function< geometry_msgs::Point (int,int,int) > pointF = boost::bind(genCuboidPoint, _1, _2, _3, x, y, z, xwitdh, ywidth, zwidth);
711 
712  pMark.points.push_back(pointF(-1,-1,-1));
713  pMark.points.push_back(pointF(-1,-1,1));
714  pMark.points.push_back(pointF(-1,1,1));
715  pMark.points.push_back(pointF(-1,1,-1));
716  pMark.points.push_back(pointF(-1,-1,-1));
717  pMark.points.push_back(pointF(1,-1,-1));
718  pMark.points.push_back(pointF(1,-1,1));
719  pMark.points.push_back(pointF(1,1,1));
720  pMark.points.push_back(pointF(1,1,-1));
721  pMark.points.push_back(pointF(1,-1,-1));
722  pMark.points.push_back(pointF(1,1,-1));
723  pMark.points.push_back(pointF(-1,1,-1));
724  pMark.points.push_back(pointF(-1,1,1));
725  pMark.points.push_back(pointF(1,1,1));
726  pMark.points.push_back(pointF(1,-1,1));
727  pMark.points.push_back(pointF(-1,-1,1));
728 
729 
730  // Set the color -- be sure to set alpha to something non-zero!
731  pMark.color = color;
732  pMark.scale.x = 0.008;
733 
734  pMark.lifetime = ros::Duration();
735  return pMark;
736 
737 }
738 
739 Marker VizHelperRVIZ::createCylinderLine(ISM::PosePtr pose, std::string baseFrame, std::string markerNamespace, float scale, float length,
740  ColorRGBA color, double markerLifetime)
741 {
742  const std::string openCylinderMeshResourcePath = "package://asr_ism_visualizations/res/openCylinder.dae";
743 
744 
745  Marker cylinder = createMarkerWithoutTypeAndPose(baseFrame, markerNamespace, 99, scale, scale, length, color, markerLifetime);
746  cylinder.type = Marker::MESH_RESOURCE;
747  cylinder.mesh_resource = openCylinderMeshResourcePath;
748  cylinder.pose.position = pointToPointMsg(pose->point);
749  cylinder.pose.orientation = quatToQuaternionMsg(pose->quat);
750 
751  return cylinder;
752 }
753 visualization_msgs::Marker VizHelperRVIZ::pointToCube(std::string ns, int32_t id, std::string frame, double x,
754  double y, double z, double bin_size, std_msgs::ColorRGBA color)
755 {
756  return pointToCuboid(ns, id, frame, x, y, z, bin_size, bin_size, bin_size, color);
757 }
758 
759 visualization_msgs::MarkerArray VizHelperRVIZ::createPositionVector(ISM::PosePtr pose, std::string baseFrame, std::string markerNamespace, ColorRGBA color, UniformDistributionGenerator* udg, int sampels, int axis, int id, float length, float openAngle, float sphereRadius, double markerLifetime){
760  MarkerArray retMarkers;
761 
762  const std::string directionPath = "package://asr_ism_visualizations/rsc/rotCone.dae";
763 
764  const ISM::PointPtr markerPoint = pose->point;
765 
766  for(int j = 0; j < sampels; j++){
767  ISM::PointPtr tmpPoint =ISM::PointPtr(new ISM::Point());
768 
769  if(j > 0){
770  double r_x, r_y, r_z;
771 
772  do{
773  r_x = udg->operator ()();
774  r_y = udg->operator ()();
775  r_z = udg->operator ()();
776  }while(std::sqrt(r_x * r_x + r_y * r_y + r_z * r_z) > sphereRadius);
777 
778  tmpPoint->eigen.x() = markerPoint->eigen.x() + r_x;
779  tmpPoint->eigen.y() = markerPoint->eigen.y() + r_y;
780  tmpPoint->eigen.z() = markerPoint->eigen.z() + r_z;
781 
782  }else{
783  tmpPoint = pose->point;
784  }
785  retMarkers.markers.push_back(VizHelperRVIZ::createSphereMarker(tmpPoint, baseFrame, markerNamespace, id + j * 2, length, color, markerLifetime));
786 
787 
788  Marker marker = createMarkerWithoutTypeAndPose(baseFrame, markerNamespace, id + j * 2 + 1, openAngle, openAngle, length, color, markerLifetime);
789  marker.pose.position = pointToPointMsg(tmpPoint);
790  if(axis == 1){
791  marker.pose.orientation = quatToQuaternionMsg(ISM::GeometryHelper::getQuatFromRPY(pose->quat, 0.0, 90.0, 0.0));
792  }else if(axis == 2){
793  marker.pose.orientation = quatToQuaternionMsg(ISM::GeometryHelper::getQuatFromRPY(pose->quat, -90.0, 0.0, 0.0));
794  }else if(axis == 3){
795  marker.pose.orientation = quatToQuaternionMsg(ISM::GeometryHelper::getQuatFromRPY(pose->quat, 0.0, 0.0, 0.0));
796  }else{
797  marker.pose.orientation = quatToQuaternionMsg(pose->quat);
798  }
799  marker.type = Marker::MESH_RESOURCE;
800  marker.mesh_resource = directionPath;
801  retMarkers.markers.push_back(marker);
802  }
803  return retMarkers;
804 }
805 
806 
807 visualization_msgs::MarkerArray VizHelperRVIZ::createCoordinateMarkerWithAngle(ISM::PosePtr pose, std::string baseFrame, std::string markerNamespace, int id, float length, float openAngle, double markerLifetime){
808  MarkerArray retMarkers;
809 
810  const std::string directionPath = "package://asr_ism_visualizations/rsc/rotCone.dae";
811  const geometry_msgs::Point markerPoint = pointToPointMsg(pose->point);
812 
813  Marker rMarker = createMarkerWithoutTypeAndPose(baseFrame, markerNamespace, id, openAngle, openAngle, length, VizHelperRVIZ::createColorRGBA(1.0, 0.0, 0.0, 1.0), markerLifetime);
814  rMarker.pose.position = markerPoint;
815  rMarker.pose.orientation = quatToQuaternionMsg(ISM::GeometryHelper::getQuatFromRPY(pose->quat, 0.0, 90.0, 0.0));
816  rMarker.type = Marker::MESH_RESOURCE;
817  rMarker.mesh_resource = directionPath;
818  retMarkers.markers.push_back(rMarker);
819 
820  Marker gMarker = createMarkerWithoutTypeAndPose(baseFrame, markerNamespace, id+1, openAngle, openAngle, length, VizHelperRVIZ::createColorRGBA(0.0, 1.0, 0.0, 1.0), markerLifetime);
821  gMarker.pose.position = markerPoint;
822  gMarker.pose.orientation = quatToQuaternionMsg(ISM::GeometryHelper::getQuatFromRPY(pose->quat, -90.0, 0.0, 0.0));
823  gMarker.type = Marker::MESH_RESOURCE;
824  gMarker.mesh_resource = directionPath;
825  retMarkers.markers.push_back(gMarker);
826 
827  Marker bMarker = createMarkerWithoutTypeAndPose(baseFrame, markerNamespace, id+2, openAngle, openAngle, length, VizHelperRVIZ::createColorRGBA(0.0, 0.0, 1.0, 1.0), markerLifetime);
828  bMarker.pose.position = markerPoint;
829  bMarker.pose.orientation = quatToQuaternionMsg(ISM::GeometryHelper::getQuatFromRPY(pose->quat, 0.0, 0.0, 0.0));
830  bMarker.type = Marker::MESH_RESOURCE;
831  bMarker.mesh_resource = directionPath;
832  retMarkers.markers.push_back(bMarker);
833 
834  return retMarkers;
835 }
836 visualization_msgs::MarkerArray VizHelperRVIZ::createCoordinateMarker(ISM::PosePtr pose, std::string baseFrame, std::string markerNamespace, int id, float length, float radius, double markerLifetime){
837  MarkerArray retMarkers;
838 
839  const std::string directionPath = "package://asr_ism_visualizations/rsc/transCylinder.dae";
840  const geometry_msgs::Point markerPoint = pointToPointMsg(pose->point);
841 
842  Marker rMarker = createMarkerWithoutTypeAndPose(baseFrame, markerNamespace, id, radius, radius, length, VizHelperRVIZ::createColorRGBA(1.0, 0.0, 0.0, 1.0), markerLifetime);
843  rMarker.pose.position = markerPoint;
844  rMarker.pose.orientation = quatToQuaternionMsg(ISM::GeometryHelper::getQuatFromRPY(pose->quat, 0.0, 90.0, 0.0));
845  rMarker.type = Marker::MESH_RESOURCE;
846  rMarker.mesh_resource = directionPath;
847  retMarkers.markers.push_back(rMarker);
848 
849  Marker gMarker = createMarkerWithoutTypeAndPose(baseFrame, markerNamespace, id+1, radius, radius, length, VizHelperRVIZ::createColorRGBA(0.0, 1.0, 0.0, 1.0), markerLifetime);
850  gMarker.pose.position = markerPoint;
851  gMarker.pose.orientation = quatToQuaternionMsg(ISM::GeometryHelper::getQuatFromRPY(pose->quat, -90.0, 0.0, 0.0));
852  gMarker.type = Marker::MESH_RESOURCE;
853  gMarker.mesh_resource = directionPath;
854  retMarkers.markers.push_back(gMarker);
855 
856  Marker bMarker = createMarkerWithoutTypeAndPose(baseFrame, markerNamespace, id+2, radius, radius, length, VizHelperRVIZ::createColorRGBA(0.0, 0.0, 1.0, 1.0), markerLifetime);
857  bMarker.pose.position = markerPoint;
858  bMarker.pose.orientation = quatToQuaternionMsg(ISM::GeometryHelper::getQuatFromRPY(pose->quat, 0.0, 0.0, 0.0));
859  bMarker.type = Marker::MESH_RESOURCE;
860  bMarker.mesh_resource = directionPath;
861  retMarkers.markers.push_back(bMarker);
862 
863  return retMarkers;
864 }
865 visualization_msgs::Marker VizHelperRVIZ::createLine(ISM::PointPtr fromPoint, ISM::PointPtr toPoint, float width, int id, std::string baseFrame, std::string markerNamespace, std_msgs::ColorRGBA color, double markerLifetime){
866  Marker retMarker = VizHelperRVIZ::createMarkerWithoutTypeAndPose(baseFrame, markerNamespace, id, width, 0, 0, color, markerLifetime);
867  retMarker.type = Marker::LINE_STRIP;
868  retMarker.points.push_back(VizHelperRVIZ::pointToPointMsg(fromPoint));
869  retMarker.points.push_back(VizHelperRVIZ::pointToPointMsg(toPoint));
870  return retMarker;
871 }
872 
873 
874 }
d
static std::map< Eigen::Vector3i, bool, cmpVector3i > binDrawn
static Marker createCylinderMarker(ISM::PosePtr pose, std::string baseFrame, std::string markerNamespace, int id, float radius, float height, ColorRGBA color, double markerLifetime)
static MarkerArray createRingMarker(ISM::PosePtr pose, std::string baseFrame, std::string markerNamespace, float scale, ColorRGBA x, ColorRGBA y, ColorRGBA z, ColorRGBA a, ColorRGBA b, ColorRGBA g, double markerLifetime)
static Marker createCylinderLine(ISM::PosePtr pose, std::string baseFrame, std::string markerNamespace, float scale, float length, ColorRGBA color, double markerLifetime)
static ColorRGBA hsvToRGBA(double hue, double saturation, double value)
static MarkerArray createCubeArrow(ISM::PosePtr pose, std::string baseFrame, std::string markerNamespace, int &id, float scale, ColorRGBA cubeColor, ColorRGBA arrowColor, double markerLifetime)
static Marker createLineMarkerFormPair(std::vector< std::pair< ISM::PointPtr, ISM::PointPtr >> pointPair, std::string baseFrame, std::string markerNamespace, float arrowScale, ColorRGBA color, double markerLifetime)
static MarkerArray createCoordinateMarker(ISM::PosePtr pose, std::string baseFrame, std::string markerNamespace, int id, float length, float radius, double markerLifetime)
static MarkerArray createCoordinateMarkerWithAngle(ISM::PosePtr pose, std::string baseFrame, std::string markerNamespace, int id, float length, float openAngle, double markerLifetime)
static MarkerArray createTrackMarkers(std::vector< ISM::PosePtr > trackPoses, std::string baseFrame, std::string markerNamespace, float lineWidth, ColorRGBA color, double markerLifetime)
static MarkerArray getBinFromPoint(const ISM::PointPtr point, double sensivity, std::string baseFrame, std_msgs::ColorRGBA color)
f
static ColorRGBA getColorOfObject(const ISM::Object &object)
static geometry_msgs::Point genCuboidPoint(int xp, int yp, int zp, double x, double y, double z, double xwidth, double ywidth, double zwidth)
static Marker createConeMarker(ISM::PosePtr pose, std::string baseFrame, std::string markerNamespace, int id, float radius, ColorRGBA color, double markerLifetime)
visualization_msgs::Marker Marker
static geometry_msgs::Point pointToPointMsg(ISM::PointPtr point)
static visualization_msgs::MarkerArray createArrowMarkerFromVote(ISM::VoteSpecifierPtr vote, ISM::ObjectPtr o, std::string baseFrame, std::string ns, int32_t id, double bin_size, std_msgs::ColorRGBA binColor, std_msgs::ColorRGBA voteColor=VizHelperRVIZ::createColorRGBA(1.0, 0.0, 1.0, 0.5))
static Marker pointToCube(std::string ns, int id, std::string frame, double x, double y, double z, double bin_size, std_msgs::ColorRGBA color)
static Marker createSphereMarker(ISM::PointPtr point, std::string baseFrame, std::string markerNamespace, int id, float radius, ColorRGBA color, double markerLifetime)
static MarkerArray createCoordinateArrow(std::vector< std::pair< ISM::PointPtr, std::vector< ISM::PosePtr > > > poses_vec, std::string baseFrame, std::string markerNamespace, float arrowScale, float axisScale, ColorRGBA color, double markerLifetime)
static geometry_msgs::Quaternion quatToQuaternionMsg(ISM::QuaternionPtr quat)
static ColorRGBA createColorRGBA(float red, float green, float blue, float alpha)
std_msgs::ColorRGBA ColorRGBA
visualization_msgs::MarkerArray MarkerArray
static geometry_msgs::Point createPoint(double x, double y, double z)
static Marker createArrowMarkerToPoint(ISM::PointPtr fromPoint, ISM::PointPtr to, std::string baseFrame, std::string markerNamespace, int id, float xScale, float yScale, float zScale, ColorRGBA color, double markerLifetime)
static Marker createMeshMarker(ISM::PosePtr pose, std::string baseFrame, std::string markerNamespace, int id, ColorRGBA color, double markerLifetime, std::string resourcePath)
static std::vector< geometry_msgs::Point > calculateAxesPoints(ISM::PointPtr point, ISM::QuaternionPtr quat, float scale)
static Marker createLine(ISM::PointPtr fromPoint, ISM::PointPtr toPoint, float width, int id, std::string baseFrame, std::string markerNamespace, std_msgs::ColorRGBA color, double markerLifetime)
static Marker getBinMarker(Eigen::Vector3i bin, double bin_size, std::string desc, int id, std::string baseFrame, std_msgs::ColorRGBA color)
boost::variate_generator< boost::mt19937, boost::uniform_real<> > UniformDistributionGenerator
static Marker pointToCuboid(std::string ns, int32_t id, std::string frame, double x, double y, double z, double xwitdh, double ywidth, double zwidth, std_msgs::ColorRGBA color)
static Time now()
TFSIMD_FORCE_INLINE tfScalar length(const Quaternion &q)
static Marker createMarkerWithoutTypeAndPose(std::string baseFrame, std::string markerNamespace, int id, float xScale, float yScale, float zScale, ColorRGBA color, double markerLifetime)
static Marker createLineArrow(ISM::PointPtr fromPoint, std::vector< ISM::PosePtr > toPoses, std::string baseFrame, std::string markerNamespace, int &id, float arrowScale, ColorRGBA color, double markerLifetime)
static ColorRGBA confidenceToColor(double confidence)
static MarkerArray createPositionVector(ISM::PosePtr pose, std::string baseFrame, std::string markerNamespace, ColorRGBA color, UniformDistributionGenerator *udg, int sampels, int axis, int id, float length, float openAngle, float sphereRadius, double markerLifetime)
#define ROS_ERROR(...)
static std::vector< ISM::PosePtr > posesFromTrack(ISM::TrackPtr track)
static visualization_msgs::MarkerArray createSphereMarkerWithOrientation(ISM::PosePtr pose, std::string baseFrame, std::string markerNamespace, int id, float radius, std_msgs::ColorRGBA color, double markerLifetime, int axesFirstId)


asr_ism_visualizations
Author(s): Hanselmann Fabian, Heller Florian, Heizmann Heinrich, Kübler Marcel, Meißner Pascal, Reckling Reno, Stöckle Patrick, Trautmann Jeremias
autogenerated on Fri Nov 8 2019 03:28:47