hpp-pinocchio
9.0.2
Wrapping of the kinematic/dynamic chain Pinocchio for HPP.
Toggle main menu visibility
Loading...
Searching...
No Matches
body.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_BODY_HH
32
#define HPP_PINOCCHIO_BODY_HH
33
34
#include <
hpp/pinocchio/config.hh
>
35
#include <
hpp/pinocchio/fwd.hh
>
36
#include <
hpp/util/pointer.hh
>
37
#include <pinocchio/multibody/fwd.hpp>
38
39
namespace
hpp
{
40
namespace
pinocchio
{
41
51
class
HPP_PINOCCHIO_DLLAPI
Body
{
52
public
:
56
Body
(DeviceWkPtr_t device,
JointIndex
joint
);
57
58
virtual
~Body
() {}
60
63
65
const
std::string&
name
()
const
;
67
69
JointPtr_t
joint
()
const
;
70
73
75
size_type
nbInnerObjects
()
const
;
76
78
CollisionObjectPtr_t
innerObjectAt
(
const
size_type
& i)
const
;
79
84
value_type
radius
()
const
;
85
87
size_type
nbOuterObjects
()
const
;
88
90
CollisionObjectPtr_t
outerObjectAt
(
const
size_type
& i)
const
;
92
96
const
vector3_t
&
localCenterOfMass
()
const
;
98
matrix3_t
inertiaMatrix
()
const
;
100
value_type
mass
()
const
;
101
103
private
:
105
void
selfAssert()
const
;
108
void
searchFrameIndex()
const
;
109
110
const
Model
& model()
const
;
111
Model
& model();
112
const ::pinocchio::Frame& frame()
const
;
113
::pinocchio::Frame
& frame();
114
115
DeviceWkPtr_t devicePtr;
116
JointIndex
jointIndex;
117
mutable
FrameIndex
118
frameIndex;
// In pinocchio, bodies are stored as frames of type BODY.
119
mutable
bool
frameIndexSet;
120
};
// class Body
121
}
// namespace pinocchio
122
}
// namespace hpp
123
#endif
// HPP_PINOCCHIO_BODY_HH
hpp::pinocchio::Body::Body
Body(DeviceWkPtr_t device, JointIndex joint)
hpp::pinocchio::Body::outerObjectAt
CollisionObjectPtr_t outerObjectAt(const size_type &i) const
Access to an outer object.
hpp::pinocchio::Body::inertiaMatrix
matrix3_t inertiaMatrix() const
Get Intertia matrix expressed in joint local reference frame.
hpp::pinocchio::Body::~Body
virtual ~Body()
Definition
body.hh:58
hpp::pinocchio::Body::innerObjectAt
CollisionObjectPtr_t innerObjectAt(const size_type &i) const
Access to an inner object.
hpp::pinocchio::Body::mass
value_type mass() const
Get mass.
hpp::pinocchio::Body::radius
value_type radius() const
hpp::pinocchio::Body::nbInnerObjects
size_type nbInnerObjects() const
Number of inner objects.
hpp::pinocchio::Body::name
const std::string & name() const
Get name.
hpp::pinocchio::Body::joint
JointPtr_t joint() const
Get joint holding the body.
hpp::pinocchio::Body::nbOuterObjects
size_type nbOuterObjects() const
Number of outer objects.
hpp::pinocchio::Body::localCenterOfMass
const vector3_t & localCenterOfMass() const
hpp::pinocchio::Frame
Robot frame.
Definition
frame.hh:42
config.hh
HPP_PINOCCHIO_DLLAPI
#define HPP_PINOCCHIO_DLLAPI
Definition
config.hh:88
fwd.hh
hpp::pinocchio::JointPtr_t
shared_ptr< Joint > JointPtr_t
Definition
fwd.hh:126
hpp::pinocchio::FrameIndex
::pinocchio::FrameIndex FrameIndex
Definition
fwd.hh:73
hpp::pinocchio::vector3_t
Eigen::Matrix< value_type, 3, 1 > vector3_t
Definition
fwd.hh:102
hpp::pinocchio::size_type
matrix_t::Index size_type
Definition
fwd.hh:100
hpp::pinocchio::value_type
double value_type
Definition
fwd.hh:51
hpp::pinocchio::JointIndex
::pinocchio::JointIndex JointIndex
Definition
fwd.hh:72
hpp::pinocchio::matrix3_t
Eigen::Matrix< value_type, 3, 3 > matrix3_t
Definition
fwd.hh:101
hpp::pinocchio::Model
::pinocchio::ModelTpl< value_type, 0, ::pinocchio::JointCollectionDefaultTpl > Model
Definition
fwd.hh:77
hpp::pinocchio::CollisionObjectPtr_t
shared_ptr< CollisionObject > CollisionObjectPtr_t
Definition
fwd.hh:119
hpp
Utility functions.
pinocchio
Definition
collision-object.hh:40
pointer.hh
include
hpp
pinocchio
body.hh
Generated by
1.17.0