Skip to content

Commit

Permalink
Remove functionalities deprecated in iDynTree 1
Browse files Browse the repository at this point in the history
  • Loading branch information
traversaro committed Oct 16, 2020
1 parent d8808b0 commit 34618cd
Show file tree
Hide file tree
Showing 32 changed files with 25 additions and 880 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,20 +104,6 @@ class ExtWrenchesAndJointTorquesEstimator
*/
bool setModelAndSensors(const Model & _model, const SensorsList & _sensors);

/**
* Load model and sensors from file.
*
* @deprecated Use iDynTree::ModelLoader::loadModelFromFile and call setModelAndSensors
* on the parsed Model and SensorsList
*
* @param[in] filename path to the file to load.
* @param[in] filetype (optional) explicit definiton of the filetype to load.
* Only "urdf" is supported at the moment.
* @return true if all went well (files were correctly loaded and consistent), false otherwise.
*/
IDYNTREE_DEPRECATED_WITH_MSG("Use iDynTree::ModelLoader::loadModelFromFile and call setModelAndSensors on the parsed Model and SensorsList")
bool loadModelAndSensorsFromFile(const std::string filename, const std::string filetype="");

/**
* Load model and sensors from file, specifieng the dof considered for the estimation.
*
Expand Down
32 changes: 0 additions & 32 deletions src/estimation/include/iDynTree/Estimation/SimpleLeggedOdometry.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,38 +118,6 @@ class SimpleLeggedOdometry
*/
bool setModel(const Model & _model);

/**
* Load model from file.
*
* @deprecated Use iDynTree::ModelLoader::loadModelFromFile and call setModel on the parsed Model
*
* @param[in] filename path to the file to load.
* @param[in] filetype (optional) explicit definiton of the filetype to load.
* Only "urdf" is supported at the moment.
* @return true if all went well (files were correctly loaded and consistent), false otherwise.
*
*/
IDYNTREE_DEPRECATED_WITH_MSG("Use iDynTree::ModelLoader::loadModelFromFile and call setModel on the parsed Model")
bool loadModelFromFile(const std::string filename, const std::string filetype="");

/**
* Load model from file, specifieng the dof considered for the estimation.
*
* @deprecated Use iDynTree::ModelLoader::loadReducedModelFromFile and call setModel on the parsed Model
*
* @note this will create e a reduced model only with the joint specified in consideredDOFs
*
* @param[in] filename path to the file to load.
* @param[in] consideredDOFs list of dof to consider in the model.
* @param[in] filetype (optional) explicit definiton of the filetype to load.
* Only "urdf" is supported at the moment.
* @return true if all went well (files were correctly loaded and consistent), false otherwise.
*/
IDYNTREE_DEPRECATED_WITH_MSG("Use iDynTree::ModelLoader::loadReducedModelFromFile and call setModel on the parsed Model")
bool loadModelFromFileWithSpecifiedDOFs(const std::string filename,
const std::vector<std::string> & consideredDOFs,
const std::string filetype="");

/**
* Get used model.
*
Expand Down
11 changes: 0 additions & 11 deletions src/estimation/src/ExtWrenchesAndJointTorquesEstimator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,17 +117,6 @@ bool ExtWrenchesAndJointTorquesEstimator::setModelAndSensors(const Model& _model
return true;
}

bool ExtWrenchesAndJointTorquesEstimator::loadModelAndSensorsFromFile(const std::string filename,
const std::string filetype)
{
ModelLoader loader;
if (!loader.loadModelFromFile(filename, filetype)) {
reportError("ExtWrenchesAndJointTorquesEstimator", "loadModelAndSensorsFromFile", "Error in parsing from URDF.");
return false;
}
return setModelAndSensors(loader.model(), loader.sensors());
}

bool ExtWrenchesAndJointTorquesEstimator::loadModelAndSensorsFromFileWithSpecifiedDOFs(const std::string filename,
const std::vector< std::string >& consideredDOFs,
const std::string filetype)
Expand Down
30 changes: 0 additions & 30 deletions src/estimation/src/SimpleLeggedOdometry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -182,36 +182,6 @@ bool SimpleLeggedOdometry::setModel(const Model& _model)
return true;
}


bool SimpleLeggedOdometry::loadModelFromFile(const std::string filename,
const std::string filetype)
{
ModelLoader loader;
if (!loader.loadModelFromFile(filename, filetype)) {
reportError("SimpleLeggedOdometry",
"loadModelFromFile",
"Error in parsing model from URDF.");
return false;
}
return setModel(loader.model());
}

bool SimpleLeggedOdometry::loadModelFromFileWithSpecifiedDOFs(const std::string filename,
const std::vector<std::string>& consideredDOFs,
const std::string filetype)
{
ModelLoader loader;
if (!loader.loadReducedModelFromFile(filename, consideredDOFs, filetype)) {
reportError("SimpleLeggedOdometry",
"loadModelFromFileWithSpecifiedDOFs",
"Error in parsing model from URDF.");
return false;
}
return setModel(loader.model());
}



std::string SimpleLeggedOdometry::getCurrentFixedLink()
{
if( this->m_isModelValid && this->m_isOdometryInitialized )
Expand Down
22 changes: 1 addition & 21 deletions src/high-level/include/iDynTree/KinDynComputations.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,27 +121,7 @@ class KinDynComputations {
* @param model the model to use in this class.
* @return true if all went ok, false otherwise.
*/
bool loadRobotModel(const iDynTree::Model & model );

/**
* Load the model of the robot from an external file.
*
* @param filename path to the file to load
* @param filetype type of the file to load, currently supporting only urdf type.
*
*/
IDYNTREE_DEPRECATED_WITH_MSG("Use iDynTree::ModelLoader::loadRobotModelFromFile and pass the Model to loadRobotModel")
bool loadRobotModelFromFile(const std::string & filename, const std::string & filetype="urdf");

/**
* Load the model of the robot from a string.
*
* @param modelString string containg the model of the robot.
* @param filetype type of the file to load, currently supporting only urdf type.
*
*/
IDYNTREE_DEPRECATED_WITH_MSG("Use iDynTree::ModelLoader::loadRobotModelFromString and pass the Model to loadRobotModel")
bool loadRobotModelFromString(const std::string & modelString, const std::string & filetype="urdf");
bool loadRobotModel(const iDynTree::Model & model);

/**
* Return true if the models for the robot have been correctly.
Expand Down
22 changes: 0 additions & 22 deletions src/high-level/src/KinDynComputations.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -460,28 +460,6 @@ void KinDynComputations::computeBiasAccFwdKinematics()
this->pimpl->m_areBiasAccelerationsUpdated = ok;
}

bool KinDynComputations::loadRobotModelFromFile(const std::string& filename,
const std::string& filetype)
{
ModelLoader loader;
if (!loader.loadModelFromFile(filename, filetype)) {
reportError("KinDynComputations", "loadRobotModelFromFile", "Error in loading robot model");
return false;
}
return this->loadRobotModel(loader.model());
}

bool KinDynComputations::loadRobotModelFromString(const std::string& modelString,
const std::string& filetype)
{
ModelLoader loader;
if (!loader.loadModelFromString(modelString, filetype)) {
reportError("KinDynComputations", "loadRobotModelFromString", "Error in loading robot model");
return false;
}
return this->loadRobotModel(loader.model());
}

bool KinDynComputations::loadRobotModel(const Model& model)
{
this->pimpl->m_robot_model = model;
Expand Down
4 changes: 0 additions & 4 deletions src/icub/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,3 @@ install(TARGETS ${libraryname}

set_property(GLOBAL APPEND PROPERTY ${VARS_PREFIX}_TARGETS idyntree-icub)

# Install headers in deprecated location
install(DIRECTORY include/iDynTree/iCub
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/iDynTree")

20 changes: 0 additions & 20 deletions src/icub/include/iDynTree/iCub/skinDynLibConversions.h

This file was deleted.

77 changes: 6 additions & 71 deletions src/inverse-kinematics/include/iDynTree/InverseKinematics.h
Original file line number Diff line number Diff line change
Expand Up @@ -165,22 +165,6 @@ class iDynTree::InverseKinematics

bool setFloatingBaseOnFrameNamed(const std::string &floatingBaseFrameName);

/*!
* Sets the robot current configuration
*
*
* @param baseConfiguration transformation identifying the base pose with respect to the world frame
* @param robotConfiguration the robot configuration
*
* @note the size (and order) of jointConfiguration must match the joints in the model, not
* in the consideredJoints variable
*
* @return true if successful, false otherwise.
*/
IDYNTREE_DEPRECATED_WITH_MSG("Use setCurrentRobotConfiguration instead")
bool setRobotConfiguration(const iDynTree::Transform& baseConfiguration,
const iDynTree::VectorDynSize& jointConfiguration);

/*!
* Sets the robot current configuration
*
Expand Down Expand Up @@ -660,23 +644,6 @@ class iDynTree::InverseKinematics
enum InverseKinematicsTreatTargetAsConstraint targetResolutionMode(const std::string& frameName);
///@}

/*!
* Sets a desired final configuration for the joints.
*
* The solver will try to obtain solutions as similar to the specified configuration as possible
*
* @note the desiredJointConfiguration have the same serialisation of the joints in the specified model
*
* @param[in] desiredJointConfiguration configuration for the joints
* @param[in] weight weight for the joint configuration cost.
* If it is not passed, the previous passed value will be mantained.
* If the value was never passed, its value is 1e-6 .
*
* @return true if successful, false otherwise.
*/
IDYNTREE_DEPRECATED_WITH_MSG("Use the explicit setDesiredFullJointsConfiguration or setDesiredReducedJointConfiguration instead")
bool setDesiredJointConfiguration(const iDynTree::VectorDynSize& desiredJointConfiguration, double weight=-1.0);

/*!
* Sets a desired final configuration for all the robot joints.
*
Expand Down Expand Up @@ -743,20 +710,6 @@ class iDynTree::InverseKinematics
*/
bool setDesiredReducedJointConfiguration(const iDynTree::VectorDynSize& desiredJointConfiguration, const iDynTree::VectorDynSize& weights);



/*!
* Initial guess for the solution
*
* @note the initialCondition variable have the same serialisation of the joints in the specified model
* @param baseTransform initial base pose
* @param initialCondition initial joints configuration
* @return
*/
IDYNTREE_DEPRECATED_WITH_MSG("Use the explicit setFullJointsInitialCondition or setReducedInitialCondition instead")
bool setInitialCondition(const iDynTree::Transform* baseTransform,
const iDynTree::VectorDynSize* initialCondition);

bool setFullJointsInitialCondition(const iDynTree::Transform* baseTransform,
const iDynTree::VectorDynSize* initialCondition);
bool setReducedInitialCondition(const iDynTree::Transform* baseTransform,
Expand All @@ -768,16 +721,6 @@ class iDynTree::InverseKinematics
/*! @name Solution-related methods
*/
///@{
/*!
* Return the last solution of the inverse kinematics problem
*
* @param[out] baseTransformSolution solution for the base position
* @param[out] shapeSolution solution for the shape (the internal configurations)
*/
IDYNTREE_DEPRECATED_WITH_MSG("Use the explicit getFullJointsSolution or getReducedSolution instead")
void getSolution(iDynTree::Transform& baseTransformSolution,
iDynTree::VectorDynSize& shapeSolution);


void getFullJointsSolution(iDynTree::Transform& baseTransformSolution,
iDynTree::VectorDynSize& shapeSolution);
Expand Down Expand Up @@ -808,28 +751,20 @@ class iDynTree::InverseKinematics
- add check on modelLoaded, and other stuff if needed
*/

/*!
* Access the model used by the InverseKinematics .
*
* @return A constant reference to iDynTree::Model used by the inverse kinematics.
*/
IDYNTREE_DEPRECATED_WITH_MSG("Use the explicit fullModel or reducedModel instead")
const Model & model() const;

const Model & fullModel() const;

const Model & reducedModel() const;

void setCOMTarget(iDynTree::Position& desiredPosition, double weight = 1.0);

void setCOMAsConstraint(bool asConstraint = true);

void setCOMAsConstraintTolerance(double tolerance = 1e-8);

bool isCOMAConstraint();

bool isCOMTargetActive();

void deactivateCOMTarget();

/*!
Expand Down
Loading

0 comments on commit 34618cd

Please sign in to comment.