multibody/fcl.hpp
Go to the documentation of this file.
1 //
2 // Copyright (c) 2015-2023 CNRS INRIA
3 //
4 
5 #ifndef __pinocchio_multibody_fcl_hpp__
6 #define __pinocchio_multibody_fcl_hpp__
7 
12 
13 #ifdef PINOCCHIO_WITH_HPP_FCL
14 
15  #if (WIN32)
16  // It appears that std::snprintf is missing for Windows.
17  #if !( \
18  (defined(_MSC_VER) && _MSC_VER < 1900) \
19  || (defined(__MINGW32__) && !defined(__MINGW64_VERSION_MAJOR)))
20  #include <cstdio>
21  #include <stdarg.h>
22 namespace std
23 {
24  inline int _snprintf(char * buffer, std::size_t buf_size, const char * format, ...)
25  {
26  int res;
27 
28  va_list args;
29  va_start(args, format);
30  res = vsnprintf(buffer, buf_size, format, args);
31  va_end(args);
32 
33  return res;
34  }
35 } // namespace std
36  #endif
37  #endif
38 
40  #include <hpp/fcl/collision.h>
41  #include <hpp/fcl/distance.h>
42  #include <hpp/fcl/shape/geometric_shapes.h>
44 #endif
45 
46 #include <map>
47 #include <vector>
48 #include <utility>
49 #include <memory>
50 #include <limits>
51 #include <assert.h>
52 
53 #include <boost/foreach.hpp>
54 
55 namespace pinocchio
56 {
57 
58 #ifndef PINOCCHIO_WITH_HPP_FCL
59 
60  namespace fcl
61  {
62 
64  {
66 
67  bool operator==(const FakeCollisionGeometry &) const
68  {
69  return true;
70  }
71  };
72 
73  struct AABB
74  {
75  AABB()
76  : min_(0)
77  , max_(1) {};
78 
79  int min_;
80  int max_;
81  };
82 
84 
85  } // namespace fcl
86 
87 #else
88 
89  namespace fcl = hpp::fcl;
90 
91  inline bool operator==(const fcl::CollisionObject & lhs, const fcl::CollisionObject & rhs)
92  {
93  return lhs.collisionGeometry() == rhs.collisionGeometry()
94  && lhs.getAABB().min_ == rhs.getAABB().min_ && lhs.getAABB().max_ == rhs.getAABB().max_;
95  }
96 
97 #endif // PINOCCHIO_WITH_HPP_FCL
98 
99 } // namespace pinocchio
100 
101 #endif // ifndef __pinocchio_multibody_fcl_hpp__
aligned-vector.hpp
CollisionObject
CollisionObject(const shared_ptr< CollisionGeometry > &cgeom_, bool compute_local_aabb=true)
pinocchio::operator==
bool operator==(const ConstraintDataBase< ConstraintDataDerived > &data1, const ConstraintDataTpl< Scalar, Options, ConstraintCollectionTpl > &data2)
Definition: constraint-data-generic.hpp:104
distance.h
args
args
fcl-pinocchio-conversions.hpp
pinocchio::fcl::FakeCollisionGeometry::operator==
bool operator==(const FakeCollisionGeometry &) const
Definition: multibody/fcl.hpp:67
res
res
pinocchio::fcl::FakeCollisionGeometry
Definition: multibody/fcl.hpp:63
se3.hpp
pinocchio::fcl::CollisionGeometry
FakeCollisionGeometry CollisionGeometry
Definition: multibody/fcl.hpp:83
hpp::fcl
pinocchio::fcl::AABB::max_
int max_
Definition: multibody/fcl.hpp:80
std
Definition: autodiff/casadi/utils/static-if.hpp:64
model-item.hpp
pinocchio::fcl::AABB::min_
int min_
Definition: multibody/fcl.hpp:77
pinocchio::fcl::FakeCollisionGeometry::FakeCollisionGeometry
FakeCollisionGeometry()
Definition: multibody/fcl.hpp:65
pinocchio::fcl::AABB
Definition: multibody/fcl.hpp:73
pinocchio::fcl::AABB::AABB
AABB()
Definition: multibody/fcl.hpp:75
collision.h
collision_object.h
fwd.hpp
simulation-closed-kinematic-chains.rhs
rhs
Definition: simulation-closed-kinematic-chains.py:138
pinocchio
Main pinocchio namespace.
Definition: timings.cpp:27


pinocchio
Author(s):
autogenerated on Sun Dec 22 2024 03:41:09