crba.hpp 3.06 KB
 Florian Valenza committed Apr 29, 2015 1 ``````// `````` jcarpent committed Apr 10, 2016 2 ``````// Copyright (c) 2015-2016 CNRS `````` Florian Valenza committed Apr 29, 2015 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 ``````// // This file is part of Pinocchio // Pinocchio is free software: you can redistribute it // and/or modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation, either version // 3 of the License, or (at your option) any later version. // // Pinocchio is distributed in the hope that it will be // useful, but WITHOUT ANY WARRANTY; without even the implied warranty // of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // General Lesser Public License for more details. You should have // received a copy of the GNU Lesser General Public License along with // Pinocchio If not, see // . `````` 18 ``````#ifndef __se3_crba_hpp__ `````` Nicolas Mansard committed Mar 30, 2015 19 20 21 ``````#define __se3_crba_hpp__ #include "pinocchio/multibody/model.hpp" `````` 22 ``````#include "pinocchio/algorithm/check.hpp" `````` Nicolas Mansard committed Mar 30, 2015 23 24 25 `````` namespace se3 { `````` jcarpent committed Jan 27, 2016 26 27 28 `````` /// /// \brief Computes the upper triangular part of the joint space inertia matrix M by /// using the Composite Rigid Body Algorithm (Chapter 6, Rigid-Body Dynamics Algorithms, R. Featherstone, 2008). `````` Valenza Florian committed Apr 08, 2016 29 `````` /// The result is accessible through data.M. `````` jcarpent committed Jan 27, 2016 30 31 32 33 34 35 36 37 38 39 40 41 42 43 `````` /// /// \note You can easly get data.M symetric by copying the stricly upper trinangular part /// in the stricly lower tringular part with /// data.M.triangularView() = data.M.transpose().triangularView(); /// /// \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). /// /// \return The joint space inertia matrix with only the upper triangular part computed. /// inline const Eigen::MatrixXd & crba(const Model & model, Data & data, `````` Nicolas Mansard committed Mar 30, 2015 44 `````` const Eigen::VectorXd & q); `````` jcarpent committed Mar 06, 2016 45 46 47 48 `````` /// /// \brief Computes the upper triangular part of the joint space inertia matrix M by /// using the Composite Rigid Body Algorithm (Chapter 6, Rigid-Body Dynamics Algorithms, R. Featherstone, 2008). `````` Valenza Florian committed Apr 08, 2016 49 `````` /// The result is accessible through data.M. `````` jcarpent committed Mar 06, 2016 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 `````` /// /// \note You can easly get data.M symetric by copying the stricly upper trinangular part /// in the stricly lower tringular part with /// data.M.triangularView() = data.M.transpose().triangularView(); /// /// \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 configuration vector (dim model.nv). /// /// \return The joint space inertia matrix with only the upper triangular part computed. /// inline const Data::Matrix6x & ccrba(const Model & model, Data & data, const Eigen::VectorXd & q, const Eigen::VectorXd & v); `````` Nicolas Mansard committed Mar 30, 2015 67 `````` `````` 68 69 `````` DEFINE_ALGO_CHECKER(CRBA); `````` Nicolas Mansard committed Mar 30, 2015 70 71 72 ``````} // namespace se3 /* --- Details -------------------------------------------------------------------- */ `````` jcarpent committed Apr 10, 2016 73 ``````#include "pinocchio/algorithm/crba.hxx" `````` Nicolas Mansard committed Mar 30, 2015 74 75 `````` #endif // ifndef __se3_crba_hpp__``````