Go to the documentation of this file.
8 #ifdef PINOCCHIO_WITH_HPP_FCL
10 #endif // PINOCCHIO_WITH_HPP_FCL
20 using namespace Eigen;
25 const unsigned int NBT = 1000 * 100;
26 const unsigned int NBD = 1000;
28 const unsigned int NBT = 1;
29 const unsigned int NBD = 1;
30 std::cout <<
"(the time score in debug mode is not relevant) " << std::endl;
33 std::string romeo_filename =
35 + std::string(
"/example-robot-data/robots/romeo_description/urdf/romeo_small.urdf");
37 std::string romeo_meshDir =
PINOCCHIO_MODEL_DIR + std::string(
"/example-robot-data/robots");
44 #ifdef PINOCCHIO_WITH_HPP_FCL
46 #endif // PINOCCHIO_WITH_HPP_FCL
50 VectorXd qmax = Eigen::VectorXd::Ones(
model.nq);
55 for (
size_t i = 0;
i < NBT; ++
i)
58 qdots_romeo[
i] = Eigen::VectorXd::Random(
model.nv);
59 qddots_romeo[
i] = Eigen::VectorXd::Random(
model.nv);
75 std::cout <<
"Update Collision Geometry < false > = \t" << update_col_time <<
" "
78 #ifdef PINOCCHIO_WITH_HPP_FCL
83 for (std::vector<pinocchio::CollisionPair>::iterator
it =
geom_model.collisionPairs.begin();
90 std::cout <<
"Collision test between two geometry objects (mean time) = \t"
91 << collideTime / double(
geom_model.collisionPairs.size())
100 std::cout <<
"Collision Test : robot in collision? = \t" << is_colliding_time
108 double computeDistancesTime =
110 std::cout <<
"Compute distance between two geometry objects (mean time) = \t"
111 << computeDistancesTime / double(
geom_model.collisionPairs.size()) <<
" "
113 <<
geom_model.collisionPairs.size() <<
" col pairs" << std::endl;
115 #endif // PINOCCHIO_WITH_HPP_FCL
void forwardKinematics(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, DataTpl< Scalar, Options, JointCollectionTpl > &data, const Eigen::MatrixBase< ConfigVectorType > &q)
Update the joint placements according to the current joint configuration.
bool computeCollisions(BroadPhaseManagerBase< BroadPhaseManagerDerived > &broadphase_manager, CollisionCallBackBase *callback)
Calls computeCollision for every active pairs of GeometryData. This function assumes that updateGeome...
void updateGeometryPlacements(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, DataTpl< Scalar, Options, JointCollectionTpl > &data, const GeometryModel &geom_model, GeometryData &geom_data, const Eigen::MatrixBase< ConfigVectorType > &q)
Apply a forward kinematics and update the placement of the geometry objects.
static std::string unitName(Unit u)
void randomConfiguration(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, const Eigen::MatrixBase< ConfigVectorIn1 > &lowerLimits, const Eigen::MatrixBase< ConfigVectorIn2 > &upperLimits, const Eigen::MatrixBase< ReturnType > &qout)
Generate a configuration vector uniformly sampled among provided limits.
bool computeCollision(const GeometryModel &geom_model, GeometryData &geom_data, const PairIndex pair_id, fcl::CollisionRequest &collision_request)
Compute the collision status between a SINGLE collision pair. The result is store in the collisionRes...
ModelTpl< Scalar, Options, JointCollectionTpl > & buildModel(const std::string &filename, const typename ModelTpl< Scalar, Options, JointCollectionTpl >::JointModel &rootJoint, const std::string &rootJointName, ModelTpl< Scalar, Options, JointCollectionTpl > &model, const bool verbose=false)
Build the model from a URDF file with a particular joint as root of the model tree inside the model g...
std::size_t computeDistances(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, DataTpl< Scalar, Options, JointCollectionTpl > &data, const GeometryModel &geom_model, GeometryData &geom_data)
GeometryModel & buildGeom(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, const std::string &filename, const GeometryType type, GeometryModel &geom_model, const std::vector< std::string > &package_paths=std::vector< std::string >(), ::hpp::fcl::MeshLoaderPtr mesh_loader=::hpp::fcl::MeshLoaderPtr())
Build The GeometryModel from a URDF file. Search for meshes in the directories specified by the user ...
#define PINOCCHIO_ALIGNED_STD_VECTOR(Type)
Main pinocchio namespace.
#define PINOCCHIO_MODEL_DIR
pinocchio
Author(s):
autogenerated on Sun Dec 22 2024 03:41:12