Directory: | ./ |
---|---|
File: | include/crocoddyl/multibody/data/contacts.hpp |
Date: | 2025-01-16 08:47:40 |
Exec | Total | Coverage | |
---|---|---|---|
Lines: | 12 | 12 | 100.0% |
Branches: | 4 | 8 | 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_CONTACTS_HPP_ | ||
10 | #define CROCODDYL_CORE_DATA_CONTACTS_HPP_ | ||
11 | |||
12 | #include <boost/shared_ptr.hpp> | ||
13 | |||
14 | #include "crocoddyl/multibody/contacts/multiple-contacts.hpp" | ||
15 | #include "crocoddyl/multibody/data/multibody.hpp" | ||
16 | #include "crocoddyl/multibody/fwd.hpp" | ||
17 | |||
18 | namespace crocoddyl { | ||
19 | |||
20 | template <typename Scalar> | ||
21 | struct DataCollectorContactTpl : virtual DataCollectorAbstractTpl<Scalar> { | ||
22 | EIGEN_MAKE_ALIGNED_OPERATOR_NEW | ||
23 | |||
24 | 70994 | DataCollectorContactTpl<Scalar>( | |
25 | boost::shared_ptr<ContactDataMultipleTpl<Scalar> > contacts) | ||
26 | 70994 | : DataCollectorAbstractTpl<Scalar>(), contacts(contacts) {} | |
27 | 71005 | virtual ~DataCollectorContactTpl() {} | |
28 | |||
29 | boost::shared_ptr<ContactDataMultipleTpl<Scalar> > contacts; | ||
30 | }; | ||
31 | |||
32 | template <typename Scalar> | ||
33 | struct DataCollectorMultibodyInContactTpl : DataCollectorMultibodyTpl<Scalar>, | ||
34 | DataCollectorContactTpl<Scalar> { | ||
35 | EIGEN_MAKE_ALIGNED_OPERATOR_NEW | ||
36 | |||
37 | 70993 | DataCollectorMultibodyInContactTpl( | |
38 | pinocchio::DataTpl<Scalar>* const pinocchio, | ||
39 | boost::shared_ptr<ContactDataMultipleTpl<Scalar> > contacts) | ||
40 | : DataCollectorMultibodyTpl<Scalar>(pinocchio), | ||
41 |
1/3✗ Branch 3 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
|
70993 | DataCollectorContactTpl<Scalar>(contacts) {} |
42 | 71002 | virtual ~DataCollectorMultibodyInContactTpl() {} | |
43 | }; | ||
44 | |||
45 | template <typename Scalar> | ||
46 | struct DataCollectorActMultibodyInContactTpl | ||
47 | : DataCollectorMultibodyInContactTpl<Scalar>, | ||
48 | DataCollectorActuationTpl<Scalar> { | ||
49 | EIGEN_MAKE_ALIGNED_OPERATOR_NEW | ||
50 | |||
51 | 70997 | DataCollectorActMultibodyInContactTpl( | |
52 | pinocchio::DataTpl<Scalar>* const pinocchio, | ||
53 | boost::shared_ptr<ActuationDataAbstractTpl<Scalar> > actuation, | ||
54 | boost::shared_ptr<ContactDataMultipleTpl<Scalar> > contacts) | ||
55 | : DataCollectorMultibodyInContactTpl<Scalar>(pinocchio, contacts), | ||
56 |
2/3✓ Branch 2 taken 70985 times.
✓ Branch 3 taken 6 times.
✗ Branch 4 not taken.
|
70997 | DataCollectorActuationTpl<Scalar>(actuation) {} |
57 | 70999 | virtual ~DataCollectorActMultibodyInContactTpl() {} | |
58 | }; | ||
59 | |||
60 | template <typename Scalar> | ||
61 | struct DataCollectorJointActMultibodyInContactTpl | ||
62 | : DataCollectorActMultibodyInContactTpl<Scalar>, | ||
63 | DataCollectorJointTpl<Scalar> { | ||
64 | EIGEN_MAKE_ALIGNED_OPERATOR_NEW | ||
65 | |||
66 | 70985 | DataCollectorJointActMultibodyInContactTpl( | |
67 | pinocchio::DataTpl<Scalar>* const pinocchio, | ||
68 | boost::shared_ptr<ActuationDataAbstractTpl<Scalar> > actuation, | ||
69 | boost::shared_ptr<JointDataAbstractTpl<Scalar> > joint, | ||
70 | boost::shared_ptr<ContactDataMultipleTpl<Scalar> > contacts) | ||
71 | : DataCollectorActMultibodyInContactTpl<Scalar>(pinocchio, actuation, | ||
72 | contacts), | ||
73 |
1/2✓ Branch 4 taken 70985 times.
✗ Branch 5 not taken.
|
70985 | DataCollectorJointTpl<Scalar>(joint) {} |
74 | 141982 | virtual ~DataCollectorJointActMultibodyInContactTpl() {} | |
75 | }; | ||
76 | |||
77 | } // namespace crocoddyl | ||
78 | |||
79 | #endif // CROCODDYL_CORE_DATA_MULTIBODY_IN_CONTACT_HPP_ | ||
80 |