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

Action End Notification for robotiq_2f_85 #149

Open
devesh1508 opened this issue Mar 4, 2021 · 5 comments
Open

Action End Notification for robotiq_2f_85 #149

devesh1508 opened this issue Mar 4, 2021 · 5 comments

Comments

@devesh1508
Copy link

We are trying to use the wait_for_action_end_or_abort() function (see here https://github.com/Kinovarobotics/ros_kortex/blob/kinetic-devel/kortex_examples/src/full_arm/example_cartesian_poses_with_notifications.py) with /base/send_gripper_command service. However, it seems that this never returns anything, and the python code is blocked indefinitely. However, if we dont use this and the gripper moves without getting to the actual position, then we see very bizarre behavior (like the robot will skip the next command in the python script). Does this command - wait_for_action_end_or_abort() work with the gripper?

@devesh1508 devesh1508 changed the title Action Enc Notification for robotiq_2f_85 Action End Notification for robotiq_2f_85 Mar 4, 2021
@pchang17
Copy link

I had the same issue. My solution for now is to use rospy.sleep() after the gripper command. Using rospy.sleep() instead of time.sleep() as in the example code prevents the robot from skipping the next command.

@felixmaisonneuve
Copy link
Contributor

Hi @devesh1508,

Like you mentionned, wait_for_action_end_abort() won't work for gripper actions because grippers actions don't send notifications (apparently) as I found out here. I will do some more research about that, sorry for the inconvenience.

In the mean time, I would do as @pchang17 said and use rospy.sleep(). I am not sure why time.sleep() would skip the next action.

Can you provide an example where an action would be skipped?

Best,
Felix

@devesh1508
Copy link
Author

devesh1508 commented Jun 17, 2021 via email

@felixmaisonneuve
Copy link
Contributor

Great, I will wait for your info about the twist commands.

For the trajectory control, you can add multiple waypoints to make your robot follow a trajectory like in the example here. The robot will then move to each waypoint, stop, then move to the next point, like you saw.

To have a smooth trajectory, you need to modify the blending_radius attribute in your waypoint. This is a radius around the point that defines a "zone" where the robot can go instead having to go exactly to the point. In other words, instead of moving to the exact point, stopping, and moving to your next waypoint, your robot will only need to move "somewhere" in that sphere defined by the radius, so the movement in smooth.

You can define the blending_radius or set trajectory.use_optimal_blending = true; (an other example where use_optimal_blending is used here) to set an optimal blending_radius for each point in your tajectory.

I will link this issue that is also related to blending_radius.

Best,
Felix

@felixmaisonneuve
Copy link
Contributor

Hi @devesh1508,

Did you have time to try using time.sleep() instead of wait_for_action_end_abort() for gripper actions.
Also, have you tried changing blending radius? Does the arm still stop at every waypoint?

Looking forward to your response,
Felix

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

3 participants