diff --git a/src/core/RobotModel.cpp b/src/core/RobotModel.cpp index 0e9faffa..9596ca7f 100644 --- a/src/core/RobotModel.cpp +++ b/src/core/RobotModel.cpp @@ -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); diff --git a/src/core/RobotModel.hpp b/src/core/RobotModel.hpp index 51ef2c27..d7aaaa15 100644 --- a/src/core/RobotModel.hpp +++ b/src/core/RobotModel.hpp @@ -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 contact_points; ActiveContacts active_contacts; base::Vector3d gravity; base::samples::RigidBodyStateSE3 floating_base_state; diff --git a/src/robot_models/hyrodyn/RobotModelHyrodyn.cpp b/src/robot_models/hyrodyn/RobotModelHyrodyn.cpp index 7ed68466..f6364b84 100644 --- a/src/robot_models/hyrodyn/RobotModelHyrodyn.cpp +++ b/src/robot_models/hyrodyn/RobotModelHyrodyn.cpp @@ -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{ diff --git a/src/robot_models/kdl/RobotModelKDL.cpp b/src/robot_models/kdl/RobotModelKDL.cpp index 5e544724..7bfeac78 100644 --- a/src/robot_models/kdl/RobotModelKDL.cpp +++ b/src/robot_models/kdl/RobotModelKDL.cpp @@ -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()); diff --git a/src/robot_models/pinocchio/RobotModelPinocchio.cpp b/src/robot_models/pinocchio/RobotModelPinocchio.cpp index 296ae67c..3ce2b646 100644 --- a/src/robot_models/pinocchio/RobotModelPinocchio.cpp +++ b/src/robot_models/pinocchio/RobotModelPinocchio.cpp @@ -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 -----------------"); diff --git a/src/robot_models/rbdl/RobotModelRBDL.cpp b/src/robot_models/rbdl/RobotModelRBDL.cpp index 9cc4fe7d..f9d1bc5a 100644 --- a/src/robot_models/rbdl/RobotModelRBDL.cpp +++ b/src/robot_models/rbdl/RobotModelRBDL.cpp @@ -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 -----------------");