Linear interpolation between two configurations. More...
#include <hpp/core/straight-path.hh>
Public Types | |
typedef Path | parent_t |
Public Member Functions | |
virtual | ~StraightPath () throw () |
Destructor. | |
virtual PathPtr_t | copy () const |
Return a shared pointer to this. | |
virtual PathPtr_t | extract (const interval_t &subInterval) const |
Extraction/Reversion of a sub-path. | |
void | initialConfig (ConfigurationIn_t initial) |
Modify initial configuration. | |
void | endConfig (ConfigurationIn_t end) |
Modify end configuration. | |
DevicePtr_t | device () const |
Return the internal robot. | |
Configuration_t | initial () const |
Get the initial configuration. | |
Configuration_t | end () const |
Get the final configuration. | |
Static Public Member Functions | |
static StraightPathPtr_t | create (const DevicePtr_t &device, ConfigurationIn_t init, ConfigurationIn_t end, value_type length) |
Create instance and return shared pointer. | |
Protected Member Functions | |
virtual std::ostream & | print (std::ostream &os) const |
Print path in a stream. | |
StraightPath (const DevicePtr_t &robot, ConfigurationIn_t init, ConfigurationIn_t end, value_type length) | |
Constructor. | |
StraightPath (const StraightPath &path) | |
Copy constructor. | |
void | init (StraightPathPtr_t self) |
virtual bool | impl_compute (ConfigurationOut_t result, value_type param) const |
Function evaluation. |
Linear interpolation between two configurations.
Degrees of freedom are interpolated depending on the type of joint they parameterize:
virtual hpp::core::StraightPath::~StraightPath | ( | ) | throw () [inline, virtual] |
Destructor.
hpp::core::StraightPath::StraightPath | ( | const DevicePtr_t & | robot, |
ConfigurationIn_t | init, | ||
ConfigurationIn_t | end, | ||
value_type | length | ||
) | [protected] |
Constructor.
hpp::core::StraightPath::StraightPath | ( | const StraightPath & | path | ) | [protected] |
Copy constructor.
virtual PathPtr_t hpp::core::StraightPath::copy | ( | ) | const [inline, virtual] |
Return a shared pointer to this.
As StaightPath are immutable, and refered to by shared pointers, they do not need to be copied.
Implements hpp::core::Path.
static StraightPathPtr_t hpp::core::StraightPath::create | ( | const DevicePtr_t & | device, |
ConfigurationIn_t | init, | ||
ConfigurationIn_t | end, | ||
value_type | length | ||
) | [inline, static] |
Create instance and return shared pointer.
device | Robot corresponding to configurations |
init,end | Start and end configurations of the path |
length | Distance between the configurations. |
References init().
Referenced by hpp::core::SteeringMethodStraight::impl_compute().
DevicePtr_t hpp::core::StraightPath::device | ( | ) | const |
Return the internal robot.
Configuration_t hpp::core::StraightPath::end | ( | ) | const [inline, virtual] |
Get the final configuration.
Implements hpp::core::Path.
void hpp::core::StraightPath::endConfig | ( | ConfigurationIn_t | end | ) | [inline] |
Modify end configuration.
end | new end configuration |
virtual PathPtr_t hpp::core::StraightPath::extract | ( | const interval_t & | subInterval | ) | const [virtual] |
Extraction/Reversion of a sub-path.
subInterval | interval of definition of the extract path If upper bound of subInterval is smaller than lower bound, result is reversed. |
Reimplemented from hpp::core::Path.
virtual bool hpp::core::StraightPath::impl_compute | ( | ConfigurationOut_t | configuration, |
value_type | t | ||
) | const [protected, virtual] |
void hpp::core::StraightPath::init | ( | StraightPathPtr_t | self | ) | [inline, protected] |
Referenced by create().
Configuration_t hpp::core::StraightPath::initial | ( | ) | const [inline, virtual] |
Get the initial configuration.
Implements hpp::core::Path.
void hpp::core::StraightPath::initialConfig | ( | ConfigurationIn_t | initial | ) | [inline] |
Modify initial configuration.
initial | new initial configuration |
virtual std::ostream& hpp::core::StraightPath::print | ( | std::ostream & | os | ) | const [inline, protected, virtual] |
Print path in a stream.
Implements hpp::core::Path.