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

Allow cancelling the FollowJointTrajectoryAction during execution #29

Merged
merged 3 commits into from
Apr 3, 2018

Conversation

croesmann
Copy link
Contributor

This small update checks if the action client has requested a cancellation/preempt. In that case the current trajectory following procedure is aborted.
In my opinion, this behaviour agrees with the concept of the actionlib state machine (http://wiki.ros.org/actionlib/DetailedDescription).

@@ -125,10 +130,17 @@ def executeTrajectory(self, traj):
last = [ self.device.joints[joint].position for joint in self.joints ]
for point in traj.points:
while rospy.Time.now() + rospy.Duration(0.01) < start:
if self.server.is_preempt_requested():
return 0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indentation on these two lines look off -- are you using tabs?

@mikeferguson
Copy link
Member

This is definitely the way to do this based on the specification of the action. There are some issue with formatting that need to be addressed.

@croesmann
Copy link
Contributor Author

Thanks for your review, I fixed the formatting issue with the last two commits.

@corot
Copy link
Contributor

corot commented Nov 20, 2015

👍 Works fine

@mikeferguson mikeferguson merged commit afefa8a into vanadiumlabs:indigo-devel Apr 3, 2018
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

Successfully merging this pull request may close these issues.

None yet

3 participants