Skip to content

Commit

Permalink
added params for getting the mesh location
Browse files Browse the repository at this point in the history
  • Loading branch information
nag92 committed Apr 28, 2022
1 parent 4ba76db commit 7e00cd1
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
9 changes: 5 additions & 4 deletions rbdl_model/include/rbdl_model/BodyParam.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,17 @@ class BodyParam
~BodyParam(void);
inline double Mass() { return mass_; }
inline std::string MeshName() { return mesh_name_; }
inline Vector3d InertialOffsetPosition() { return location_position_; }
inline Vector3d InertialOffsetOrientation() { return location_orientation_; }
inline Vector3d Position() { return inertial_offset_position_; }
inline Vector3d Orientation() { return inertial_offset_orientation_; }
inline Vector3d Position() { return location_position_; }
inline Vector3d Orientation() { return location_orientation_; }
inline Vector3d InertialOffsetPosition() { return inertial_offset_position_; }
inline Vector3d InertialOffsetOrientation() { return inertial_offset_orientation_; }
inline Math::Matrix3d Inertia() { return inertia_; }

private:

std::string name_;
std::string mesh_name_;

double mass_{0.00000001};
Math::Matrix3d inertia_;
Vector3d inertial_offset_position_;
Expand Down
2 changes: 2 additions & 0 deletions rbdl_model/include/rbdl_model/BuildRBDLModel.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ class BuildRBDLModel
bool buildMeshPath();

std::string blender_namespace_;

YAML::Node baseNode_;
std::string actuator_config_file_;
std::string baseRigidBody_;
Expand All @@ -77,6 +78,7 @@ class BuildRBDLModel
std::string base_joint_name_;
Model *RBDLmodel_ = NULL;
Model *model = NULL;

std::unordered_map<std::string, bodyParamPtr> bodyParamObjectMap_;

// <parent, <jointname, jointParamPtr>>
Expand Down
4 changes: 1 addition & 3 deletions rbdl_model/src/BodyParam.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ BodyParam::BodyParam(YAML::Node bodyNode)
name_ = utilities.trimTrailingSpaces(name);

YAML::Node mesh_name = bodyNode["mesh"];
if(!name.IsDefined()) utilities.throwExceptionMessage("mesh name in Body Params");
if(!mesh_name.IsDefined()) utilities.throwExceptionMessage("mesh name in Body Params");
mesh_name_ = utilities.trimTrailingSpaces(mesh_name);

YAML::Node mass = bodyNode["mass"];
Expand All @@ -34,8 +34,6 @@ BodyParam::BodyParam(YAML::Node bodyNode)
inertial_offset_orientation_ = utilities.toRPY(&inertial_offset_orientation);




YAML::Node location = bodyNode["location"];
if(!location.IsDefined()) utilities.throwExceptionMessage("location in Body Params");

Expand Down
1 change: 0 additions & 1 deletion rbdl_model/src/BuildRBDLModel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ bool BuildRBDLModel::buildMeshPath() {

}


/*
* Parse YAML file and create instances of Body class for each body of the model
* @return true after successful parsing
Expand Down

0 comments on commit 7e00cd1

Please sign in to comment.