Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shorten header structure and merge Model and Sensors libraries #1104

Merged
merged 16 commits into from
Sep 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- The license of the library is changed to `BSD-3-Clause` (https://github.com/robotology/idyntree/pull/1089).
- The `iDynTree::ModelExporterOptions` class was changed to be defined as a struct (https://github.com/robotology/idyntree/pull/1088).
- The header structure has been shortened, from `<iDynTree/@component@/@headername@.h>` to `<iDynTree/@headername@.h>` (https://github.com/robotology/idyntree/pull/1104).
- `iDynTree::idyntree-sensors` library has been merged in `iDynTree::idyntree-model` (https://github.com/robotology/idyntree/pull/1104).

### Deprecated

- Linking `iDynTree::idyntree-sensors` is deprecated, you can just link `iDynTree::idyntree-model` instead, or just search and replace `iDynTree::idyntree-sensors` with an empty string if you are already linking `iDynTree::idyntree-model` (https://github.com/robotology/idyntree/pull/1104).
- Including `<iDynTree/Core/@headername@.h>`, `<iDynTree/Model/@headername@.h>`, `<iDynTree/Sensors/@headername@.h>`, `<iDynTree/ModelIO/@headername@.h>`, `<iDynTree/Estimation/@headername@.h>`, `<iDynTree/yarp/@headername@.h>` is deprecated, just include `<iDynTree/@headername@.h>` . To perform this migration, just search and replace `<iDynTree/Core/` with `<iDynTree/`, `<iDynTree/Model/` with `<iDynTree/`, `<iDynTree/Sensors/` with `<iDynTree/`, `<iDynTree/ModelIO/` with `<iDynTree/`, `<iDynTree/Estimation/` with `<iDynTree/`, `<iDynTree/yarp/` with `<iDynTree/` (https://github.com/robotology/idyntree/pull/1104).


## [9.1.0] - 2023-05-25
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ The **major characteristic features** of iDynTree are:
* It contains support for **reading and writing URDF files** from a `iDynTree::Model`, making it useful to write tools that modify robot models and saves them back to file. This is done as iDynTree was meant to develop **tools for identification of kinematics and dynamics parameters**.
* It defaults to use the **mixed representation** to represent link quantities (including the velocity and acceleration of the base link), but it can optionally use also **body (left-trivialized)** or **inertial (right-trivialized)** representation if requested. This is done because iDynTree was developed to satisfy the needs of **research in synthesis of floating-base whole-body controllers**. If you are not familiar with the different representation for 6D quantities, check [Section 6 of "Multibody dynamics notation (version 2)"](
https://pure.tue.nl/ws/portalfiles/portal/139293126/A_Multibody_Dynamics_Notation_Revision_2_.pdf).
* It contains an implementation of the algorithm used in the iCub humanoid robot to **estimate the joint torques without the need of collocated joint torque sensors**, exploting the specific **undirected graph data structure** . This is done as this was one of the originally goal for the implementation of iDynTree. See the class [`iDynTree::ExtWrenchesAndJointTorquesEstimator`](https://github.com/robotology/idyntree/blob/master/src/estimation/include/iDynTree/Estimation/ExtWrenchesAndJointTorquesEstimator.h) and [Chapter 6 of "Modelling, Estimation and Identification of Humanoid Robots Dynamics"](https://traversaro.github.io/traversaro-phd-thesis/traversaro-phd-thesis.pdf).
* It contains an implementation of the algorithm used in the iCub humanoid robot to **estimate the joint torques without the need of collocated joint torque sensors**, exploting the specific **undirected graph data structure** . This is done as this was one of the originally goal for the implementation of iDynTree. See the class [`iDynTree::ExtWrenchesAndJointTorquesEstimator`](https://github.com/robotology/idyntree/blob/master/src/estimation/include/iDynTree/ExtWrenchesAndJointTorquesEstimator.h) and [Chapter 6 of "Modelling, Estimation and Identification of Humanoid Robots Dynamics"](https://traversaro.github.io/traversaro-phd-thesis/traversaro-phd-thesis.pdf).

To avoid confusion, it is also useful to clarify what **iDynTree is not**:
* It is not the **fastest C++ library** for kinematics and dynamics multibody computations for robotics. It is not slow, but if have an application in which you need the absolute fastest library, check out [Pinocchio](https://github.com/stack-of-tasks/pinocchio).
Expand Down
278 changes: 139 additions & 139 deletions bindings/iDynTree.i
Original file line number Diff line number Diff line change
Expand Up @@ -38,94 +38,94 @@
#include <cmath>

//Utils
#include "iDynTree/Core/Utils.h"
#include "iDynTree/Utils.h"

// Basic math classes
#include "iDynTree/Core/MatrixDynSize.h"
#include "iDynTree/Core/MatrixFixSize.h"
#include "iDynTree/Core/SparseMatrix.h"
#include "iDynTree/MatrixDynSize.h"
#include "iDynTree/MatrixFixSize.h"
#include "iDynTree/SparseMatrix.h"

#include "iDynTree/Core/VectorDynSize.h"
#include "iDynTree/Core/VectorFixSize.h"
#include "iDynTree/VectorDynSize.h"
#include "iDynTree/VectorFixSize.h"

// Basic Vectors: Point Vectors and Spatial Vectors
#include "iDynTree/Core/PositionRaw.h"
#include "iDynTree/Core/Position.h"
#include "iDynTree/Core/SpatialForceVector.h"
#include "iDynTree/Core/SpatialMotionVector.h"
#include "iDynTree/Core/Twist.h"
#include "iDynTree/Core/Wrench.h"
#include "iDynTree/Core/SpatialMomentum.h"
#include "iDynTree/Core/SpatialAcc.h"
#include "iDynTree/Core/ClassicalAcc.h"
#include "iDynTree/Core/Direction.h"
#include "iDynTree/Core/Axis.h"
#include "iDynTree/PositionRaw.h"
#include "iDynTree/Position.h"
#include "iDynTree/SpatialForceVector.h"
#include "iDynTree/SpatialMotionVector.h"
#include "iDynTree/Twist.h"
#include "iDynTree/Wrench.h"
#include "iDynTree/SpatialMomentum.h"
#include "iDynTree/SpatialAcc.h"
#include "iDynTree/ClassicalAcc.h"
#include "iDynTree/Direction.h"
#include "iDynTree/Axis.h"

// Inertias
#include "iDynTree/Core/RotationalInertiaRaw.h"
#include "iDynTree/Core/SpatialInertiaRaw.h"
#include "iDynTree/Core/SpatialInertia.h"
#include "iDynTree/Core/ArticulatedBodyInertia.h"
#include "iDynTree/Core/InertiaNonLinearParametrization.h"
#include "iDynTree/RotationalInertiaRaw.h"
#include "iDynTree/SpatialInertiaRaw.h"
#include "iDynTree/SpatialInertia.h"
#include "iDynTree/ArticulatedBodyInertia.h"
#include "iDynTree/InertiaNonLinearParametrization.h"

// Transformations: Rotation and Transform
#include "iDynTree/Core/RotationRaw.h"
#include "iDynTree/Core/Rotation.h"
#include "iDynTree/Core/Transform.h"
#include "iDynTree/Core/TransformDerivative.h"
#include "iDynTree/Core/Span.h"
#include "iDynTree/RotationRaw.h"
#include "iDynTree/Rotation.h"
#include "iDynTree/Transform.h"
#include "iDynTree/TransformDerivative.h"
#include "iDynTree/Span.h"

// Model related data structures
#include "iDynTree/Model/Indices.h"
#include "iDynTree/Model/LinkState.h"
#include "iDynTree/Model/Link.h"
#include "iDynTree/Model/IJoint.h"
#include "iDynTree/Model/FixedJoint.h"
#include "iDynTree/Model/MovableJointImpl.h"
#include "iDynTree/Model/RevoluteJoint.h"
#include "iDynTree/Model/PrismaticJoint.h"
#include "iDynTree/Model/Traversal.h"
#include "iDynTree/Model/SolidShapes.h"
#include "iDynTree/Model/Model.h"
#include "iDynTree/Model/JointState.h"
#include "iDynTree/Model/FreeFloatingMatrices.h"
#include "iDynTree/Model/FreeFloatingState.h"
#include "iDynTree/Model/ContactWrench.h"
#include "iDynTree/Model/ModelTestUtils.h"
#include "iDynTree/Model/ModelTransformers.h"
#include "iDynTree/Model/SubModel.h"
#include "iDynTree/Indices.h"
#include "iDynTree/LinkState.h"
#include "iDynTree/Link.h"
#include "iDynTree/IJoint.h"
#include "iDynTree/FixedJoint.h"
#include "iDynTree/MovableJointImpl.h"
#include "iDynTree/RevoluteJoint.h"
#include "iDynTree/PrismaticJoint.h"
#include "iDynTree/Traversal.h"
#include "iDynTree/SolidShapes.h"
#include "iDynTree/Model.h"
#include "iDynTree/JointState.h"
#include "iDynTree/FreeFloatingMatrices.h"
#include "iDynTree/FreeFloatingState.h"
#include "iDynTree/ContactWrench.h"
#include "iDynTree/ModelTestUtils.h"
#include "iDynTree/ModelTransformers.h"
#include "iDynTree/SubModel.h"

// Kinematics & Dynamics related functions
#include "iDynTree/Model/ForwardKinematics.h"
#include "iDynTree/Model/Dynamics.h"
#include "iDynTree/Model/DenavitHartenberg.h"
#include "iDynTree/ForwardKinematics.h"
#include "iDynTree/Dynamics.h"
#include "iDynTree/DenavitHartenberg.h"

// Sensors related data structures
#include "iDynTree/Sensors/Sensors.h"
#include "iDynTree/Sensors/SixAxisForceTorqueSensor.h"
#include "iDynTree/Sensors/AccelerometerSensor.h"
#include "iDynTree/Sensors/GyroscopeSensor.h"
#include "iDynTree/Sensors/ThreeAxisAngularAccelerometerSensor.h"
#include "iDynTree/Sensors/ThreeAxisForceTorqueContactSensor.h"
#include "iDynTree/Sensors/PredictSensorsMeasurements.h"
#include "iDynTree/Sensors.h"
#include "iDynTree/SixAxisForceTorqueSensor.h"
#include "iDynTree/AccelerometerSensor.h"
#include "iDynTree/GyroscopeSensor.h"
#include "iDynTree/ThreeAxisAngularAccelerometerSensor.h"
#include "iDynTree/ThreeAxisForceTorqueContactSensor.h"
#include "iDynTree/PredictSensorsMeasurements.h"

// Model loading from external formats
#include "iDynTree/ModelIO/URDFDofsImport.h"
#include "iDynTree/ModelIO/ModelLoader.h"
#include "iDynTree/ModelIO/ModelExporter.h"
#include "iDynTree/ModelIO/ModelCalibrationHelper.h"
#include "iDynTree/URDFDofsImport.h"
#include "iDynTree/ModelLoader.h"
#include "iDynTree/ModelExporter.h"
#include "iDynTree/ModelCalibrationHelper.h"


// Estimation related classes
#include "iDynTree/Estimation/ExternalWrenchesEstimation.h"
#include "iDynTree/Estimation/ExtWrenchesAndJointTorquesEstimator.h"
#include "iDynTree/Estimation/SimpleLeggedOdometry.h"
#include "iDynTree/Estimation/BerdyHelper.h"
#include "iDynTree/Estimation/BerdySparseMAPSolver.h"
#include "iDynTree/Estimation/AttitudeEstimator.h"
#include "iDynTree/Estimation/AttitudeMahonyFilter.h"
#include "iDynTree/Estimation/ExtendedKalmanFilter.h"
#include "iDynTree/Estimation/AttitudeQuaternionEKF.h"
#include "iDynTree/ExternalWrenchesEstimation.h"
#include "iDynTree/ExtWrenchesAndJointTorquesEstimator.h"
#include "iDynTree/SimpleLeggedOdometry.h"
#include "iDynTree/BerdyHelper.h"
#include "iDynTree/BerdySparseMAPSolver.h"
#include "iDynTree/AttitudeEstimator.h"
#include "iDynTree/AttitudeMahonyFilter.h"
#include "iDynTree/ExtendedKalmanFilter.h"
#include "iDynTree/AttitudeQuaternionEKF.h"

// SolidShapes related classes
#include "iDynTree/InertialParametersSolidShapesHelpers.h"
Expand All @@ -149,19 +149,19 @@ namespace std {
}

//Utils
%include "iDynTree/Core/Utils.h"
%include "iDynTree/Utils.h"

/* Note : always include headers following the inheritance order */
// Basic math classes
%include "iDynTree/Core/MatrixDynSize.h"
%include "iDynTree/Core/MatrixFixSize.h"
%include "iDynTree/Core/SparseMatrix.h"
%include "iDynTree/MatrixDynSize.h"
%include "iDynTree/MatrixFixSize.h"
%include "iDynTree/SparseMatrix.h"
%template(SparseMatrixRowMajor) iDynTree::SparseMatrix<iDynTree::RowMajor>;
%template(SparseMatrixColMajor) iDynTree::SparseMatrix<iDynTree::ColumnMajor>;


%include "iDynTree/Core/VectorDynSize.h"
%include "iDynTree/Core/VectorFixSize.h"
%include "iDynTree/VectorDynSize.h"
%include "iDynTree/VectorFixSize.h"

#ifdef SWIGMATLAB
%include "./matlab/matlab_matvec.i"
Expand All @@ -186,12 +186,12 @@ namespace std {
%template(Vector16) iDynTree::VectorFixSize<16>;

// Basic Vectors: Point Vectors and Spatial Vectors
%include "iDynTree/Core/PositionRaw.h"
%include "iDynTree/Core/Position.h"
%include "iDynTree/PositionRaw.h"
%include "iDynTree/Position.h"

%include "iDynTree/Core/GeomVector3.h"
%include "iDynTree/GeomVector3.h"

%include "iDynTree/Core/SpatialVector.h"
%include "iDynTree/SpatialVector.h"

%template() iDynTree::DualSpace<iDynTree::SpatialMotionVector>;
%template() iDynTree::DualSpace<iDynTree::SpatialForceVector>;
Expand All @@ -207,41 +207,41 @@ namespace std {
%template(SpatialMotionVectorBase) iDynTree::SpatialVector<iDynTree::SpatialMotionVector>;
%template(SpatialForceVectorBase) iDynTree::SpatialVector<iDynTree::SpatialForceVector>;

%include "iDynTree/Core/SpatialMotionVector.h"
%include "iDynTree/Core/SpatialForceVector.h"
%include "iDynTree/Core/Twist.h"
%include "iDynTree/Core/Wrench.h"
%include "iDynTree/Core/SpatialMomentum.h"
%include "iDynTree/Core/SpatialAcc.h"
%include "iDynTree/Core/ClassicalAcc.h"
%include "iDynTree/Core/Direction.h"
%include "iDynTree/Core/Axis.h"
%include "iDynTree/SpatialMotionVector.h"
%include "iDynTree/SpatialForceVector.h"
%include "iDynTree/Twist.h"
%include "iDynTree/Wrench.h"
%include "iDynTree/SpatialMomentum.h"
%include "iDynTree/SpatialAcc.h"
%include "iDynTree/ClassicalAcc.h"
%include "iDynTree/Direction.h"
%include "iDynTree/Axis.h"

// Inertias
%include "iDynTree/Core/RotationalInertiaRaw.h"
%include "iDynTree/Core/SpatialInertiaRaw.h"
%include "iDynTree/Core/SpatialInertia.h"
%include "iDynTree/Core/ArticulatedBodyInertia.h"
%include "iDynTree/Core/InertiaNonLinearParametrization.h"
%include "iDynTree/RotationalInertiaRaw.h"
%include "iDynTree/SpatialInertiaRaw.h"
%include "iDynTree/SpatialInertia.h"
%include "iDynTree/ArticulatedBodyInertia.h"
%include "iDynTree/InertiaNonLinearParametrization.h"

// Transformations: Rotation and Transform
%include "iDynTree/Core/RotationRaw.h"
%include "iDynTree/Core/Rotation.h"
%include "iDynTree/Core/Transform.h"
%include "iDynTree/Core/TransformDerivative.h"
%include "iDynTree/Core/Span.h"
%include "iDynTree/Core/MatrixView.h"
%include "iDynTree/RotationRaw.h"
%include "iDynTree/Rotation.h"
%include "iDynTree/Transform.h"
%include "iDynTree/TransformDerivative.h"
%include "iDynTree/Span.h"
%include "iDynTree/MatrixView.h"

%template(DynamicSpan) iDynTree::Span<double, iDynTree::dynamic_extent>;
%template(DynamicMatrixView) iDynTree::MatrixView<double>;

// Model related data structures
%include "iDynTree/Model/Indices.h"
%include "iDynTree/Model/LinkState.h"
%include "iDynTree/Model/Link.h"
%include "iDynTree/Model/IJoint.h"
%include "iDynTree/Model/FixedJoint.h"
%include "iDynTree/Model/MovableJointImpl.h"
%include "iDynTree/Indices.h"
%include "iDynTree/LinkState.h"
%include "iDynTree/Link.h"
%include "iDynTree/IJoint.h"
%include "iDynTree/FixedJoint.h"
%include "iDynTree/MovableJointImpl.h"

%template(MovableJointImpl1) iDynTree::MovableJointImpl<1,1>;
%template(MovableJointImpl2) iDynTree::MovableJointImpl<2,2>;
Expand All @@ -250,18 +250,18 @@ namespace std {
%template(MovableJointImpl5) iDynTree::MovableJointImpl<5,5>;
%template(MovableJointImpl6) iDynTree::MovableJointImpl<6,6>;

%include "iDynTree/Model/RevoluteJoint.h"
%include "iDynTree/Model/PrismaticJoint.h"
%include "iDynTree/Model/Traversal.h"
%include "iDynTree/Model/SolidShapes.h"
%include "iDynTree/Model/Model.h"
%include "iDynTree/Model/JointState.h"
%include "iDynTree/Model/FreeFloatingMatrices.h"
%include "iDynTree/Model/FreeFloatingState.h"
%include "iDynTree/Model/ContactWrench.h"
%include "iDynTree/Model/ModelTestUtils.h"
%include "iDynTree/Model/ModelTransformers.h"
%include "iDynTree/Model/SubModel.h"
%include "iDynTree/RevoluteJoint.h"
%include "iDynTree/PrismaticJoint.h"
%include "iDynTree/Traversal.h"
%include "iDynTree/SolidShapes.h"
%include "iDynTree/Model.h"
%include "iDynTree/JointState.h"
%include "iDynTree/FreeFloatingMatrices.h"
%include "iDynTree/FreeFloatingState.h"
%include "iDynTree/ContactWrench.h"
%include "iDynTree/ModelTestUtils.h"
%include "iDynTree/ModelTransformers.h"
%include "iDynTree/SubModel.h"

%include "joints.i"

Expand All @@ -270,37 +270,37 @@ namespace std {


// Kinematics & Dynamics related functions
%include "iDynTree/Model/ForwardKinematics.h"
%include "iDynTree/Model/Dynamics.h"
%include "iDynTree/Model/DenavitHartenberg.h"
%include "iDynTree/ForwardKinematics.h"
%include "iDynTree/Dynamics.h"
%include "iDynTree/DenavitHartenberg.h"

// Sensors related data structures
%include "iDynTree/Sensors/Sensors.h"
%include "iDynTree/Sensors/SixAxisForceTorqueSensor.h"
%include "iDynTree/Sensors/AccelerometerSensor.h"
%include "iDynTree/Sensors/GyroscopeSensor.h"
%include "iDynTree/Sensors/ThreeAxisAngularAccelerometerSensor.h"
%include "iDynTree/Sensors/ThreeAxisForceTorqueContactSensor.h"
%include "iDynTree/Sensors/PredictSensorsMeasurements.h"
%include "iDynTree/Sensors.h"
%include "iDynTree/SixAxisForceTorqueSensor.h"
%include "iDynTree/AccelerometerSensor.h"
%include "iDynTree/GyroscopeSensor.h"
%include "iDynTree/ThreeAxisAngularAccelerometerSensor.h"
%include "iDynTree/ThreeAxisForceTorqueContactSensor.h"
%include "iDynTree/PredictSensorsMeasurements.h"

%include "sensors.i"

// Model loading from external formats
%include "iDynTree/ModelIO/URDFDofsImport.h"
%include "iDynTree/ModelIO/ModelLoader.h"
%include "iDynTree/ModelIO/ModelExporter.h"
%include "iDynTree/ModelIO/ModelCalibrationHelper.h"
%include "iDynTree/URDFDofsImport.h"
%include "iDynTree/ModelLoader.h"
%include "iDynTree/ModelExporter.h"
%include "iDynTree/ModelCalibrationHelper.h"

// Estimation related classes
%include "iDynTree/Estimation/ExternalWrenchesEstimation.h"
%include "iDynTree/Estimation/ExtWrenchesAndJointTorquesEstimator.h"
%include "iDynTree/Estimation/SimpleLeggedOdometry.h"
%include "iDynTree/Estimation/BerdyHelper.h"
%include "iDynTree/Estimation/BerdySparseMAPSolver.h"
%include "iDynTree/Estimation/AttitudeEstimator.h"
%include "iDynTree/Estimation/AttitudeMahonyFilter.h"
%include "iDynTree/Estimation/ExtendedKalmanFilter.h"
%include "iDynTree/Estimation/AttitudeQuaternionEKF.h"
%include "iDynTree/ExternalWrenchesEstimation.h"
%include "iDynTree/ExtWrenchesAndJointTorquesEstimator.h"
%include "iDynTree/SimpleLeggedOdometry.h"
%include "iDynTree/BerdyHelper.h"
%include "iDynTree/BerdySparseMAPSolver.h"
%include "iDynTree/AttitudeEstimator.h"
%include "iDynTree/AttitudeMahonyFilter.h"
%include "iDynTree/ExtendedKalmanFilter.h"
%include "iDynTree/AttitudeQuaternionEKF.h"

// SolidShapes related classes
%include "iDynTree/InertialParametersSolidShapesHelpers.h"
Expand Down
Loading