hpp-python: src/pyhpp/manipulation/path-planner.hh Source File

hpp-python 9.0.2 python bindings for HPP, based on boost python

Loading...
Searching...
No Matches
path-planner.hh
Go to the documentation of this file.
1//
2// Copyright (c) 2025, CNRS
3// Authors: Florent Lamiraux, Paul Sardin
4//
5// Redistribution and use in source and binary forms, with or without
6// modification, are permitted provided that the following conditions
7// are met:
8
9// 1. Redistributions of source code must retain the above copyright
10// notice, this list of conditions and the following disclaimer.
11
12// 2. Redistributions in binary form must reproduce the above
13// copyright notice, this list of conditions and the following
14// disclaimer in the documentation and/or other materials provided
15// 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
20// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
21// COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
22// INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
24// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
26// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
28// OF THE POSSIBILITY OF SUCH DAMAGE.
29
30#ifndef PYHPP_MANIPULATION_PATH_PLANNER_HH
31#define PYHPP_MANIPULATION_PATH_PLANNER_HH
32
33#include <hpp/manipulation/fwd.hh>
34#include <pyhpp/core/path-planner.hh>
35
36namespace pyhpp {
37namespace manipulation {
38
39 typedef boost::python::tuple tuple;
40typedef hpp::core::ConfigurationIn_t ConfigurationIn_t;
41 typedef hpp::core::PathOptimizerPtr_t PathOptimizerPtr_t;
42 typedef hpp::core::PathProjectorPtr_t PathProjectorPtr_t;
43 typedef hpp::core::PathPtr_t PathPtr_t;
44 typedef hpp::core::PathVectorPtr_t PathVectorPtr_t;
45 typedef hpp::core::RoadmapPtr_t RoadmapPtr_t;
46 typedef hpp::manipulation::matrixIn_t matrixIn_t;
47// typedef hpp::manipulation::pathPlanner::IkSolverInitializationPtr_t
48// IkSolverInitializationPtr_t;
49
50 struct TransitionPlanner : public pyhpp::core::PathPlanner {
51 // Dynamic cast pointer into TransitionPlanner
52 hpp::manipulation::pathPlanner::TransitionPlannerPtr_t trObj() const;
53 TransitionPlanner(const pyhpp::core::Problem& problem);
54 pyhpp::core::PathPlanner innerPlanner() const;
55 void innerPlanner(const pyhpp::core::PathPlanner& planner);
56 pyhpp::core::Problem innerProblem() const;
57 PathVectorPtr_t planPath(ConfigurationIn_t qInit, matrixIn_t qGoals,
58 bool resetRoadmap);
59 PathVectorPtr_t computePath(ConfigurationIn_t qInit, matrixIn_t qGoals,
60 bool resetRoadmap);
61 tuple directPath(ConfigurationIn_t q1, ConfigurationIn_t q2, bool validate);
62 tuple validateConfiguration(ConfigurationIn_t q, std::size_t id) const;
63 PathVectorPtr_t optimizePath(const PathPtr_t& path);
64 PathVectorPtr_t timeParameterization(const PathVectorPtr_t& path);
65 void setEdge(const PyWEdge& transition);
66 void setTransition(const PyWEdge& transition);
67 void setReedsAndSheppSteeringMethod(double turningRadius);
68 void pathProjector(const PathProjectorPtr_t pathProjector);
69 void clearPathOptimizers();
70 void addPathOptimizer(const PathOptimizerPtr_t& pathOptimizer);
71};
72
73 struct EndEffectorTrajectory : public pyhpp::core::PathPlanner {
74 EndEffectorTrajectory(const pyhpp::core::Problem& problem);
75 EndEffectorTrajectory(const pyhpp::core::Problem& problem,
76 const RoadmapPtr_t& roadmap);
77 hpp::manipulation::pathPlanner::EndEffectorTrajectoryPtr_t eetObj() const;
78 int nRandomConfig() const;
79 void nRandomConfig(int n);
80 int nDiscreteSteps() const;
81 void nDiscreteSteps(int n);
82 void checkFeasibilityOnly(bool enable);
83 bool checkFeasibilityOnly() const;
84 // void ikSolverInitialization(IkSolverInitializationPtr_t solver);
85};
86
87void exposePathPlanners();
88
89} // namespace manipulation
90} // namespace pyhpp
91#endif // PYHPP_MANIPULATION_PATH_PLANNER_HH
hpp::core::PathPlanner
hpp::core::PathPlanner::problem
ProblemConstPtr_t problem() const
Definition path-planner.cc:119
hpp::core::PathPlanner::computePath
PathVectorPtr_t computePath() const
Definition path-planner.cc:151
hpp::core::PathPlanner::roadmap
virtual const RoadmapPtr_t & roadmap() const
Definition path-planner.cc:117
hpp::core::Problem
path-planner.hh
hpp::core::PathVectorPtr_t
shared_ptr< PathVector > PathVectorPtr_t
hpp::core::PathOptimizerPtr_t
shared_ptr< PathOptimizer > PathOptimizerPtr_t
hpp::core::PathProjectorPtr_t
shared_ptr< PathProjector > PathProjectorPtr_t
hpp::core::RoadmapPtr_t
shared_ptr< Roadmap > RoadmapPtr_t
hpp::core::ConfigurationIn_t
pinocchio::ConfigurationIn_t ConfigurationIn_t
hpp::core::matrixIn_t
constraints::matrixIn_t matrixIn_t
hpp::core::PathPtr_t
shared_ptr< Path > PathPtr_t
hpp::manipulation::pathPlanner::EndEffectorTrajectoryPtr_t
shared_ptr< EndEffectorTrajectory > EndEffectorTrajectoryPtr_t
hpp::manipulation::pathPlanner::TransitionPlannerPtr_t
shared_ptr< TransitionPlanner > TransitionPlannerPtr_t
hpp::manipulation::matrixIn_t
core::matrixIn_t matrixIn_t
pyhpp::manipulation::exposePathPlanners
void exposePathPlanners()
Definition path-planner.cc:319
pyhpp::manipulation::tuple
boost::python::tuple tuple
Definition path-planner.hh:39
pyhpp
Definition fwd.hh:35
pyhpp::manipulation::EndEffectorTrajectory
Definition path-planner.hh:73
pyhpp::manipulation::EndEffectorTrajectory::nDiscreteSteps
int nDiscreteSteps() const
Definition path-planner.cc:297
pyhpp::manipulation::EndEffectorTrajectory::eetObj
hpp::manipulation::pathPlanner::EndEffectorTrajectoryPtr_t eetObj() const
Definition path-planner.cc:284
pyhpp::manipulation::EndEffectorTrajectory::nRandomConfig
int nRandomConfig() const
Definition path-planner.cc:291
pyhpp::manipulation::EndEffectorTrajectory::EndEffectorTrajectory
EndEffectorTrajectory(const pyhpp::core::Problem &problem)
Definition path-planner.cc:263
pyhpp::manipulation::EndEffectorTrajectory::checkFeasibilityOnly
bool checkFeasibilityOnly() const
Definition path-planner.cc:309
pyhpp::manipulation::PyWEdge
Python wrapper for Edge.
Definition graph.hh:69
pyhpp::manipulation::TransitionPlanner
Definition path-planner.hh:50
pyhpp::manipulation::TransitionPlanner::setReedsAndSheppSteeringMethod
void setReedsAndSheppSteeringMethod(double turningRadius)
Definition path-planner.cc:245
pyhpp::manipulation::TransitionPlanner::timeParameterization
PathVectorPtr_t timeParameterization(const PathVectorPtr_t &path)
Definition path-planner.cc:227
pyhpp::manipulation::TransitionPlanner::pathProjector
void pathProjector(const PathProjectorPtr_t pathProjector)
Definition path-planner.cc:249
pyhpp::manipulation::TransitionPlanner::directPath
tuple directPath(ConfigurationIn_t q1, ConfigurationIn_t q2, bool validate)
Definition path-planner.cc:196
pyhpp::manipulation::TransitionPlanner::planPath
PathVectorPtr_t planPath(ConfigurationIn_t qInit, matrixIn_t qGoals, bool resetRoadmap)
Definition path-planner.cc:116
pyhpp::manipulation::TransitionPlanner::trObj
hpp::manipulation::pathPlanner::TransitionPlannerPtr_t trObj() const
Definition path-planner.cc:95
pyhpp::manipulation::TransitionPlanner::addPathOptimizer
void addPathOptimizer(const PathOptimizerPtr_t &pathOptimizer)
Definition path-planner.cc:257
pyhpp::manipulation::TransitionPlanner::setEdge
void setEdge(const PyWEdge &transition)
Definition path-planner.cc:233
pyhpp::manipulation::TransitionPlanner::clearPathOptimizers
void clearPathOptimizers()
Definition path-planner.cc:253
pyhpp::manipulation::TransitionPlanner::setTransition
void setTransition(const PyWEdge &transition)
Definition path-planner.cc:241
pyhpp::manipulation::TransitionPlanner::validateConfiguration
tuple validateConfiguration(ConfigurationIn_t q, std::size_t id) const
Definition path-planner.cc:216
pyhpp::manipulation::TransitionPlanner::optimizePath
PathVectorPtr_t optimizePath(const PathPtr_t &path)
Definition path-planner.cc:223
pyhpp::manipulation::TransitionPlanner::innerProblem
pyhpp::core::Problem innerProblem() const
Definition path-planner.cc:112
pyhpp::manipulation::TransitionPlanner::innerPlanner
pyhpp::core::PathPlanner innerPlanner() const
Definition path-planner.cc:102
pyhpp::manipulation::TransitionPlanner::TransitionPlanner
TransitionPlanner(const pyhpp::core::Problem &problem)
Definition path-planner.cc:88