pyhpp.core
Functions
| def | Description |
|---|---|
def DiscretizedCollision(robot: object, stepSize: float) -> Discretized | Create a discretized collision-checking path validation. |
def DiscretizedCollisionAndJointBound(robot: object, stepSize: float) -> Discretized | Create a discretized path validation checking both collision and joint bounds. |
def DiscretizedJointBound(robot: object, stepSize: float) -> Discretized | Create a discretized joint-bound path validation. |
def NoneProjector(distance: Distance, steeringMethod: SteeringMethod, step: float) -> PathProjector | Return a null path projector (no projection). |
def create(arg1: float, arg2: pyhpp.core.path.bindings.SplineB3) -> PathWrap | |
def getVerbosityLevel() -> int | |
def setVerbosityLevel(arg1: pyhpp.core.path.bindings.SplineB3) -> None |
BiRRTPlanner
Inherits: PathPlanner
| def | Description |
|---|---|
def init(self, arg2: Problem) -> None |
BiRrtStar
Inherits: PathPlanner
| def | Description |
|---|---|
def init(self, arg2: Problem) -> None |
CollisionPathValidationReport
Inherits: CollisionValidationReport
hpp::core::CollisionPathValidationReport
| def | Description |
|---|---|
def str(self) -> str |
CollisionValidationReport
Inherits: ValidationReport
hpp::core::CollisionValidationReport
| def | Description |
|---|---|
| |
| |
|
ConfigProjector
Inherits: Constraint
Implicit non-linear constraint
This class defines a numerical constraints on a robot configuration of the form:
Functions are differentiable functions. Vectors are called right hand side.
The constraints are solved numerically by a Newton Raphson like method.
Numerical constraints can be added using method ConfigProjector::add. Default parameter of this method define equality constraints, but inequality constraints can also be defined by passing an object of type ComparisonType to method.
| def | Description |
|---|---|
def init(self, arg2: object, arg3: str, arg4: float, arg5: int) -> object | |
def add(self, numericalConstraint: pyhpp.constraints.bindings.Implicit, priority: int) -> bool | numericalConstraint — The numerical constraint. priority — priority of the function. The last level might be optional. |
| Set error threshold. |
| Get whether the last priority level is treated as optional. |
| Get maximal number of iterations in config projector. |
def numericalConstraints(self) -> list | Return the list of numerical constraints held by this projector. |
def residualError(self) -> float | |
def setRightHandSideFromConfig(self, arg2: numpy.ndarray) -> None | Set right-hand side of all constraints from a configuration. |
def setRightHandSideOfConstraint(self, arg2: pyhpp.constraints.bindings.Implicit, arg3: numpy.ndarray) -> None | Set right-hand side of a specific constraint from a configuration. |
def sigma(self) -> float | |
def solver(self) -> pyhpp.constraints.bindings.BySubstitution | |
| Get/set the line search type. |
ConfigValidation
Abstraction of configuration validation
Instances of this class validate configurations with respect to some criteria
| def | Description |
|---|---|
| config — the config to check for validity, validationReport — report on validation. If non valid, a validation report will be allocated and returned via this shared pointer. |
ConfigValidations
Inherits: ConfigValidation
Validate a configuration with respect to collision
| def | Description |
|---|---|
def add(self, configValidation: ConfigValidation) -> None | Add a configuration validation object. |
def clear(self) -> None | Remove all config validations. |
def numberConfigValidations(self) -> int | Return the number of config validations. |
ConfigurationShooter
Abstraction of configuration shooter
Configuration shooters are used by random sampling algorithms to generate new configurations
| def | Description |
|---|---|
def shoot(self) -> numpy.ndarray | Shoot a random configuration. |
ConnectedComponent
Connected component
Set of nodes reachable from one another.
| def | Description |
|---|---|
def eq(self, arg2: ConnectedComponent) -> bool | Return true if both objects refer to the same connected component. |
def nodes(self) -> list | Access to the nodes. |
def reachableFrom(self) -> list | |
def reachableTo(self) -> list |
Constraint
Constraint applicable to a robot configuration
Constraint::apply takes as input a configuration and changes it into a configuration satisfying the constraint.
User should define impl_compute in derived classes.
| def | Description |
|---|---|
def str(self) -> str | |
def apply(self, arg2: numpy.ndarray) -> bool | Apply constraint to q in-place. Returns true on success. |
def copy(self) -> Constraint | Return a copy of this constraint. |
| Return true if configuration q satisfies the constraint. |
def name(self) -> object | Get name of constraint. |
ConstraintSet
Inherits: Constraint
Set of constraints applicable to a robot configuration
If the set is to contain a ConfigProjector and several LockedJoint instances, the configProjector should be inserted first since following numerical projections might affect locked degrees of freedom.
| def | Description |
|---|---|
def init(self, arg2: object, arg3: str) -> object | |
def addConstraint(self, constraint: Constraint) -> None | Add a constraint to the set. |
def configProjector(self) -> ConfigProjector | Return pointer to config projector if any. |
Dichotomy
Inherits: PathValidation
Abstraction of path validation
Instances of this class compute the latest valid configuration along a path.
Method validate(ConfigurationIn_tq)
is provided to validate single configurations. It is particularly useful to test the initial and goal configurations of a path planning problem using this path validation.
| def | Description |
|---|---|
def init(self, robot: object, tolerance: float) -> object | Create a dichotomy-based continuous path validation. |
DichotomyProjector
Inherits: PathProjector
This class projects a path using constraints.
| def | Description |
|---|---|
def init(self, distance: Distance, steeringMethod: SteeringMethod, step: float) -> object | Create a dichotomy-based path projector with the given step size. |
DiffusingPlanner
Inherits: PathPlanner
| def | Description |
|---|---|
def init(self, arg2: Problem) -> None |
Discretized
Inherits: PathValidation
Abstraction of path validation
Instances of this class compute the latest valid configuration along a path.
Method validate(ConfigurationIn_tq)
is provided to validate single configurations. It is particularly useful to test the initial and goal configurations of a path planning problem using this path validation.
| def | Description |
|---|---|
def init(self, robot: object, stepSize: float) -> object | Create a discretized collision-checking path validation. |
Distance
Abstract class for distance between configurations.
| def | Description |
|---|---|
|
Dubins
Inherits: SteeringMethod
| def | Description |
|---|---|
def init(self, arg2: Problem) -> None |
GlobalProjector
Inherits: PathProjector
This class projects a path using constraints.
| def | Description |
|---|---|
def init(self, distance: Distance, steeringMethod: SteeringMethod, step: float) -> object | Create a global path projector with the given step size. |
Hermite
Inherits: SteeringMethod
| def | Description |
|---|---|
def init(self, arg2: Problem) -> None |
JointBoundValidationReport
Inherits: ValidationReport
report returned when a configuration is not within the bounds
| def | Description |
|---|---|
| |
| |
| |
| |
|
Kinodynamic
Inherits: SteeringMethod
| def | Description |
|---|---|
def init(self, arg2: Problem) -> None |
LineSearchType
Inherits: int
Node
Node of a roadmap
Stores a configuration.
| def | Description |
|---|---|
| |
def addInEdge(self, edge: object) -> None | |
def addOutEdge(self, edge: object) -> None | |
def configuration(self) -> object | |
| Return the connected component the node belongs to. |
def inEdges(self) -> object | Access to inEdges. |
def isInNeighbor(self, n: Node) -> bool | |
def isOutNeighbor(self, n: Node) -> bool | |
def outEdges(self) -> object | Access to outEdges. |
Parameter
| def | Description |
|---|---|
def init(self) -> Parameter | |
def boolValue(self) -> bool | Return the boolean value of this parameter. |
| Create a Parameter holding a boolean value. |
def floatValue(self) -> float | Return the floating-point value of this parameter. |
def intValue(self) -> int | Return the integer value of this parameter. |
def matrixValue(self) -> numpy.ndarray | Return the matrix value of this parameter. |
def stringValue(self) -> str | Return the string value of this parameter. |
def value(self) -> object | Return the parameter value as a Python object (bool, int, float, str, numpy array). |
def vectorValue(self) -> numpy.ndarray | Return the vector value of this parameter. |
PartialShortcut
Inherits: PathOptimizer
| def | Description |
|---|---|
def init(self, arg2: object) -> object |
Path
Abstraction of paths: mapping from time to configuration space
A path is defined by:
where
is given by timeRange
is the child class implementation of impl_compute
constraints.apply corresponds to calling Constraint::apply to constraints
Optionally, it is possible to time-parameterize the path with a function . By default, is the identity. The model becomes:
where is the timeParameterization, from timeRange to paramRange.
| def | Description |
|---|---|
| Evaluate path at parameter t. Returns (configuration, success). |
def str(self) -> str | |
def constraints(self) -> ConstraintSet | Return the constraint set attached to the path, or None. |
def copy(self) -> Path | Return a shared pointer to a copy of this. |
def derivative(self, arg2: float, arg3: int) -> numpy.ndarray | Compute derivative of given order at parameter t. Returns a numpy vector. |
def end(self) -> numpy.ndarray | Get the final configuration. |
| Evaluate path at parameter t. Returns (configuration, success). |
| subInterval — interval of definition of the extract path If upper bound of subInterval is smaller than lower bound, result is reversed. :param :is thrown when an end configuration of the returned path could not be computed due to projection failure. |
def initial(self) -> numpy.ndarray | Get the initial configuration. |
def length(self) -> float | Get length of definition interval. |
def outputDerivativeSize(self) -> int | Get size of velocity. |
def outputSize(self) -> int | Get size of configuration space. |
def paramRange(self) -> interval | |
def reverse(self) -> Path | |
def timeRange(self) -> interval | Get interval of definition. |
PathOptimizer
Abstraction of path optimizer
| def | Description |
|---|---|
def interrupt(self) -> None | Interrupt path optimization. |
def maxIterations(self, n: int) -> None | Set maximal number of iterations. |
def optimize(self, path: pyhpp.core.path.bindings.Vector) -> pyhpp.core.path.bindings.Vector | Optimize path. |
def problem(self) -> CppCoreProblem | Get problem. |
def timeOut(self, timeOut: float) -> None | set time out (in seconds) |
PathPlanner
Path planner
Algorithm that computes a path between an initial configuration and a set of goal configurations.
| def | Description |
|---|---|
def computePath(self) -> pyhpp.core.path.bindings.Vector | Find a path in the roadmap and transform it in trajectory. |
def finishSolve(self, path: pyhpp.core.path.bindings.Vector) -> pyhpp.core.path.bindings.Vector | Post processing of the resulting path. |
def interrupt(self) -> None | Interrupt path planning. |
| Get maximal number of iterations. |
def oneStep(self) -> None | User implementation of one step of resolution. |
def problem(self) -> CppCoreProblem | Get problem. |
def roadmap(self) -> Roadmap | Get roadmap. |
def solve(self) -> pyhpp.core.path.bindings.Vector | |
def startSolve(self) -> None | |
def stopWhenProblemIsSolved(self, enable: bool) -> None | |
| Get time out. |
def tryConnectInitAndGoals(self) -> None | Try to connect initial and goal configurations to existing roadmap. |
PathProjector
This class projects a path using constraints.
| def | Description |
|---|---|
| the — input path, the — output path. |
PathValidation
Abstraction of path validation
Instances of this class compute the latest valid configuration along a path.
Method validate(ConfigurationIn_tq)
is provided to validate single configurations. It is particularly useful to test the initial and goal configurations of a path planning problem using this path validation.
| def | Description |
|---|---|
| :param :the path to check for validity, reverse — if true check from the end, the — extracted valid part of the path, pointer to path if path is valid. report — information about the validation process. A report is allocated if the path is not valid. |
def validateConfiguration(self, arg2: numpy.ndarray) -> tuple | Validate a configuration; returns (valid, report). |
PathValidationReport
Inherits: ValidationReport
hpp::core::PathValidationReport
| def | Description |
|---|---|
| |
|
PathWrap
Inherits: Path
| def | Description |
|---|---|
def init(self, arg2: interval, arg3: int, arg4: int) -> None | |
| |
| |
| |
| |
| |
def initPtr(self, arg2: PathWrap) -> None | |
| |
|
PlanAndOptimize
Inherits: PathPlanner
| def | Description |
|---|---|
def init(self, arg2: PathPlanner) -> None |
Problem
Defines a path planning problem for one robot. A path planning problem is defined by
a robot: instance of class hpp::pinocchio::Device,
a set of obstacles: a list of hpp::pinocchio::CollisionObject,
initial and goal configurations,
a SteeringMethod to handle the robot dynamics, Additional objects are stored in this object:
a method to validate paths,
a set of methods to validate configurations. Default methods are collision checking and joint bound checking.
| def | Description |
|---|---|
def init(self, arg2: object) -> None | |
def addConfigValidation(self, configValidation: str) -> None | Add a config validation method. |
def addGoalConfig(self, config: numpy.ndarray) -> None | |
| Add constraints with priorities to the config projector, creating it if needed. |
def addPartialCom(self, arg2: str, arg3: list) -> None | Create a named partial COM computation from a list of joint names. |
def applyConstraints(self, arg2: numpy.ndarray) -> tuple | Project config onto active constraints. Returns (success, projected_config, residual_error). |
def clearConfigValidations(self) -> None | |
| Get the config validations object. |
| Get the configuration shooter. |
def createComBetweenFeet(self, arg2: str, arg3: str, arg4: str, arg5: str, arg6: numpy.ndarray, arg7: numpy.ndarray, arg8: str, arg9: numpy.ndarray, arg10: list) -> pyhpp.constraints.bindings.Implicit | Create an implicit constraint: COM lies between two contact points. |
def createRelativeComConstraint(self, arg2: str, arg3: str, arg4: str, arg5: numpy.ndarray, arg6: list) -> pyhpp.constraints.bindings.Implicit | Create an implicit constraint: relative COM equals a reference point expressed in a joint frame. |
| Create a relative or absolute transformation constraint between two frames, with a 6-bool mask. |
def directPath(self, arg2: numpy.ndarray, arg3: numpy.ndarray, arg4: bool) -> tuple | Compute a direct path using the steering method. Returns (valid, path, report). |
| Get the distance function. |
def getConstraints(self) -> ConstraintSet | Return the active constraint set. |
def getParameter(self, name: str) -> Parameter | name — of the parameter. |
def getPartialCom(self, arg2: str) -> numpy.ndarray | Compute and return the position of the named partial center of mass. |
def initConfig(self, self_: numpy.ndarray) -> None | Get shared pointer to initial configuration. |
def isConfigValid(self, arg2: numpy.ndarray) -> tuple | Validate config against all config validations. Returns (valid, report). |
| Get the path projector. |
| Get the path validation object. |
def resetGoalConfigs(self) -> None | |
def robot(self) -> object | return shared pointer to robot. |
def setConstantRightHandSide(self, arg2: pyhpp.constraints.bindings.Implicit, arg3: bool) -> None | If constant=True, set comparison type to EqualToZero; otherwise to Equality. |
def setConstraints(self, arg2: ConstraintSet) -> None | Set the active constraint set used by applyConstraints. |
| name — of the parameter. value — value of the parameter std — :invalid_argument:if a parameter exists but has a different type. |
def setRightHandSideFromConfig(self, arg2: numpy.ndarray) -> None | Update right-hand side of the config projector from a configuration. |
| Get the steering method. |
| Get the problem target. |
| Error threshold used when creating a new ConfigProjector. |
| Maximum iterations for projection used when creating a new ConfigProjector. |
ProblemTarget
Problem target
This abstract class defines the goal to be reached by a planning algorithm.
Progressive
Inherits: PathValidation
Abstraction of path validation
Instances of this class compute the latest valid configuration along a path.
Method validate(ConfigurationIn_tq)
is provided to validate single configurations. It is particularly useful to test the initial and goal configurations of a path planning problem using this path validation.
| def | Description |
|---|---|
def init(self, robot: object, tolerance: float) -> object | Create a progressive continuous path validation. |
ProgressiveProjector
Inherits: PathProjector
This class projects a path using constraints.
| def | Description |
|---|---|
def init(self, distance: Distance, steeringMethod: SteeringMethod, step: float) -> object | Create a progressive path projector with the given step size. |
RSTimeParameterization
Inherits: PathOptimizer
| def | Description |
|---|---|
def init(self, arg2: object) -> object |
RandomShortcut
Inherits: PathOptimizer
| def | Description |
|---|---|
def init(self, arg2: object) -> object |
RecursiveHermiteProjector
Inherits: PathProjector
This class projects a path using constraints.
| def | Description |
|---|---|
def init(self, distance: Distance, steeringMethod: SteeringMethod, step: float) -> object | Create a recursive Hermite path projector with the given step size. |
ReedsShepp
Inherits: SteeringMethod
| def | Description |
|---|---|
def init(self, arg2: Problem) -> None |
Roadmap
Roadmap built by random path planning methods Nodes are configurations, paths are collision-free paths.
| def | Description |
|---|---|
def init(self, arg2: Distance, arg3: object) -> object | |
def str(self) -> str | |
| Add nodes at from and to, then add a directed edge between them. |
def addEdges(self, from_: Node, to: Node, path: Path) -> None | from — first node to — second node :param :path going from |
def addGoalNode(self, config: numpy.ndarray) -> Node | config — configuration If configuration is already in the roadmap, tag corresponding node as goal node. Otherwise create a new node. |
def addNode(self, arg2: numpy.ndarray) -> None | Add a node with the given configuration to the roadmap. |
def addNodeAndEdge(self, arg2: numpy.ndarray, arg3: numpy.ndarray, arg4: Path) -> None | Add node at ‘to’ and a single directed edge from the node nearest to ‘from’. |
def addNodeAndEdges(self, arg2: numpy.ndarray, arg3: numpy.ndarray, arg4: Path) -> None | Add node at ‘to’ and edges from the node nearest to ‘from’. |
def clear(self) -> None | Clear the roadmap by deleting nodes and edges. |
def connectedComponentOfNode(self, arg2: numpy.ndarray) -> ConnectedComponent | Return the connected component of the node nearest to the given configuration. |
def connectedComponents(self) -> list | Return list of all connected components. |
def distance(self) -> Distance | |
def getConnectedComponent(self, arg2: pyhpp.core.path.bindings.SplineB3) -> ConnectedComponent | Return connected component by index. |
def goalNodes(self) -> object | |
| Set the initial node to the given configuration. |
def insertPathVector(self, path: pyhpp.core.path.bindings.Vector, backAndForth: bool) -> None | backAndForth — whether to insert the reverse path as well. |
def merge(self, other: Roadmap) -> None | Add the nodes and edges of a roadmap into this one. |
| Find nearest node to configuration (optionally searching in reverse direction). Returns (configuration, minDistance). |
| Find the k nearest nodes to configuration. Returns a list of nodes. |
def nodes(self) -> list | Return list of all node configurations in the roadmap. |
def nodesConnectedComponent(self, arg2: pyhpp.core.path.bindings.SplineB3) -> list | Return list of configurations in the connected component identified by connectedComponentId. |
def nodesWithinBall(self, configuration: numpy.ndarray, connectedComponent: ConnectedComponent, maxDistance: float) -> object | |
def numberConnectedComponents(self) -> int | Return the number of connected components. |
def pathExists(self) -> bool | Check that a path exists between the initial node and one goal node. |
def resetGoalNodes(self) -> None |
SearchInRoadmap
Inherits: PathPlanner
SimpleShortcut
Inherits: PathOptimizer
| def | Description |
|---|---|
def init(self, arg2: object) -> object |
SimpleTimeParameterization
Inherits: PathOptimizer
| def | Description |
|---|---|
def init(self, arg2: object) -> object | |
| The maximum acceleration for each degree of freedom. Not considered if negative. |
| The desired continuity order (0, 1, or 2). |
| A scaling factor for the velocity bounds. |
Snibud
Inherits: SteeringMethod
| def | Description |
|---|---|
def init(self, arg2: Problem) -> None |
SplineBezier3
Inherits: SteeringMethod
| def | Description |
|---|---|
def init(self, arg2: Problem) -> None |
SplineBezier5
Inherits: SteeringMethod
| def | Description |
|---|---|
def init(self, arg2: Problem) -> None |
SplineGradientBased_bezier1
Inherits: PathOptimizer
| def | Description |
|---|---|
def init(self, arg2: object) -> object | |
| Accuracy of the QP solver (only used by proxqp). |
| In [0,1]. Initial value when interpolating between non-colliding current solution and the optimal colliding trajectory. |
| If true, consider only one (not all) collision constraint per iteration. |
| If true, joint bounds are enforced. |
| Order of the derivative used for the optimized cost function (most likely 1, 2, or 3). |
| Stop optimizing if the cost improves less than this threshold between two iterations. |
| Threshold to detect rows of zeros in the Jacobian (passive DoF). Negative disables the check. |
| If true, collision constraint will be re-linearized at each iteration. |
| If true, intervals in collision are checked first at the next iteration. |
| If true, returns the optimum regardless of collision (for debugging). |
| If true, the initial path length is used to weight the splines. |
SplineGradientBased_bezier3
Inherits: PathOptimizer
| def | Description |
|---|---|
def init(self, arg2: object) -> object | |
| Accuracy of the QP solver (only used by proxqp). |
| In [0,1]. Initial value when interpolating between non-colliding current solution and the optimal colliding trajectory. |
| If true, consider only one (not all) collision constraint per iteration. |
| If true, joint bounds are enforced. |
| Order of the derivative used for the optimized cost function (most likely 1, 2, or 3). |
| Stop optimizing if the cost improves less than this threshold between two iterations. |
| Threshold to detect rows of zeros in the Jacobian (passive DoF). Negative disables the check. |
| If true, collision constraint will be re-linearized at each iteration. |
| If true, intervals in collision are checked first at the next iteration. |
| If true, returns the optimum regardless of collision (for debugging). |
| If true, the initial path length is used to weight the splines. |
SplineGradientBased_bezier5
Inherits: PathOptimizer
| def | Description |
|---|---|
def init(self, arg2: object) -> object | |
| Accuracy of the QP solver (only used by proxqp). |
| In [0,1]. Initial value when interpolating between non-colliding current solution and the optimal colliding trajectory. |
| If true, consider only one (not all) collision constraint per iteration. |
| If true, joint bounds are enforced. |
| Order of the derivative used for the optimized cost function (most likely 1, 2, or 3). |
| Stop optimizing if the cost improves less than this threshold between two iterations. |
| Threshold to detect rows of zeros in the Jacobian (passive DoF). Negative disables the check. |
| If true, collision constraint will be re-linearized at each iteration. |
| If true, intervals in collision are checked first at the next iteration. |
| If true, returns the optimum regardless of collision (for debugging). |
| If true, the initial path length is used to weight the splines. |
SteeringMethod
Steering method
A steering method creates paths between pairs of configurations for a robot. They are usually used to take into account nonholonomic constraints of some robots
| def | Description |
|---|---|
def call(self, arg2: numpy.ndarray, arg3: numpy.ndarray) -> Path | Compute a path between two configurations using the steering method. |
| Set constraint set. |
def problem(self) -> CppCoreProblem | |
def steer(self, q1: numpy.ndarray, q2: numpy.ndarray) -> Path |
Straight
Inherits: SteeringMethod
| def | Description |
|---|---|
def init(self, arg2: Problem) -> None |
StraightPath
Inherits: Path
| def | Description |
|---|---|
|
TrapezoidalTimeParameterization
Inherits: PathOptimizer
| def | Description |
|---|---|
def init(self, arg2: object) -> object | |
| Maximum acceleration for each output degree of freedom. |
| Maximum velocity for each output degree of freedom. |
| Minimum duration assigned to each non-empty subpath. |
ValidationReport
Abstraction of validation report for paths and configurations
This class is aimed at being derived to store information relative to various Validation derived classes
CollisionValidation,
collision related PathValidation classes.
| def | Description |
|---|---|
def str(self) -> str |
VisibilityPrmPlanner
Inherits: PathPlanner
| def | Description |
|---|---|
def init(self, arg2: Problem) -> None |
WeighedDistance
Inherits: Distance
Weighed distance between configurations
Euclidean distance between configurations seen as vectors. Each degree of freedom is weighed by a positive value.
| def | Description |
|---|---|
def init(self, arg2: object) -> object | |
def asDistancePtr_t(self) -> Distance | Return a clone of this WeighedDistance as a Distance shared pointer. |
def getWeights(self) -> numpy.ndarray | Return the weight vector used when computing distances. |
def setWeights(self, arg2: numpy.ndarray) -> None | Set the weight vector used when computing distances. |
interval
| def | Description |
|---|---|
| |
| |
|
kPrmStar
Inherits: PathPlanner
| def | Description |
|---|---|
def init(self, arg2: Problem) -> None |