GCC Code Coverage Report


Directory: ./
File: include/crocoddyl/multibody/data/multibody.hpp
Date: 2025-01-16 08:47:40
Exec Total Coverage
Lines: 9 9 100.0%
Branches: 2 4 50.0%

Line Branch Exec Source
1 ///////////////////////////////////////////////////////////////////////////////
2 // BSD 3-Clause License
3 //
4 // Copyright (C) 2019-2022, University of Edinburgh
5 // Copyright note valid unless otherwise stated in individual files.
6 // All rights reserved.
7 ///////////////////////////////////////////////////////////////////////////////
8
9 #ifndef CROCODDYL_CORE_DATA_MULTIBODY_HPP_
10 #define CROCODDYL_CORE_DATA_MULTIBODY_HPP_
11
12 #include <pinocchio/multibody/data.hpp>
13
14 #include "crocoddyl/core/data-collector-base.hpp"
15 #include "crocoddyl/core/data/actuation.hpp"
16 #include "crocoddyl/core/data/joint.hpp"
17 #include "crocoddyl/multibody/fwd.hpp"
18
19 namespace crocoddyl {
20
21 template <typename Scalar>
22 struct DataCollectorMultibodyTpl : virtual DataCollectorAbstractTpl<Scalar> {
23 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
24
25 98810 DataCollectorMultibodyTpl(pinocchio::DataTpl<Scalar>* const data)
26 98810 : pinocchio(data) {}
27 100422 virtual ~DataCollectorMultibodyTpl() {}
28
29 pinocchio::DataTpl<Scalar>* pinocchio;
30 };
31
32 template <typename Scalar>
33 struct DataCollectorActMultibodyTpl : DataCollectorMultibodyTpl<Scalar>,
34 DataCollectorActuationTpl<Scalar> {
35 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
36
37 20922 DataCollectorActMultibodyTpl(
38 pinocchio::DataTpl<Scalar>* const pinocchio,
39 boost::shared_ptr<ActuationDataAbstractTpl<Scalar> > actuation)
40 : DataCollectorMultibodyTpl<Scalar>(pinocchio),
41
1/2
✓ Branch 2 taken 2 times.
✗ Branch 3 not taken.
20922 DataCollectorActuationTpl<Scalar>(actuation) {}
42 21501 virtual ~DataCollectorActMultibodyTpl() {}
43 };
44
45 template <typename Scalar>
46 struct DataCollectorJointActMultibodyTpl : DataCollectorActMultibodyTpl<Scalar>,
47 DataCollectorJointTpl<Scalar> {
48 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
49
50 20333 DataCollectorJointActMultibodyTpl(
51 pinocchio::DataTpl<Scalar>* const pinocchio,
52 boost::shared_ptr<ActuationDataAbstractTpl<Scalar> > actuation,
53 boost::shared_ptr<JointDataAbstractTpl<Scalar> > joint)
54 : DataCollectorActMultibodyTpl<Scalar>(pinocchio, actuation),
55
1/2
✓ Branch 3 taken 20333 times.
✗ Branch 4 not taken.
20333 DataCollectorJointTpl<Scalar>(joint) {}
56 40654 virtual ~DataCollectorJointActMultibodyTpl() {}
57 };
58
59 } // namespace crocoddyl
60
61 #endif // CROCODDYL_CORE_DATA_MULTIBODY_HPP_
62