Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix] Gripper effort command #46

Merged
merged 2 commits into from
Nov 19, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions chapter10/smach_sample/script/smach_pr2.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ def pose_cb(userdata, _pr2_move, pose):
init_sub = smach.StateMachine(outcomes=['success'])
with init_sub:
gripper_open = Pr2GripperCommandGoal()
gripper_open.command.position = 0.025
gripper_open.command.max_effort = 2000
gripper_open.command.position = 0.09
gripper_open.command.max_effort = 10.0
smach.StateMachine.add('Open_gripper',
SimpleActionState('/l_gripper_controller/gripper_action',
Pr2GripperCommandAction,
Expand Down
6 changes: 3 additions & 3 deletions chapter10/smach_sample/src/simple_gripper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ class Gripper{
//Open the gripper
void open(){
pr2_controllers_msgs::Pr2GripperCommandGoal open;
open.command.position = 0.025;
open.command.max_effort = -1.0; // Do not limit effort (negative)
open.command.position = 0.09;
open.command.max_effort = 10.0; // Do not limit effort (negative)

ROS_INFO("Sending open goal");
gripper_client_->sendGoal(open);
Expand All @@ -46,7 +46,7 @@ class Gripper{
void close(){
pr2_controllers_msgs::Pr2GripperCommandGoal squeeze;
squeeze.command.position = 0.0;
squeeze.command.max_effort = 50.0; // Close gently
squeeze.command.max_effort = 10.0; // Close gently

ROS_INFO("Sending squeeze goal");
gripper_client_->sendGoal(squeeze);
Expand Down