Open fmauch opened 2 years ago
+1 for enabling this feature through a ROS interface!
Thanks @fmauch for wrapping this up.
+1 This would be really useful! I currently ran into an issue when switching between freedrive (with URScript) and remote control. The way I do so is:
If I do not have the 0.5s delay in between, although rosservice returns success in stop and play, it is not really ready to run new commands. 0s delay fails consistently and 0.2s delay fails randomly. So far 0.5 is the magic number. If freedrive_mode is implemented, then I assume it wouldn't be necessary to add delays anymore.
However, the open question here is why UR is not immediately ready after the rosservice call? If there is a determined delay, why can't that be checked within the rosservice and only return when it is really ready to operate?
Adding an interface for activating the freedrive mode would probably be beneficial especially in situations where you don't have a teach pendant available.
As activating and deactivating freedrive_mode is available in ur_script, this could be easily added.
I suggest using a topic interface with a keepalive mechanism, so a user would have to regularly send a message to activate it. If input on that topic times out, it should be deactivated. The reason for that would be that it would have the same "deadman" mechanism as on the TP.
By providing a custom message and not only a simple bool topic we could restrict the freedrive functionality to only certain axes. It would probably be best to use URs
feature
notation for that.It should be fairly easy to get a proof of concept running with this.
A few culprits to keep in mind:
teach_mode
has been migrated tofreedrive_mode
. We should check from which version on@fmessmer, @floweisshardt FYI