JeanElsner / panda-py

Python bindings for real-time control of Franka Emika robots.
https://jeanelsner.github.io/panda-py/
Apache License 2.0
77 stars 14 forks source link

Adding programming vs demonstration mode #23

Open colormotor opened 5 months ago

colormotor commented 5 months ago

Hi, it would be useful to add functionality to the desk interface so it can also set programming vs execution mode. Currently I am doing this externally (using a FR3) with this function:

def set_programming_mode(desk, flag):
        if flag:
            url = '/desk/api/operating-mode/programming'
        else:
            url = '/desk/api/operating-mode/execution'
        desk._request('post',
                  url,
                  files={'force': True},
                  headers={'X-Control-Token': desk._token.token})

With the URLs borrowed from https://github.com/TimSchneider42/franky