bodies.h
Go to the documentation of this file.
1 /*********************************************************************
2  * Software License Agreement (BSD License)
3  *
4  * Copyright (c) 2008, Willow Garage, Inc.
5  * All rights reserved.
6  *
7  * Redistribution and use in source and binary forms, with or without
8  * modification, are permitted provided that the following conditions
9  * are met:
10  *
11  * * Redistributions of source code must retain the above copyright
12  * notice, this list of conditions and the following disclaimer.
13  * * Redistributions in binary form must reproduce the above
14  * copyright notice, this list of conditions and the following
15  * disclaimer in the documentation and/or other materials provided
16  * with the distribution.
17  * * Neither the name of the Willow Garage nor the names of its
18  * contributors may be used to endorse or promote products derived
19  * from this software without specific prior written permission.
20  *
21  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
24  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
25  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
26  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
27  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
28  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
29  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
31  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32  * POSSIBILITY OF SUCH DAMAGE.
33  *********************************************************************/
34 
35 /* Author: Ioan Sucan, E. Gil Jones */
36 
37 #ifndef GEOMETRIC_SHAPES_BODIES_
38 #define GEOMETRIC_SHAPES_BODIES_
39 
40 #if __cplusplus <= 199711L
41 #error This header requires at least C++11
42 #endif
43 
44 #include "geometric_shapes/aabb.h"
45 #include "geometric_shapes/obb.h"
49 #include <Eigen/Core>
50 #include <Eigen/Geometry>
51 #include <memory>
52 #include <vector>
53 
58 namespace bodies
59 {
62 {
63  Eigen::Vector3d center;
64  double radius;
65 
66  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
67 };
68 
71 {
72  Eigen::Isometry3d pose;
73  double radius;
74  double length;
75  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
76 };
77 
78 class Body;
79 
81 typedef std::shared_ptr<Body> BodyPtr;
82 
84 typedef std::shared_ptr<const Body> BodyConstPtr;
85 
89 class Body
90 {
91 public:
92  Body() : scale_(1.0), padding_(0.0), type_(shapes::UNKNOWN_SHAPE)
93  {
94  pose_.setIdentity();
95  }
96 
97  virtual ~Body()
98  {
99  }
100 
103  {
104  return type_;
105  }
106 
115  void setScaleDirty(double scale)
116  {
117  scale_ = scale;
118  }
119 
122  void setScale(double scale)
123  {
124  setScaleDirty(scale);
125  updateInternalData();
126  }
127 
129  double getScale() const
130  {
131  return scale_;
132  }
133 
142  void setPaddingDirty(double padd)
143  {
144  padding_ = padd;
145  }
146 
149  void setPadding(double padd)
150  {
151  setPaddingDirty(padd);
152  updateInternalData();
153  }
154 
156  double getPadding() const
157  {
158  return padding_;
159  }
160 
169  void setPoseDirty(const Eigen::Isometry3d& pose)
170  {
171  pose_ = pose;
172  }
173 
175  void setPose(const Eigen::Isometry3d& pose)
176  {
177  setPoseDirty(pose);
178  updateInternalData();
179  }
180 
182  const Eigen::Isometry3d& getPose() const
183  {
184  return pose_;
185  }
186 
195  inline void setDimensionsDirty(const shapes::Shape* shape)
196  {
197  useDimensions(shape);
198  }
199 
201  virtual std::vector<double> getDimensions() const = 0;
202 
204  virtual std::vector<double> getScaledDimensions() const = 0;
205 
207  void setDimensions(const shapes::Shape* shape);
208 
210  bool containsPoint(double x, double y, double z, bool verbose = false) const
211  {
212  Eigen::Vector3d pt(x, y, z);
213  return containsPoint(pt, verbose);
214  }
215 
217  virtual bool containsPoint(const Eigen::Vector3d& p, bool verbose = false) const = 0;
218 
224  virtual bool intersectsRay(const Eigen::Vector3d& origin, const Eigen::Vector3d& dir,
225  EigenSTL::vector_Vector3d* intersections = nullptr, unsigned int count = 0) const = 0;
226 
229  virtual double computeVolume() const = 0;
230 
236  virtual bool samplePointInside(random_numbers::RandomNumberGenerator& rng, unsigned int max_attempts,
237  Eigen::Vector3d& result) const;
238 
241  virtual void computeBoundingSphere(BoundingSphere& sphere) const = 0;
242 
245  virtual void computeBoundingCylinder(BoundingCylinder& cylinder) const = 0;
246 
249  virtual void computeBoundingBox(AABB& bbox) const = 0;
250 
253  virtual void computeBoundingBox(OBB& bbox) const = 0;
254 
256  BodyPtr cloneAt(const Eigen::Isometry3d& pose) const
257  {
258  return cloneAt(pose, padding_, scale_);
259  }
260 
265  virtual BodyPtr cloneAt(const Eigen::Isometry3d& pose, double padding, double scaling) const = 0;
266 
270  virtual void updateInternalData() = 0;
271 
272 protected:
274  virtual void useDimensions(const shapes::Shape* shape) = 0;
275 
277  double scale_;
278 
280  double padding_;
281 
284 
286  Eigen::Isometry3d pose_;
287 
288 public:
289  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
290 };
291 
293 class Sphere : public Body
294 {
295 public:
296  Sphere() : Body()
297  {
298  type_ = shapes::SPHERE;
299  }
300 
301  Sphere(const shapes::Shape* shape) : Body()
302  {
303  type_ = shapes::SPHERE;
304  setDimensions(shape);
305  }
306 
307  explicit Sphere(const BoundingSphere& sphere) : Body()
308  {
309  type_ = shapes::SPHERE;
310  shapes::Sphere shape(sphere.radius);
311  setDimensionsDirty(&shape);
312 
313  Eigen::Isometry3d pose = Eigen::Isometry3d::Identity();
314  pose.translation() = sphere.center;
315  setPose(pose);
316  }
317 
318  ~Sphere() override
319  {
320  }
321 
323  std::vector<double> getDimensions() const override;
324  std::vector<double> getScaledDimensions() const override;
325 
326  bool containsPoint(const Eigen::Vector3d& p, bool verbose = false) const override;
327  double computeVolume() const override;
328  bool samplePointInside(random_numbers::RandomNumberGenerator& rng, unsigned int max_attempts,
329  Eigen::Vector3d& result) const override;
330  void computeBoundingSphere(BoundingSphere& sphere) const override;
331  void computeBoundingCylinder(BoundingCylinder& cylinder) const override;
332  void computeBoundingBox(AABB& bbox) const override;
333  void computeBoundingBox(OBB& bbox) const override;
334  bool intersectsRay(const Eigen::Vector3d& origin, const Eigen::Vector3d& dir,
335  EigenSTL::vector_Vector3d* intersections = nullptr, unsigned int count = 0) const override;
336 
337  BodyPtr cloneAt(const Eigen::Isometry3d& pose, double padding, double scale) const override;
338 
339  void updateInternalData() override;
340 
341 protected:
342  void useDimensions(const shapes::Shape* shape) override;
343 
344  // shape-dependent data
345  double radius_;
346 
347  // pose/padding/scaling-dependent values & values computed for convenience and fast upcoming computations
348  Eigen::Vector3d center_;
349  double radiusU_;
350  double radius2_;
351 
352 public:
353  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
354 };
355 
357 class Cylinder : public Body
358 {
359 public:
361  {
362  type_ = shapes::CYLINDER;
363  }
364 
365  Cylinder(const shapes::Shape* shape) : Body()
366  {
367  type_ = shapes::CYLINDER;
368  setDimensions(shape);
369  }
370 
371  explicit Cylinder(const BoundingCylinder& cylinder) : Body()
372  {
373  type_ = shapes::CYLINDER;
374  shapes::Cylinder shape(cylinder.radius, cylinder.length);
375  setDimensionsDirty(&shape);
376  setPose(cylinder.pose);
377  }
378 
379  ~Cylinder() override
380  {
381  }
382 
384  std::vector<double> getDimensions() const override;
385  std::vector<double> getScaledDimensions() const override;
386 
387  bool containsPoint(const Eigen::Vector3d& p, bool verbose = false) const override;
388  double computeVolume() const override;
389  bool samplePointInside(random_numbers::RandomNumberGenerator& rng, unsigned int max_attempts,
390  Eigen::Vector3d& result) const override;
391  void computeBoundingSphere(BoundingSphere& sphere) const override;
392  void computeBoundingCylinder(BoundingCylinder& cylinder) const override;
393  void computeBoundingBox(AABB& bbox) const override;
394  void computeBoundingBox(OBB& bbox) const override;
395  bool intersectsRay(const Eigen::Vector3d& origin, const Eigen::Vector3d& dir,
396  EigenSTL::vector_Vector3d* intersections = nullptr, unsigned int count = 0) const override;
397 
398  BodyPtr cloneAt(const Eigen::Isometry3d& pose, double padding, double scale) const override;
399 
400  void updateInternalData() override;
401 
402 protected:
403  void useDimensions(const shapes::Shape* shape) override;
404 
405  // shape-dependent data
406  double length_;
407  double radius_;
408 
409  // pose/padding/scaling-dependent values & values computed for convenience and fast upcoming computations
410  Eigen::Vector3d center_;
411  Eigen::Vector3d normalH_;
412  Eigen::Vector3d normalB1_;
413  Eigen::Vector3d normalB2_;
414 
415  double length2_;
416  double radiusU_;
417  double radiusB_;
418  double radiusBSqr_;
419  double radius2_;
420  double d1_;
421  double d2_;
422 
423 public:
424  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
425 };
426 
428 class Box : public Body
429 {
430 public:
431  Box() : Body()
432  {
433  type_ = shapes::BOX;
434  }
435 
436  Box(const shapes::Shape* shape) : Body()
437  {
438  type_ = shapes::BOX;
439  setDimensions(shape);
440  }
441 
442  explicit Box(const AABB& aabb) : Body()
443  {
444  type_ = shapes::BOX;
445  shapes::Box shape(aabb.sizes()[0], aabb.sizes()[1], aabb.sizes()[2]);
446  setDimensionsDirty(&shape);
447 
448  Eigen::Isometry3d pose = Eigen::Isometry3d::Identity();
449  pose.translation() = aabb.center();
450  setPose(pose);
451  }
452 
453  ~Box() override
454  {
455  }
456 
458  std::vector<double> getDimensions() const override;
459  std::vector<double> getScaledDimensions() const override;
460 
461  bool containsPoint(const Eigen::Vector3d& p, bool verbose = false) const override;
462  double computeVolume() const override;
463  bool samplePointInside(random_numbers::RandomNumberGenerator& rng, unsigned int max_attempts,
464  Eigen::Vector3d& result) const override;
465  void computeBoundingSphere(BoundingSphere& sphere) const override;
466  void computeBoundingCylinder(BoundingCylinder& cylinder) const override;
467  void computeBoundingBox(AABB& bbox) const override;
468  void computeBoundingBox(OBB& bbox) const override;
469  bool intersectsRay(const Eigen::Vector3d& origin, const Eigen::Vector3d& dir,
470  EigenSTL::vector_Vector3d* intersections = nullptr, unsigned int count = 0) const override;
471 
472  BodyPtr cloneAt(const Eigen::Isometry3d& pose, double padding, double scale) const override;
473 
474  void updateInternalData() override;
475 
476 protected:
477  void useDimensions(const shapes::Shape* shape) override; // (x, y, z) = (length, width, height)
478 
479  // shape-dependent data
480  double length_;
481  double width_;
482  double height_;
483 
484  // pose/padding/scaling-dependent values & values computed for convenience and fast upcoming computations
485  Eigen::Vector3d center_;
486  Eigen::Vector3d normalL_;
487  Eigen::Vector3d normalW_;
488  Eigen::Vector3d normalH_;
489 
490  Eigen::Vector3d corner1_;
491  Eigen::Vector3d corner2_;
492 
493  double length2_;
494  double width2_;
495  double height2_;
496  double radiusB_;
497  double radius2_;
498 
499 public:
500  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
501 };
502 
504 class ConvexMesh : public Body
505 {
506 public:
508  {
509  type_ = shapes::MESH;
510  scaled_vertices_ = nullptr;
511  }
512 
513  ConvexMesh(const shapes::Shape* shape) : Body()
514  {
515  type_ = shapes::MESH;
516  scaled_vertices_ = nullptr;
517  setDimensions(shape);
518  }
519 
520  ~ConvexMesh() override;
521 
523  std::vector<double> getDimensions() const override;
525  std::vector<double> getScaledDimensions() const override;
526 
527  bool containsPoint(const Eigen::Vector3d& p, bool verbose = false) const override;
528  double computeVolume() const override;
529 
530  void computeBoundingSphere(BoundingSphere& sphere) const override;
531  void computeBoundingCylinder(BoundingCylinder& cylinder) const override;
532  void computeBoundingBox(AABB& bbox) const override;
533  void computeBoundingBox(OBB& bbox) const override;
534  bool intersectsRay(const Eigen::Vector3d& origin, const Eigen::Vector3d& dir,
535  EigenSTL::vector_Vector3d* intersections = nullptr, unsigned int count = 0) const override;
536 
537  const std::vector<unsigned int>& getTriangles() const;
538  const EigenSTL::vector_Vector3d& getVertices() const;
539  const EigenSTL::vector_Vector3d& getScaledVertices() const;
540 
545  const EigenSTL::vector_Vector4d& getPlanes() const;
546 
547  BodyPtr cloneAt(const Eigen::Isometry3d& pose, double padding, double scale) const override;
548 
550  void computeScaledVerticesFromPlaneProjections();
551 
552  void correctVertexOrderFromPlanes();
553 
554  void updateInternalData() override;
555 
556 protected:
557  void useDimensions(const shapes::Shape* shape) override;
558 
560  unsigned int countVerticesBehindPlane(const Eigen::Vector4f& planeNormal) const;
561 
568  bool isPointInsidePlanes(const Eigen::Vector3d& point) const;
569 
570  struct MeshData
571  {
574  std::vector<unsigned int> triangles_;
575  std::map<unsigned int, unsigned int> plane_for_triangle_;
576  Eigen::Vector3d mesh_center_;
578  Eigen::Vector3d box_offset_;
579  Eigen::Vector3d box_size_;
581 
582  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
583  };
584 
585  // shape-dependent data; keep this in one struct so that a cheap pointer copy can be done in cloneAt()
586  std::shared_ptr<MeshData> mesh_data_;
587 
588  // pose/padding/scaling-dependent values & values computed for convenience and fast upcoming computations
589  Eigen::Isometry3d i_pose_;
590  Eigen::Vector3d center_;
591  double radiusB_;
592  double radiusBSqr_;
594 
595  // pointer to an array of scaled vertices
596  // If the padding is 0 & scaling is 1, then there is no need to have scaled vertices;
597  // we can just point to the vertices in mesh_data_.
598  // Otherwise, point to scaled_vertices_storage_
600 
601 private:
602  std::unique_ptr<EigenSTL::vector_Vector3d> scaled_vertices_storage_;
603 
604 public:
605  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
606 };
607 
612 {
613 public:
614  BodyVector();
615 
617  BodyVector(const std::vector<shapes::Shape*>& shapes, const EigenSTL::vector_Isometry3d& poses, double padding = 0.0);
618 
619  ~BodyVector();
620 
622  void addBody(Body* body);
623 
625  void addBody(const shapes::Shape* shape, const Eigen::Isometry3d& pose, double padding = 0.0);
626 
628  void clear();
629 
631  void setPose(unsigned int i, const Eigen::Isometry3d& pose);
632 
634  std::size_t getCount() const;
635 
637  bool containsPoint(const Eigen::Vector3d& p, bool verbose = false) const;
638 
640  bool containsPoint(const Eigen::Vector3d& p, std::size_t& index, bool verbose = false) const;
641 
647  bool intersectsRay(const Eigen::Vector3d& origin, const Eigen::Vector3d& dir, std::size_t& index,
648  EigenSTL::vector_Vector3d* intersections = nullptr, unsigned int count = 0) const;
649 
651  const Body* getBody(unsigned int i) const;
652 
653 private:
654  std::vector<Body*> bodies_;
655 };
656 
658 typedef std::shared_ptr<Body> BodyPtr;
659 
661 typedef std::shared_ptr<const Body> BodyConstPtr;
662 } // namespace bodies
663 
664 #endif
double radiusBSqr_
Definition: bodies.h:592
Definition of various shapes. No properties such as position are included. These are simply the descr...
Eigen::Vector3d normalH_
Definition: bodies.h:488
std::vector< unsigned int > triangles_
Definition: bodies.h:574
double radius2_
Definition: bodies.h:350
void setDimensionsDirty(const shapes::Shape *shape)
Set the dimensions of the body (from corresponding shape).
Definition: bodies.h:195
void setScaleDirty(double scale)
If the dimension of the body should be scaled, this method sets the scale.
Definition: bodies.h:115
void setPose(const Eigen::Isometry3d &pose)
Set the pose of the body. Default is identity.
Definition: bodies.h:175
void computeBoundingSphere(const std::vector< const Body *> &bodies, BoundingSphere &mergedSphere)
Compute the bounding sphere for a set of bodies and store the resulting sphere in mergedSphere...
Eigen::Vector3d corner2_
The translated, but not rotated max corner.
Definition: bodies.h:491
Eigen::Vector3d center_
Definition: bodies.h:485
Eigen::Vector3d normalL_
Definition: bodies.h:486
Definition of a cylinder Length is along z axis. Origin is at center of mass.
Definition: shapes.h:127
double width2_
Definition: bodies.h:494
std::vector< Eigen::Vector3d, Eigen::aligned_allocator< Eigen::Vector3d > > vector_Vector3d
bool containsPoint(double x, double y, double z, bool verbose=false) const
Check if a point is inside the body.
Definition: bodies.h:210
Definition of a cylinder.
Definition: bodies.h:357
EigenSTL::vector_Vector3d vertices_
Definition: bodies.h:573
double radiusB_
Definition: bodies.h:496
double radius2_
Definition: bodies.h:497
std::map< unsigned int, unsigned int > plane_for_triangle_
Definition: bodies.h:575
std::shared_ptr< Body > BodyPtr
Shared pointer to a Body.
Definition: bodies.h:78
Definition of a sphere.
Definition: bodies.h:293
double radius_
Definition: bodies.h:345
virtual ~Body()
Definition: bodies.h:97
std::shared_ptr< MeshData > mesh_data_
Definition: bodies.h:586
std::vector< Body * > bodies_
Definition: bodies.h:654
Box(const shapes::Shape *shape)
Definition: bodies.h:436
Eigen::Vector3d normalW_
Definition: bodies.h:487
Eigen::Vector3d mesh_center_
Definition: bodies.h:576
void setScale(double scale)
If the dimension of the body should be scaled, this method sets the scale. Default is 1...
Definition: bodies.h:122
double radiusBSqr_
Definition: bodies.h:418
double length_
Definition: bodies.h:406
Eigen::Vector3d center
Definition: bodies.h:63
Eigen::Isometry3d pose_
The location of the body (position and orientation)
Definition: bodies.h:286
double length2_
Definition: bodies.h:493
double y
Represents an oriented bounding box.
Definition: obb.h:53
Eigen::Vector3d center_
Definition: bodies.h:348
Definition of a sphere that bounds another object.
Definition: bodies.h:61
double radiusU_
Definition: bodies.h:416
Eigen::Vector3d box_size_
Definition: bodies.h:579
shapes::ShapeType type_
The type of shape this body was constructed from.
Definition: bodies.h:283
double radiusB_
Definition: bodies.h:417
std::shared_ptr< const Body > BodyConstPtr
Shared pointer to a const Body.
Definition: bodies.h:84
double width_
Definition: bodies.h:481
double height2_
Definition: bodies.h:495
unsigned int index
A basic definition of a shape. Shapes are considered centered at origin.
Definition: shapes.h:77
double radiusU_
Definition: bodies.h:349
Definition of a convex mesh. Convex hull is computed for a given shape::Mesh.
Definition: bodies.h:504
Eigen::Vector3d normalB1_
Definition: bodies.h:412
~Box() override
Definition: bodies.h:453
Definition of a box.
Definition: bodies.h:428
Definition of a cylinder.
Definition: bodies.h:70
EigenSTL::vector_Vector3d * scaled_vertices_
Definition: bodies.h:599
BoundingCylinder bounding_cylinder_
Definition: bodies.h:580
double radius2_
Definition: bodies.h:419
double length2_
Definition: bodies.h:415
Cylinder(const BoundingCylinder &cylinder)
Definition: bodies.h:371
double z
ShapeType
A list of known shape types.
Definition: shapes.h:61
double padding_
The scale that was set for this body.
Definition: bodies.h:280
double height_
Definition: bodies.h:482
Eigen::Vector3d center_
Definition: bodies.h:410
BodyPtr cloneAt(const Eigen::Isometry3d &pose) const
Get a clone of this body, but one that is located at the pose pose.
Definition: bodies.h:256
std::vector< Eigen::Vector4d, Eigen::aligned_allocator< Eigen::Vector4d > > vector_Vector4d
EigenSTL::vector_Vector4d planes_
Definition: bodies.h:572
Definition of a sphere.
Definition: shapes.h:106
~Sphere() override
Definition: bodies.h:318
A vector of Body objects.
Definition: bodies.h:611
void setPaddingDirty(double padd)
If the dimension of the body should be padded, this method sets the pading.
Definition: bodies.h:142
std::unique_ptr< EigenSTL::vector_Vector3d > scaled_vertices_storage_
Definition: bodies.h:602
double getScale() const
Retrieve the current scale.
Definition: bodies.h:129
Eigen::Vector3d center_
Definition: bodies.h:590
double d1_
Definition: bodies.h:420
double getPadding() const
Retrieve the current padding.
Definition: bodies.h:156
Eigen::Vector3d normalH_
Definition: bodies.h:411
Eigen::Vector3d normalB2_
Definition: bodies.h:413
Cylinder(const shapes::Shape *shape)
Definition: bodies.h:365
Eigen::Isometry3d pose
Definition: bodies.h:72
Definition of a box Aligned with the XYZ axes.
Definition: shapes.h:226
Box(const AABB &aabb)
Definition: bodies.h:442
ConvexMesh(const shapes::Shape *shape)
Definition: bodies.h:513
Eigen::Vector3d corner1_
The translated, but not rotated min corner.
Definition: bodies.h:490
void setPoseDirty(const Eigen::Isometry3d &pose)
Set the pose of the body.
Definition: bodies.h:169
double radius_
Definition: bodies.h:407
Sphere(const shapes::Shape *shape)
Definition: bodies.h:301
Eigen::Vector3d box_offset_
Definition: bodies.h:578
Represents an axis-aligned bounding box.
Definition: aabb.h:45
std::vector< Eigen::Isometry3d, Eigen::aligned_allocator< Eigen::Isometry3d > > vector_Isometry3d
~Cylinder() override
Definition: bodies.h:379
const Eigen::Isometry3d & getPose() const
Retrieve the pose of the body.
Definition: bodies.h:182
shapes::ShapeType getType() const
Get the type of shape this body represents.
Definition: bodies.h:102
double d2_
Definition: bodies.h:421
double length_
Definition: bodies.h:480
double x
A body is a shape + its pose. Point inclusion, ray intersection can be tested, volumes and bounding s...
Definition: bodies.h:89
double radiusB_
Definition: bodies.h:591
Eigen::Isometry3d i_pose_
Definition: bodies.h:589
void setPadding(double padd)
If constant padding should be added to the body, this method sets the padding. Default is 0...
Definition: bodies.h:149
double scale_
The scale that was set for this body.
Definition: bodies.h:277
Sphere(const BoundingSphere &sphere)
Definition: bodies.h:307
This set of classes allows quickly detecting whether a given point is inside an object or not...
Definition: aabb.h:42


geometric_shapes
Author(s): Ioan Sucan , Gil Jones
autogenerated on Fri Apr 14 2023 02:14:40