neurobionics / opensourceleg

An open-source software library for numerical computation, data acquisition, and control of lower-limb robotic prostheses.
https://opensourceleg.org
GNU Lesser General Public License v2.1
31 stars 33 forks source link

Add support for "Offline Mode" #135

Closed tkevinbest closed 11 months ago

tkevinbest commented 11 months ago

🚀 Feature Request

An "offline mode" that allows scripts to execute even if no actpacks are connected. Basically any call to actuator-y methods would return default values and any writes to actuator-y methods would be ignored.

This provides a way to test code and check for syntax or other errors before going to the leg. It might also allow for testing of code without being connected to a pi, such as on WSL or other linux distro.

imsenthur commented 11 months ago

Added support for mock/offline_mode functionality. Please be aware that this is an experimental feature and needs more time to become a fully flushed out feature with more sensical data and methods for both the actpack and load cell.

You can now call osl.add_joints() and osl.add_loadcell() methods with offline_mode=True argument. Please checkout the dev branch [b8e58d0c8c431b3728146fc365c9f4a26c050622].