1from ompl
import base
as ob
6 """Motion validator using VAMP collision checking"""
9 self, si: ob.SpaceInformation, env: vamp.Environment, robot: vamp.robot
17 self, s1: ob.RealVectorStateType, s2: ob.RealVectorStateType
21 return self.
robot.validate_motion(config1, config2, self.
env)
26 self, si: ob.SpaceInformation, env: vamp.Environment, robot: vamp.robot
33 def isValid(self, s: ob.RealVectorStateType) -> bool:
35 return self.
robot.validate(config, self.
env)
39 s: ob.RealVectorStateType, env: vamp.Environment, robot: vamp.robot, dimension: int
41 """Check if a state is valid (collision-free)"""
42 config = s[0:dimension]
43 return robot.validate(config, env)
47 """State Space class using VAMP's robot methods"""
49 def __init__(self, robot: vamp.robot):
50 super().__init__(robot.dimension())
54 upper_bounds = robot.upper_bounds()
55 lower_bounds = robot.lower_bounds()
58 bounds.setLow(i, lower_bounds[i])
59 bounds.setHigh(i, upper_bounds[i])
Abstract definition for a class checking the validity of motions – path segments between states....
The lower and upper bounds for an Rn space.
A state space representing Rn. The distance function is the L2 norm.
void setBounds(const RealVectorBounds &bounds)
Set the bounds of this state space. This defines the range of the space in which sampling is performe...
Abstract definition for a class checking the validity of states. The implementation of this class mus...