hpp-pinocchio
9.0.2
Wrapping of the kinematic/dynamic chain Pinocchio for HPP.
Toggle main menu visibility
Loading...
Searching...
No Matches
frame.hh
Go to the documentation of this file.
1
//
2
// Copyright (c) 2017 CNRS
3
// Author: Joseph Mirabel
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_FRAME_HH
32
#define HPP_PINOCCHIO_FRAME_HH
33
34
#include <cstddef>
35
#include <hpp/pinocchio/config.hh>
36
#include <hpp/pinocchio/deprecated.hh>
37
#include <
hpp/pinocchio/fwd.hh
>
38
39
namespace
hpp
{
40
namespace
pinocchio
{
42
class
HPP_PINOCCHIO_DLLAPI
Frame
{
43
public
:
46
51
Frame
(DeviceWkPtr_t device,
FrameIndex
indexInFrameList);
52
53
~Frame
() {}
55
// -----------------------------------------------------------------------
58
60
const
std::string&
name
()
const
;
61
63
// -----------------------------------------------------------------------
66
68
Transform3s
currentTransformation
()
const
;
69
71
Transform3s
currentTransformation
(
const
DeviceData
& data)
const
;
72
77
JointJacobian_t
jacobian
()
const
{
return
jacobian
(data()); }
78
79
JointJacobian_t
jacobian
(
const
DeviceData
& data)
const
;
80
82
// -----------------------------------------------------------------------
85
87
bool
isFixed
()
const
;
88
90
JointPtr_t
joint
()
const
;
91
94
Frame
parentFrame
()
const
;
95
97
bool
isRootFrame
()
const
;
98
99
const
std::vector<FrameIndex>&
children
() {
100
setChildList();
101
return
children_;
102
}
103
105
const
Transform3s
&
positionInParentJoint
()
const
;
106
108
Transform3s
positionInParentFrame
()
const
;
109
111
void
positionInParentFrame
(
const
Transform3s
& p);
113
114
public
:
115
// -----------------------------------------------------------------------
116
118
DeviceConstPtr_t
robot
()
const
{
119
selfAssert();
120
return
devicePtr_.lock();
121
}
122
123
DevicePtr_t
robot
() {
124
selfAssert();
125
return
devicePtr_.lock();
126
}
127
129
virtual
std::ostream&
display
(std::ostream& os)
const
;
130
133
134
const
FrameIndex
&
index
()
const
{
return
frameIndex_; }
135
136
const ::pinocchio::Frame&
pinocchio
()
const
;
137
139
140
private
:
141
DeviceWkPtr_t devicePtr_;
142
FrameIndex
frameIndex_;
143
std::vector<FrameIndex> children_;
144
145
::pinocchio::Frame
&
pinocchio
();
146
148
void
setChildList();
149
Model
& model();
150
const
Model
& model()
const
;
151
DeviceData
& data()
const
;
152
154
void
selfAssert()
const
;
155
};
// class Frame
156
157
inline
std::ostream&
operator<<
(std::ostream& os,
const
Frame
& frame) {
158
return
frame.
display
(os);
159
}
160
161
}
// namespace pinocchio
162
}
// namespace hpp
163
164
#endif
// HPP_PINOCCHIO_FRAME_HH
hpp::pinocchio::Frame
Robot frame.
Definition
frame.hh:42
hpp::pinocchio::Frame::parentFrame
Frame parentFrame() const
hpp::pinocchio::Frame::isFixed
bool isFixed() const
Returns true if the frame type is pinocchio::FIXED_JOINT.
hpp::pinocchio::Frame::currentTransformation
Transform3s currentTransformation() const
Frame transformation.
hpp::pinocchio::Frame::jacobian
JointJacobian_t jacobian() const
Definition
frame.hh:77
hpp::pinocchio::Frame::pinocchio
const ::pinocchio::Frame & pinocchio() const
hpp::pinocchio::Frame::positionInParentJoint
const Transform3s & positionInParentJoint() const
Get (constant) placement of frame in parent joint.
hpp::pinocchio::Frame::robot
DevicePtr_t robot()
Access robot owning the object.
Definition
frame.hh:123
hpp::pinocchio::Frame::Frame
Frame(DeviceWkPtr_t device, FrameIndex indexInFrameList)
hpp::pinocchio::Frame::isRootFrame
bool isRootFrame() const
Returns true if this frame is the universe frame.
hpp::pinocchio::Frame::display
virtual std::ostream & display(std::ostream &os) const
Display frame.
hpp::pinocchio::Frame::jacobian
JointJacobian_t jacobian(const DeviceData &data) const
hpp::pinocchio::Frame::name
const std::string & name() const
Get name.
hpp::pinocchio::Frame::index
const FrameIndex & index() const
Definition
frame.hh:134
hpp::pinocchio::Frame::robot
DeviceConstPtr_t robot() const
Access robot owning the object.
Definition
frame.hh:118
hpp::pinocchio::Frame::positionInParentFrame
void positionInParentFrame(const Transform3s &p)
Set position of frame in parent frame.
hpp::pinocchio::Frame::children
const std::vector< FrameIndex > & children()
Definition
frame.hh:99
hpp::pinocchio::Frame::currentTransformation
Transform3s currentTransformation(const DeviceData &data) const
Frame transformation.
hpp::pinocchio::Frame::positionInParentFrame
Transform3s positionInParentFrame() const
Get (constant) placement of frame in parent frame.
hpp::pinocchio::Frame::joint
JointPtr_t joint() const
Returns the joint associated to this frame.
hpp::pinocchio::Frame::~Frame
~Frame()
Definition
frame.hh:53
fwd.hh
hpp::pinocchio
Definition
body.hh:40
hpp::pinocchio::DevicePtr_t
shared_ptr< Device > DevicePtr_t
Definition
fwd.hh:121
hpp::pinocchio::operator<<
std::ostream & operator<<(std::ostream &os, const hpp::pinocchio::Device &device)
Definition
device.hh:371
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::JointJacobian_t
Eigen::Matrix< value_type, 6, Eigen::Dynamic > JointJacobian_t
Definition
fwd.hh:104
hpp::pinocchio::Transform3s
::pinocchio::SE3 Transform3s
Definition
fwd.hh:83
hpp::pinocchio::Model
::pinocchio::ModelTpl< value_type, 0, ::pinocchio::JointCollectionDefaultTpl > Model
Definition
fwd.hh:77
hpp::pinocchio::DeviceConstPtr_t
shared_ptr< const Device > DeviceConstPtr_t
Definition
fwd.hh:122
hpp
Utility functions.
pinocchio
hpp::pinocchio::DeviceData
Definition
device-data.hh:51
include
hpp
pinocchio
frame.hh
Generated by
1.17.0