89 bool verbose =
false) {
91 pin::urdf::buildModel(spec.
urdf_path, pin::JointModelFreeFlyer(), model,
94 pin::urdf::buildModel(spec.
urdf_path, model, verbose);
96 if (std::filesystem::exists(spec.
srdf_path)) {
97 pin::srdf::loadReferenceConfigurations(model, spec.
srdf_path, verbose);
99 pin::srdf::loadRotorParameters(model, spec.
srdf_path, verbose);
100 }
catch (
const std::invalid_argument &) {
108 pin::GeometryModel *visual_model,
109 pin::GeometryModel *collision_model,
110 bool verbose =
false) {
115 pin::urdf::buildGeom(model, spec.
urdf_path, pin::VISUAL, *visual_model,
118 if (collision_model) {
119 pin::urdf::buildGeom(model, spec.
urdf_path, pin::COLLISION,
120 *collision_model, package_dirs);
121 if (std::filesystem::exists(spec.
srdf_path)) {
122 collision_model->addAllCollisionPairs();
123 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:88
std::vector< std::string > getPackageDirs(const RobotSpec &spec)
Definition RobotLoader.h:70
void loadModels(const RobotSpec &spec, pin::Model &model, pin::GeometryModel *visual_model, pin::GeometryModel *collision_model, bool verbose=false)
Definition RobotLoader.h:107
Definition RobotLoader.h:18
std::filesystem::path base_package_path
Path to the base package path.
Definition RobotLoader.h:24
std::filesystem::path urdf_path
Path to the URDF file.
Definition RobotLoader.h:20
RobotSpec & ensure_absolute_filepaths()
Definition RobotLoader.h:32
std::filesystem::path relative_package_path
Path to the actual model package, relative to the base path.
Definition RobotLoader.h:26
bool has_free_flyer
Definition RobotLoader.h:29
std::filesystem::path srdf_path
Path to the SRDF file.
Definition RobotLoader.h:22