hpp-pinocchio
9.0.2
Wrapping of the kinematic/dynamic chain Pinocchio for HPP.
Toggle main menu visibility
Loading...
Searching...
No Matches
configuration.hh
Go to the documentation of this file.
1
//
2
// Copyright (c) 2014 CNRS
3
// Author: 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_CONFIGURATION_HH
32
#define HPP_PINOCCHIO_CONFIGURATION_HH
33
34
#include <
hpp/pinocchio/fwd.hh
>
35
#include <iomanip>
36
37
namespace
hpp
{
38
namespace
pinocchio
{
44
void
saturate
(
const
DevicePtr_t
& robot,
ConfigurationOut_t
configuration);
45
52
bool
saturate
(
const
DevicePtr_t
& robot,
ConfigurationOut_t
configuration,
53
ArrayXb
& saturation);
54
73
template
<
bool
saturateConfig,
typename
LieGroup>
74
void
integrate
(
const
DevicePtr_t
& robot,
ConfigurationIn_t
configuration,
75
vectorIn_t
velocity,
ConfigurationOut_t
result);
76
77
void
integrate
(
const
DevicePtr_t
& robot,
ConfigurationIn_t
configuration,
78
vectorIn_t
velocity,
ConfigurationOut_t
result);
79
92
template
<
typename
LieGroup>
93
void
interpolate
(
const
DevicePtr_t
& robot,
ConfigurationIn_t
q0,
94
ConfigurationIn_t
q1,
const
value_type
& u,
95
ConfigurationOut_t
result);
96
97
void
interpolate
(
const
DevicePtr_t
& robot,
ConfigurationIn_t
q0,
98
ConfigurationIn_t
q1,
const
value_type
& u,
99
ConfigurationOut_t
result);
100
116
template
<
typename
LieGroup>
117
void
difference
(
const
DevicePtr_t
& robot,
ConfigurationIn_t
q1,
118
ConfigurationIn_t
q2,
vectorOut_t
result);
119
120
void
difference
(
const
DevicePtr_t
& robot,
ConfigurationIn_t
q1,
121
ConfigurationIn_t
q2,
vectorOut_t
result);
122
131
bool
isApprox
(
const
DevicePtr_t
& robot,
ConfigurationIn_t
q1,
132
ConfigurationIn_t
q2,
value_type
eps);
133
139
value_type
distance
(
const
DevicePtr_t
& robot,
ConfigurationIn_t
q1,
140
ConfigurationIn_t
q2);
141
148
void
normalize
(
const
DevicePtr_t
& robot,
Configuration_t
& q);
149
152
inline
void
normalize
(
const
DevicePtr_t
& robot,
ConfigurationOut_t
q) {
153
Configuration_t
qq = q;
154
normalize
(robot, qq);
155
q = qq;
156
}
157
161
bool
isNormalized
(
const
DevicePtr_t
& robot,
ConfigurationIn_t
q,
162
const
value_type
& eps);
163
165
inline
std::string
displayConfig
(
ConfigurationIn_t
q,
int
precision = 20) {
166
std::ostringstream oss;
167
oss <<
"("
<< std::setprecision(precision);
168
for
(
size_type
i = 0; i < q.size(); ++i) {
169
oss << q[i] <<
","
;
170
}
171
oss <<
")"
;
172
return
oss.str();
173
}
174
176
std::ostream&
display
(std::ostream& os,
const
SE3
& m);
177
}
// namespace pinocchio
178
}
// namespace hpp
179
#endif
// HPP_PINOCCHIO_CONFIGURATION_HH
fwd.hh
hpp::pinocchio
Definition
body.hh:40
hpp::pinocchio::DevicePtr_t
shared_ptr< Device > DevicePtr_t
Definition
fwd.hh:121
hpp::pinocchio::integrate
void integrate(const DevicePtr_t &robot, ConfigurationIn_t configuration, vectorIn_t velocity, ConfigurationOut_t result)
hpp::pinocchio::isNormalized
bool isNormalized(const DevicePtr_t &robot, ConfigurationIn_t q, const value_type &eps)
hpp::pinocchio::vectorOut_t
Eigen::Ref< vector_t > vectorOut_t
Definition
fwd.hh:97
hpp::pinocchio::normalize
void normalize(const DevicePtr_t &robot, Configuration_t &q)
hpp::pinocchio::size_type
matrix_t::Index size_type
Definition
fwd.hh:100
hpp::pinocchio::display
std::ostream & display(std::ostream &os, const SE3 &m)
Write a SE3 taking into account the indentation.
hpp::pinocchio::interpolate
void interpolate(const DevicePtr_t &robot, ConfigurationIn_t q0, ConfigurationIn_t q1, const value_type &u, ConfigurationOut_t result)
hpp::pinocchio::displayConfig
std::string displayConfig(ConfigurationIn_t q, int precision=20)
Write configuration in a string.
Definition
configuration.hh:165
hpp::pinocchio::ConfigurationOut_t
Eigen::Ref< Configuration_t > ConfigurationOut_t
Definition
fwd.hh:94
hpp::pinocchio::value_type
double value_type
Definition
fwd.hh:51
hpp::pinocchio::Configuration_t
vector_t Configuration_t
Definition
fwd.hh:92
hpp::pinocchio::saturate
void saturate(const DevicePtr_t &robot, ConfigurationOut_t configuration)
hpp::pinocchio::ArrayXb
Eigen::Array< bool, Eigen::Dynamic, 1 > ArrayXb
Definition
fwd.hh:89
hpp::pinocchio::distance
value_type distance(const DevicePtr_t &robot, ConfigurationIn_t q1, ConfigurationIn_t q2)
hpp::pinocchio::isApprox
bool isApprox(const DevicePtr_t &robot, ConfigurationIn_t q1, ConfigurationIn_t q2, value_type eps)
hpp::pinocchio::vectorIn_t
Eigen::Ref< const vector_t > vectorIn_t
Definition
fwd.hh:96
hpp::pinocchio::SE3
::pinocchio::SE3 SE3
Definition
fwd.hh:84
hpp::pinocchio::difference
void difference(const DevicePtr_t &robot, ConfigurationIn_t q1, ConfigurationIn_t q2, vectorOut_t result)
hpp::pinocchio::ConfigurationIn_t
Eigen::Ref< const Configuration_t > ConfigurationIn_t
Definition
fwd.hh:93
hpp
Utility functions.
include
hpp
pinocchio
configuration.hh
Generated by
1.17.0