63 bool verbose =
false) {
65 pin::urdf::buildModel(spec.
urdf_path, pin::JointModelFreeFlyer(), model,
68 pin::urdf::buildModel(spec.
urdf_path, model, verbose);
70 if (std::filesystem::exists(spec.
srdf_path)) {
71 pin::srdf::loadReferenceConfigurations(model, spec.
srdf_path, verbose);
73 pin::srdf::loadRotorParameters(model, spec.
srdf_path, verbose);
74 }
catch (
const std::invalid_argument &) {
82 pin::GeometryModel *visual_model,
83 pin::GeometryModel *collision_model,
84 bool verbose =
false) {
89 pin::urdf::buildGeom(model, spec.
urdf_path, pin::VISUAL, *visual_model,
92 if (collision_model) {
93 pin::urdf::buildGeom(model, spec.
urdf_path, pin::COLLISION,
94 *collision_model, package_dirs);
95 if (std::filesystem::exists(spec.
srdf_path)) {
96 collision_model->addAllCollisionPairs();
97 pin::srdf::removeCollisionPairs(model, *collision_model, spec.
srdf_path,
Support for the Pinocchio rigid-body algorithms library and the Coal collision detection library.
Definition LoadPinocchioGeometry.h:8
pin::Model & loadModel(const RobotSpec &spec, pin::Model &model, bool verbose=false)
Definition RobotLoader.h:62
std::vector< std::string > getPackageDirs(const RobotSpec &spec)
Definition RobotLoader.h:44
void loadModels(const RobotSpec &spec, pin::Model &model, pin::GeometryModel *visual_model, pin::GeometryModel *collision_model, bool verbose=false)
Definition RobotLoader.h:81
Definition RobotLoader.h:16
std::filesystem::path base_package_path
Path to the base package path.
Definition RobotLoader.h:22
std::filesystem::path urdf_path
Path to the URDF file.
Definition RobotLoader.h:18
RobotSpec & ensure_absolute_filepaths()
Definition RobotLoader.h:30
std::filesystem::path relative_package_path
Path to the actual model package, relative to the base path.
Definition RobotLoader.h:24
bool has_free_flyer
Definition RobotLoader.h:27
std::filesystem::path srdf_path
Path to the SRDF file.
Definition RobotLoader.h:20