/// \param[in] data The data structure of the rigid body system.
/// \param[in] q The joint configuration vector (dim model.nq).
/// \param[in] computeSubtreeComs If true, the algorithm computes also the center of mass of the subtrees.
/// \param[in] updateKinematics If true, the algorithm updates first the geometry of the tree. Otherwise, it uses the current kinematics stored in data.
///
/// \return The center of mass position of the full rigid body system expressed in the world frame.
///
inlineconstSE3::Vector3&
centerOfMass(constModel&model,Data&data,
constEigen::VectorXd&q,
constboolcomputeSubtreeComs=true,
constboolupdateKinematics=true);
constboolcomputeSubtreeComs=true);
///
/// \brief Computes the center of mass position, velocity and acceleration of a given model according to a particular joint configuration, velocity and acceleration.
/// The result is accessible through data.com[0], data.vcom[0], data.acom[0] for the full body com position, velocity and acceleation.
/// And data.com[i], data.vcom[i] and data.acom[i] for the subtree supported by joint i (expressed in the joint i frame).
/// \brief Computes the center of mass position and velocity of a given model according to a particular joint configuration and velocity.
/// The result is accessible through data.com[0], data.vcom[0] for the full body com position and velocity.
/// And data.com[i] and data.vcom[i] for the subtree supported by joint i (expressed in the joint i frame).
///
/// \param[in] model The model structure of the rigid body system.
/// \param[in] data The data structure of the rigid body system.
/// \param[in] q The joint configuration vector (dim model.nq).
/// \param[in] v The joint velocity vector (dim model.nv).
/// \param[in] computeSubtreeComs If true, the algorithm computes also the center of mass of the subtrees.
/// \param[in] updateKinematics If true, the algorithm updates first the second order kinematics of the tree. Otherwise, it uses the current kinematics stored in data.
///
/// \return The center of mass position of the full rigid body system expressed in the world frame.
///
...
...
@@ -61,8 +58,7 @@ namespace se3
centerOfMass(constModel&model,Data&data,
constEigen::VectorXd&q,
constEigen::VectorXd&v,
constboolcomputeSubtreeComs=true,
constboolupdateKinematics=true);
constboolcomputeSubtreeComs=true);
///
/// \brief Computes the center of mass position, velocity and acceleration of a given model according to a particular joint configuration, velocity and acceleration.
...
...
@@ -75,7 +71,6 @@ namespace se3
/// \param[in] v The joint velocity vector (dim model.nv).
/// \param[in] a The joint acceleration vector (dim model.nv).
/// \param[in] computeSubtreeComs If true, the algorithm computes also the center of mass of the subtrees.
/// \param[in] updateKinematics If true, the algorithm updates first the second order kinematics of the tree. Otherwise, it uses the current kinematics stored in data.
///
/// \return The center of mass position of the full rigid body system expressed in the world frame.
///
...
...
@@ -84,8 +79,37 @@ namespace se3
constEigen::VectorXd&q,
constEigen::VectorXd&v,
constEigen::VectorXd&a,
constboolcomputeSubtreeComs=true,
constboolupdateKinematics=true);
constboolcomputeSubtreeComs=true);
///
/// \brief Computes the center of mass position, velocity and acceleration of a given model according to the current kinematic values contained in data and the template value parameters.
/// The result is accessible through data.com[0], data.vcom[0] and data.acom[0] for the full body com position and velocity.
/// And data.com[i] and data.vcom[i] for the subtree supported by joint i (expressed in the joint i frame).
///
/// \tparam do_position Compute the center of mass position.
/// \tparam do_velocity Compute the center of mass velocity.
/// \tparam do_acceleration Compute the center of mass acceleration.
///
/// \param[in] model The model structure of the rigid body system.
/// \param[in] data The data structure of the rigid body system.
/// \param[in] computeSubtreeComs If true, the algorithm computes also the center of mass of the subtrees.
/// \brief Computes the center of mass position, velocity and acceleration of a given model according to the current kinematic values contained in data.
/// The result is accessible through data.com[0], data.vcom[0] and data.acom[0] for the full body com position and velocity.
/// And data.com[i] and data.vcom[i] for the subtree supported by joint i (expressed in the joint i frame).
///
/// \param[in] model The model structure of the rigid body system.
/// \param[in] data The data structure of the rigid body system.
/// \param[in] computeSubtreeComs If true, the algorithm computes also the center of mass of the subtrees.