Skip to content

Commit

Permalink
Fixed issues in Gripper example in README
Browse files Browse the repository at this point in the history
  • Loading branch information
TimSchneider42 committed Jun 4, 2024
1 parent e6d05d6 commit f741616
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ double speed = 0.02; // [m/s]
double force = 20.0; // [N]

// Move the fingers to a specific width (5cm)
bool success = gripper.move(0.05, speed, force);
bool success = gripper.move(0.05, speed);

// Grasp an object of unknown width
success &= gripper.grasp(0.0, speed, force, epsilon_outer=1.0);
Expand All @@ -504,7 +504,7 @@ double width = gripper.width();
gripper.open(speed);

// There are also asynchronous versions of the methods
std::future<bool> success_future = gripper.moveAsync(0.05, speed, force);
std::future<bool> success_future = gripper.moveAsync(0.05, speed);

// Wait for 1s
if (!success_future.wait_for(std::chrono::seconds(1)) == std::future_status::ready) {
Expand All @@ -527,19 +527,19 @@ speed = 0.02 # [m/s]
force = 20.0 # [N]

# Move the fingers to a specific width (5cm)
success = gripper.move(0.05, speed, force)
success = gripper.move(0.05, speed)

# Grasp an object of unknown width
success &= gripper.grasp(0.0, speed, force, epsilon_outer=1.0)

# Get the width of the grasped object
width = gripper.width()
width = gripper.width

# Release the object
gripper.open(speed)

# There are also asynchronous versions of the methods
success_future = gripper.move_async(0.05, speed, force)
success_future = gripper.move_async(0.05, speed)

# Wait for 1s
if success_future.wait(1):
Expand Down

0 comments on commit f741616

Please sign in to comment.