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

calling activate() hangs #2

Open
theNerd247 opened this issue Sep 15, 2015 · 2 comments
Open

calling activate() hangs #2

theNerd247 opened this issue Sep 15, 2015 · 2 comments

Comments

@theNerd247
Copy link

Assuming the gripper is reset (all registers are 0). The following code hangs:

using Gripper = RobotiqSModelControlClient;
    ....
std::shared_ptr<Gripper> gripper(new Gripper());
      .... 
ROS_INFO_STREAM("Activating the Gripper...");
gripper->activate();
gripper->setGraspingMode(Gripper::GM_pinch);
ros::Duration(5).sleep();
while(!gripper->activationCompleted() && ros::ok()) ros::spinOnce();
ROS_INFO_STREAM("...activated!");

Oddly when debugging the code in gdb the gripper begins its activation sequence after the gripper->activate() call.

@theNerd247
Copy link
Author

After a bit more debugging I'm confused as to what the ros::Duration(...).sleep() is for in your example. That is should not while(!gripper->activationCompleted() && ros::ok()) ros::spinOnce(); this wait until the gripper is activated (or replacing !gripper->activationCompleted() with !gripper->stoppedAtRequestedPosition() should make it wait until it's done moving)?

@fevb
Copy link

fevb commented Sep 15, 2015

Can't really remember, wrote this code a long while ago and it may be even incompatible with newer versions of the robotiq package. I would check by echoing the "/SModelRobotInput" topic and seeing if gIMC==3 after the activate() function has been called

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants