hpp-pinocchio 6.0.0
Wrapping of the kinematic/dynamic chain Pinocchio for HPP.
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
37namespace hpp {
38namespace pinocchio {
44void saturate(const DevicePtr_t& robot, ConfigurationOut_t configuration);
45
52bool saturate(const DevicePtr_t& robot, ConfigurationOut_t configuration,
53 ArrayXb& saturation);
54
73template <bool saturateConfig, typename LieGroup>
74void integrate(const DevicePtr_t& robot, ConfigurationIn_t configuration,
75 vectorIn_t velocity, ConfigurationOut_t result);
76
77void integrate(const DevicePtr_t& robot, ConfigurationIn_t configuration,
78 vectorIn_t velocity, ConfigurationOut_t result);
79
92template <typename LieGroup>
94 ConfigurationIn_t q1, const value_type& u,
95 ConfigurationOut_t result);
96
98 ConfigurationIn_t q1, const value_type& u,
99 ConfigurationOut_t result);
100
116template <typename LieGroup>
118 ConfigurationIn_t q2, vectorOut_t result);
119
121 ConfigurationIn_t q2, vectorOut_t result);
122
133
141
148void normalize(const DevicePtr_t& robot, Configuration_t& q);
149
152inline void normalize(const DevicePtr_t& robot, ConfigurationOut_t q) {
153 Configuration_t qq = q;
154 normalize(robot, qq);
155 q = qq;
156}
157
162 const value_type& eps);
163
165inline 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
176std::ostream& display(std::ostream& os, const SE3& m);
177} // namespace pinocchio
178} // namespace hpp
179#endif // HPP_PINOCCHIO_CONFIGURATION_HH
shared_ptr< Device > DevicePtr_t
Definition fwd.hh:118
void integrate(const DevicePtr_t &robot, ConfigurationIn_t configuration, vectorIn_t velocity, ConfigurationOut_t result)
bool isNormalized(const DevicePtr_t &robot, ConfigurationIn_t q, const value_type &eps)
Eigen::Ref< vector_t > vectorOut_t
Definition fwd.hh:94
void normalize(const DevicePtr_t &robot, Configuration_t &q)
matrix_t::Index size_type
Definition fwd.hh:97
std::ostream & display(std::ostream &os, const SE3 &m)
Write a SE3 taking into account the indentation.
void interpolate(const DevicePtr_t &robot, ConfigurationIn_t q0, ConfigurationIn_t q1, const value_type &u, ConfigurationOut_t result)
std::string displayConfig(ConfigurationIn_t q, int precision=20)
Write configuration in a string.
Definition configuration.hh:165
Eigen::Ref< Configuration_t > ConfigurationOut_t
Definition fwd.hh:91
double value_type
Definition fwd.hh:51
vector_t Configuration_t
Definition fwd.hh:89
void saturate(const DevicePtr_t &robot, ConfigurationOut_t configuration)
Eigen::Array< bool, Eigen::Dynamic, 1 > ArrayXb
Definition fwd.hh:86
value_type distance(const DevicePtr_t &robot, ConfigurationIn_t q1, ConfigurationIn_t q2)
bool isApprox(const DevicePtr_t &robot, ConfigurationIn_t q1, ConfigurationIn_t q2, value_type eps)
Eigen::Ref< const vector_t > vectorIn_t
Definition fwd.hh:93
::pinocchio::SE3 SE3
Definition fwd.hh:82
void difference(const DevicePtr_t &robot, ConfigurationIn_t q1, ConfigurationIn_t q2, vectorOut_t result)
Eigen::Ref< const Configuration_t > ConfigurationIn_t
Definition fwd.hh:90
Utility functions.
Definition body.hh:39
Definition collision-object.hh:40