Skip to content

Commit 9f13277

Browse files
author
Michael Koval
committed
Pass a finite max_distance in MoveUntilTouch
1 parent 4bd4c53 commit 9f13277

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/prpy/base/wam.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,13 +242,19 @@ def ClearTrajectoryStatus(manipulator):
242242
if not manipulator.simulated:
243243
manipulator.controller.SendCommand('ClearStatus')
244244

245-
def MoveUntilTouch(manipulator, direction, distance, max_distance=float('+inf'),
245+
def MoveUntilTouch(manipulator, direction, distance, max_distance=2.,
246246
max_force=5.0, max_torque=None, ignore_collisions=None, **kw_args):
247247
"""Execute a straight move-until-touch action.
248248
This action stops when a sufficient force is is felt or the manipulator
249249
moves the maximum distance. The motion is considered successful if the
250250
end-effector moves at least distance. In simulation, a move-until-touch
251251
action proceeds until the end-effector collids with the environment.
252+
253+
The maximum distance defaults to a value that is higher than the size
254+
of the reachable workspace of the WAM, which is roughly a sphere with a
255+
radius of one meter. This means that, by default, the arm will move as
256+
far as possible while obeying the straight-line constraint.
257+
252258
@param direction unit vector for the direction of motion in the world frame
253259
@param distance minimum distance in meters
254260
@param max_distance maximum distance in meters
@@ -258,6 +264,7 @@ def MoveUntilTouch(manipulator, direction, distance, max_distance=float('+inf'),
258264
@param **kw_args planner parameters
259265
@return felt_force flag indicating whether we felt a force.
260266
"""
267+
261268
# TODO: Is ignore_collisions a list of names or KinBody pointers?
262269
if max_torque is None:
263270
max_torque = numpy.array([100.0, 100.0, 100.0 ])

0 commit comments

Comments
 (0)