hpp-pinocchio  6.0.0
Wrapping of the kinematic/dynamic chain Pinocchio for HPP.
device-data.hh
Go to the documentation of this file.
1 //
2 // Copyright (c) 2016 CNRS
3 // Author: NMansard from Florent Lamiraux
4 //
5 //
6 
7 // Redistribution and use in source and binary forms, with or without
8 // modification, are permitted provided that the following conditions are
9 // met:
10 //
11 // 1. Redistributions of source code must retain the above copyright
12 // notice, this list of conditions and the following disclaimer.
13 //
14 // 2. Redistributions in binary form must reproduce the above copyright
15 // notice, this list of conditions and the following disclaimer in the
16 // documentation and/or other materials provided with the distribution.
17 //
18 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 // HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
29 // DAMAGE.
30 
31 #ifndef HPP_PINOCCHIO_DEVICE_DATA_HH
32 #define HPP_PINOCCHIO_DEVICE_DATA_HH
33 
34 #include <hpp/pinocchio/config.hh>
35 #include <hpp/pinocchio/fwd.hh>
36 #include <hpp/util/debug.hh>
37 
38 namespace hpp {
39 namespace pinocchio {
42  JACOBIAN = 0x2,
43  VELOCITY = 0x4,
44  ACCELERATION = 0x8,
45  COM = 0xf,
46  COMPUTE_ALL = 0Xffff
47 };
48 
51 struct DeviceData {
53  DeviceData(const DeviceData& other);
54 
55  inline void invalidate() {
56  dataUpToDate_ = 0;
57  frameUpToDate_ = false;
58  geomUpToDate_ = false;
59  }
60 
63  void computeForwardKinematics(const ModelPtr_t& m, int flag);
66 
67  // Pinocchio objects
70 
76  DeviceWkPtr_t devicePtr_;
77 
81  std::vector<JointJacobian_t> jointJacobians_;
82 }; // struct DeviceData
83 } // namespace pinocchio
84 } // namespace hpp
85 
86 #endif // HPP_PINOCCHIO_DEVICE_DATA_HH
Computation_t
Definition: device-data.hh:40
@ COMPUTE_ALL
Definition: device-data.hh:46
@ JACOBIAN
Definition: device-data.hh:42
@ JOINT_POSITION
Definition: device-data.hh:41
@ ACCELERATION
Definition: device-data.hh:44
@ VELOCITY
Definition: device-data.hh:43
@ COM
Definition: device-data.hh:45
shared_ptr< GeomModel > GeomModelPtr_t
Definition: fwd.hh:133
Eigen::Matrix< value_type, Eigen::Dynamic, 1 > vector_t
Definition: fwd.hh:88
shared_ptr< GeomData > GeomDataPtr_t
Definition: fwd.hh:135
vector_t Configuration_t
Definition: fwd.hh:89
shared_ptr< Model > ModelPtr_t
Definition: fwd.hh:128
shared_ptr< Data > DataPtr_t
Definition: fwd.hh:130
Utility functions.
Definition: body.hh:39
Definition: collision-object.hh:40
Definition: device-data.hh:51
Configuration_t modelConf_
Temporary variable to avoid dynamic allocation.
Definition: device-data.hh:79
void computeForwardKinematics(const ModelPtr_t &m, int flag)
void computeFramesForwardKinematics(const ModelPtr_t &m)
vector_t currentVelocity_
Definition: device-data.hh:72
GeomDataPtr_t geomData_
Definition: device-data.hh:69
DataPtr_t data_
Definition: device-data.hh:68
void updateGeometryPlacements(const ModelPtr_t &m, const GeomModelPtr_t &gm)
vector_t currentAcceleration_
Definition: device-data.hh:73
bool frameUpToDate_
Definition: device-data.hh:75
int dataUpToDate_
Definition: device-data.hh:74
std::vector< JointJacobian_t > jointJacobians_
Pool of joint jacobians.
Definition: device-data.hh:81
DeviceData(const DeviceData &other)
bool geomUpToDate_
Definition: device-data.hh:75
DeviceWkPtr_t devicePtr_
Definition: device-data.hh:76
void invalidate()
Definition: device-data.hh:55
Configuration_t currentConfiguration_
Definition: device-data.hh:71