Go to the documentation of this file.
11 #ifndef PINOCCHIO_MODEL_DIR
12 #define PINOCCHIO_MODEL_DIR "path_to_the_model_dir"
15 int main(
int argc,
char ** argv)
31 std::cout <<
"model name: " <<
model.name << std::endl;
40 std::cout <<
"q: " <<
q.transpose() << std::endl;
50 std::cout <<
"\nJoint placements:" << std::endl;
52 std::cout << std::setw(24) << std::left <<
model.names[
joint_id] <<
": " << std::fixed
53 << std::setprecision(2) <<
data.oMi[
joint_id].translation().transpose() << std::endl;
56 std::cout <<
"\nCollision object placements:" << std::endl;
58 std::cout << geom_id <<
": " << std::fixed << std::setprecision(2)
59 <<
collision_data.oMg[geom_id].translation().transpose() << std::endl;
62 std::cout <<
"\nVisual object placements:" << std::endl;
64 std::cout << geom_id <<
": " << std::fixed << std::setprecision(2)
65 <<
visual_data.oMg[geom_id].translation().transpose() << std::endl;
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.
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.
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.
int main(int argc, char **argv)
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...
#define PINOCCHIO_MODEL_DIR
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 ...
JointCollectionTpl const Eigen::MatrixBase< ConfigVectorType > & q
JointCollectionTpl & model
Main pinocchio namespace.
pinocchio
Author(s):
autogenerated on Fri Nov 1 2024 02:41:44