Skip to content

Commit

Permalink
Remove irrelevant variable
Browse files Browse the repository at this point in the history
  • Loading branch information
dmronga committed May 6, 2024
1 parent 79c0e55 commit 1f74115
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 8 deletions.
1 change: 0 additions & 1 deletion src/core/RobotModel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ void RobotModel::clear(){
joint_names.clear();
actuated_joint_names.clear();
joint_names_floating_base.clear();
contact_points.clear();
base_frame="";
world_frame="";
gravity = base::Vector3d(0,0,-9.81);
Expand Down
1 change: 0 additions & 1 deletion src/core/RobotModel.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ class RobotModel{
/** ID of kinematic chain given root and tip*/
const std::string chainID(const std::string& root, const std::string& tip){return root + "_" + tip;}

std::vector<std::string> contact_points;
ActiveContacts active_contacts;
base::Vector3d gravity;
base::samples::RigidBodyStateSE3 floating_base_state;
Expand Down
6 changes: 3 additions & 3 deletions src/robot_models/hyrodyn/RobotModelHyrodyn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -417,13 +417,13 @@ void RobotModelHyrodyn::computeInverseDynamics(base::commands::Joints &solver_ou
}
hyrodyn.calculate_forward_system_state();

uint nc = contact_points.size();
uint nc = robot_model_config.contact_points.size();
hyrodyn.wrench_interaction.resize(nc);
hyrodyn.wrench_points = contact_points;
hyrodyn.wrench_points = robot_model_config.contact_points.names;
hyrodyn.wrench_resolution.resize(nc);
hyrodyn.f_ext.resize(nc);
for(uint i = 0; i < nc; i++){
const std::string &name = contact_points[i];
const std::string &name = hyrodyn.wrench_points[i];
hyrodyn.wrench_interaction[i] = true; // Resistive
hyrodyn.wrench_resolution[i] = true; // body coordinates
try{
Expand Down
1 change: 0 additions & 1 deletion src/robot_models/kdl/RobotModelKDL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ bool RobotModelKDL::configure(const RobotModelConfig& cfg){
tau.resize(noOfJoints());
zero.resize(noOfJoints());
zero.data.setZero();
contact_points = cfg.contact_points.names;
active_contacts = cfg.contact_points;
joint_space_inertia_mat.resize(noOfJoints(), noOfJoints());
bias_forces.resize(noOfJoints());
Expand Down
1 change: 0 additions & 1 deletion src/robot_models/pinocchio/RobotModelPinocchio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ bool RobotModelPinocchio::configure(const RobotModelConfig& cfg){
for(uint i = 0; i < actuated_joint_names.size(); i++)
selection_matrix(i, jointIndex(actuated_joint_names[i])) = 1.0;

contact_points = cfg.contact_points.names;
active_contacts = cfg.contact_points;

LOG_DEBUG("------------------- WBC RobotModelPinocchio -----------------");
Expand Down
1 change: 0 additions & 1 deletion src/robot_models/rbdl/RobotModelRBDL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ bool RobotModelRBDL::configure(const RobotModelConfig& cfg){
for(int i = 0; i < actuated_joint_names.size(); i++)
selection_matrix(i, jointIndex(actuated_joint_names[i])) = 1.0;

contact_points = cfg.contact_points.names;
active_contacts = cfg.contact_points;

LOG_DEBUG("------------------- WBC RobotModelRBDL -----------------");
Expand Down

0 comments on commit 1f74115

Please sign in to comment.