File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -93,7 +93,7 @@ def computepath(qinit,
9393
9494 def plane_sampler ():
9595 while True :
96- s = np .random .uniform (0 .0 , 1 .0 )
96+ s = np .random .uniform (- 1 .0 , 2 .0 )
9797 t = np .random .uniform (- half_width , half_width )
9898 xy = (1.0 - s ) * p0_xy + s * p1_xy + perp * t
9999 z = np .random .uniform (zmin , zmax )
Original file line number Diff line number Diff line change 1313from pinocchio .utils import rotate
1414
1515from constants import EDGE_DISTANCE_TOL , DEFAULT_DISCRETISATION_STEPS , DEFAULT_CHECK_EDGE_STEPS
16- from tools import setcubeplacement
16+ from tools import setcubeplacement , distanceToObstacle
1717from constants import DEFAULT_VIZ_DELAY
1818import time
1919import sampling
@@ -192,7 +192,7 @@ def get_q_new(self,
192192 # update seed for the next interpolation step if IK succeeded
193193 if found and grasping_q is not None :
194194 seed_grasping_q = grasping_q
195- if not found :
195+ if not found or distanceToObstacle ( self . robot , grasping_q ) < 0.001 :
196196 # cannot progress past the previous valid step
197197 if i - 1 == 0 :
198198 q_new_found = False
You can’t perform that action at this time.
0 commit comments