Use busy records for ease of synchronous programming - #25
Merged
Conversation
By changing moveL and moveJ records from bo to busy,
and some slightly modifications to the driver, clients can
now do synchronous motion in a much easier way. For example
with the caput command line utilty, we can now do:
`caput -w 10 -c urExample:Control:moveJ 1` and it will block
until the motion completes. From pyepics, we could similarly do:
caput("urExample:Control:moveJ", 1, wait=True).
Same idea as we did for moveJ and moveL. Now clients can easily move close/open the gripper and wait for motion to complete
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR changes the
borecords used to start asynchronous motion ($(P)Control:moveJ,$(P)Control:moveL, and$(P)RobotiqGripper:Openand$(P)RobotiqGripper:Close) tobusyrecords. This was primarily done so that clients can easily execute robot motion synchronously. Some minor changes to the driver code was also required to support thisWith
caputfrom the command line, the following will now block until motion completes:Previously this would return immediately regardless, and clients needed to poll the
$(P)Control:MovingPV to wait for the motion to complete.Similarly with
pyepicsyou can now do the following to block until motion is complete:In the future I plan to implement this same style of
busyrecord logic with the waypoint motion PVs. Once this is completed, it is likely the built in path logic can be fully replaced bysseqrecords with "Wait" options. However, I believe most users will be more interested in simple scripting for robot motion versus building paths from combinations ofsseq,calcout, etc. records at runtime.