Skip to content

Commit

Permalink
General improvement of the documentation in ContinuousDynamicalSystem…
Browse files Browse the repository at this point in the history
… class
  • Loading branch information
GiulioRomualdi committed Mar 26, 2021
1 parent 2999360 commit 95d596b
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,37 @@ namespace ContinuousDynamicalSystem
* inherit publicly from this class in order to define your custom dynamical system.
* Just be sure to call after your class definition
* #BLF_DEFINE_CONTINUOUS_DYNAMICAL_SYSTEM_INTERAL_STRUCTURE()
* For instance
* \code{.cpp}
* namespace BipedalLocomotion
* {
* namespace ContinuousDynamicalSystem
* {
* // forward declaration
* class Foo;
* }
* }
* // Here we define the internal structure of the Foo. Notice that the number of types contained in
* // the FooStateType must be equal to the number of FooStateDerivetiveType (This is required by the integrator class)
*
* using FooStateType = Eigen::Vector2d;
* using FooStateDerivativeType = Eigen::Vector2d;
* using FooInputType = Eigen::Vector2d;
* BLF_DEFINE_CONTINUOUS_DYNAMICAL_SYSTEM_INTERAL_STRUCTURE(Foo, (FooStateType),
* (FooStateDerivativeType),
* (FooInputType))
* namespace BipedalLocomotion
* {
* namespace ContinuousDynamicalSystem
* {
* // class definition
* class Foo : public DynamicalSystem<Foo>
* {
* ...
* }
* }
* }
* \endcode
*/
template <class _Derived> class DynamicalSystem
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ class FixedBaseDynamics;
} // namespace BipedalLocomotion


// Please read it as
// BLF_DEFINE_CONTINUOUS_DYNAMICAL_SYSTEM_INTERAL_STRUCTURE(
// FixedBaseDynamics,
// (joint velocities, joint positions),
// (joint accelerations, joints velocities),
// (joint torques)
BLF_DEFINE_CONTINUOUS_DYNAMICAL_SYSTEM_INTERAL_STRUCTURE(FixedBaseDynamics,
(Eigen::VectorXd, Eigen::VectorXd),
(Eigen::VectorXd, Eigen::VectorXd),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@ class FloatingBaseDynamicsWithCompliantContacts;
}
}

// Please read it as
// BLF_DEFINE_CONTINUOUS_DYNAMICAL_SYSTEM_INTERAL_STRUCTURE(
// FloatingBaseDynamicsWithCompliantContacts
// (base velocity expressed in mixed, joint velocities, base position, base orientation, joint positions),
// (base acceleration expressed in mixed, joint acceleration, base linear velocity, rate of change of the base rotation matrix, joint velocities),
// (joint torques, list containing the compliant contact models)

BLF_DEFINE_CONTINUOUS_DYNAMICAL_SYSTEM_INTERAL_STRUCTURE(FloatingBaseDynamicsWithCompliantContacts,
(Eigen::Matrix<double, 6, 1>,
Eigen::VectorXd,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ class FloatingBaseSystemKinematics;
}
}

// Please read it as
// BLF_DEFINE_CONTINUOUS_DYNAMICAL_SYSTEM_INTERAL_STRUCTURE(
// FloatingBaseSystemKinematics,
// (base position, base orientation, joint positions),
// (base linear velocity, rate of change of base rotation matrix, joint velocities),
// (base twist expressed in mixed representation, joint velocities))
BLF_DEFINE_CONTINUOUS_DYNAMICAL_SYSTEM_INTERAL_STRUCTURE(
FloatingBaseSystemKinematics,
(Eigen::Vector3d, Eigen::Matrix3d, Eigen::VectorXd),
Expand All @@ -41,12 +47,12 @@ namespace ContinuousDynamicalSystem
* FloatingBaseSystemKinematics describes a floating base system kinematics.
* The FloatingBaseSystemKinematics inherits from a generic DynamicalSystem where:
* - DynamicalSystem::State is described by an std::tuple containing:
* - Eigen::Vector6d: position of the base w.r.t. the inertial frame
* - Eigen::Vector3d: position of the base w.r.t. the inertial frame
* - Eigen::Matrix3d: rotation matrix \f${} ^ I R _ {b}\f$. Matrix that transform a vector
* whose coordinates are expressed in the base frame in the inertial frame;
* - Eigen::VectorXd: the joint positions [in rad].
* - DynamicalSystem::StateDerivative is described by an std::tuple containing:
* - Eigen::Vector6d: base velocity w.r.t. the inertial frame;
* - Eigen::Vector3d: base linear velocity w.r.t. the inertial frame;
* - Eigen::Matrix3d: rate of change of the rotation matrix \f${} ^ I \dot{R} _ {b}\f$.
* whose coordinates are expressed in the base frame in the inertial frame;
* - Eigen::VectorXd: the joint velocities [in rad/s].
Expand Down

0 comments on commit 95d596b

Please sign in to comment.