hpp-core
9.0.2
Implement basic classes for canonical path planning for kinematic chains.
Toggle main menu visibility
Loading...
Searching...
No Matches
gaussian.hh
Go to the documentation of this file.
1
//
2
// Copyright (c) 2018 CNRS
3
// Authors: Joseph Mirabel
4
//
5
6
// Redistribution and use in source and binary forms, with or without
7
// modification, are permitted provided that the following conditions are
8
// met:
9
//
10
// 1. Redistributions of source code must retain the above copyright
11
// notice, this list of conditions and the following disclaimer.
12
//
13
// 2. Redistributions in binary form must reproduce the above copyright
14
// notice, this list of conditions and the following disclaimer in the
15
// documentation and/or other materials provided with the distribution.
16
//
17
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21
// HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
28
// DAMAGE.
29
30
#ifndef HPP_CORE_CONFIGURATION_SHOOTER_GAUSSIAN_HH
31
#define HPP_CORE_CONFIGURATION_SHOOTER_GAUSSIAN_HH
32
33
#include <
hpp/core/configuration-shooter.hh
>
34
#include <
hpp/pinocchio/device.hh
>
35
#include <sstream>
36
37
namespace
hpp
{
38
namespace
core
{
39
namespace
configurationShooter
{
42
45
class
HPP_CORE_DLLAPI
Gaussian
:
public
ConfigurationShooter
{
46
public
:
47
static
GaussianPtr_t
create
(
const
DevicePtr_t
& robot) {
48
Gaussian
* ptr =
new
Gaussian
(robot);
49
GaussianPtr_t
shPtr(ptr);
50
ptr->
init
(shPtr);
51
return
shPtr;
52
}
53
54
void
center
(
ConfigurationIn_t
c) { center_ = c; }
55
const
Configuration_t
&
center
()
const
{
return
center_; }
56
65
void
sigma
(
const
value_type
& factor);
66
67
void
sigmas
(
vectorIn_t
s) {
68
assert(s.size() == robot_->numberDof());
69
sigmas_ = s;
70
}
71
const
vector_t
&
sigmas
()
const
{
return
sigmas_; }
72
73
protected
:
77
Gaussian
(
const
DevicePtr_t
& robot)
78
: robot_(robot),
79
center_(robot->currentConfiguration()),
80
sigmas_(robot->numberDof()) {
81
sigma
(1. / 4.);
82
}
83
void
init
(
const
GaussianPtr_t
& self) {
84
ConfigurationShooter::init
(self);
85
weak_ = self;
86
}
87
88
virtual
void
impl_shoot
(
Configuration_t
& q)
const
;
89
90
private
:
91
const
DevicePtr_t
& robot_;
93
Configuration_t
center_;
95
vector_t
sigmas_;
96
97
GaussianWkPtr_t weak_;
98
};
// class Gaussian
99
100
}
// namespace configurationShooter
101
}
// namespace core
102
}
// namespace hpp
103
104
#endif
// HPP_CORE_CONFIGURATION_SHOOTER_GAUSSIAN_HH
hpp::core::configurationShooter::Gaussian::center
void center(ConfigurationIn_t c)
Definition
gaussian.hh:54
hpp::core::configurationShooter::Gaussian::center
const Configuration_t & center() const
Definition
gaussian.hh:55
hpp::core::configurationShooter::Gaussian::Gaussian
Gaussian(const DevicePtr_t &robot)
Definition
gaussian.hh:77
hpp::core::configurationShooter::Gaussian::create
static GaussianPtr_t create(const DevicePtr_t &robot)
Definition
gaussian.hh:47
hpp::core::configurationShooter::Gaussian::sigma
void sigma(const value_type &factor)
hpp::core::configurationShooter::Gaussian::impl_shoot
virtual void impl_shoot(Configuration_t &q) const
hpp::core::configurationShooter::Gaussian::init
void init(const GaussianPtr_t &self)
Definition
gaussian.hh:83
hpp::core::configurationShooter::Gaussian::sigmas
void sigmas(vectorIn_t s)
Definition
gaussian.hh:67
hpp::core::configurationShooter::Gaussian::sigmas
const vector_t & sigmas() const
Definition
gaussian.hh:71
HPP_CORE_DLLAPI
#define HPP_CORE_DLLAPI
Definition
config.hh:88
configuration-shooter.hh
device.hh
hpp::core::ConfigurationShooter::ConfigurationShooter
ConfigurationShooter()
Definition
configuration-shooter.hh:65
hpp::core::ConfigurationShooter::init
void init(const ConfigurationShooterWkPtr_t &weak)
Store weak pointer to itself.
Definition
configuration-shooter.hh:67
hpp
hpp::core::configurationShooter
Definition
gaussian.hh:39
hpp::core::configurationShooter::GaussianPtr_t
shared_ptr< Gaussian > GaussianPtr_t
Definition
fwd.hh:368
hpp::core
Definition
bi-rrt-planner.hh:36
hpp::core::value_type
pinocchio::value_type value_type
Definition
fwd.hh:174
hpp::core::vectorIn_t
pinocchio::vectorIn_t vectorIn_t
Definition
fwd.hh:221
hpp::core::vector_t
pinocchio::vector_t vector_t
Definition
fwd.hh:220
hpp::core::ConfigurationIn_t
pinocchio::ConfigurationIn_t ConfigurationIn_t
Definition
fwd.hh:108
hpp::core::Configuration_t
pinocchio::Configuration_t Configuration_t
Definition
fwd.hh:107
hpp::core::DevicePtr_t
pinocchio::DevicePtr_t DevicePtr_t
Definition
fwd.hh:134
include
hpp
core
configuration-shooter
gaussian.hh
Generated by
1.17.0