upkie 6.1.0
Open-source wheeled biped robots
|
Interface to interact with a spine from a Python agent. More...
Public Member Functions | |
def | __init__ (self, str shm_name="/upkie", int retries=1, bool perf_checks=True) |
Connect to the spine shared memory. More... | |
def | __del__ (self) |
Close memory mapping. More... | |
dict | set_action (self, dict action) |
Set action for the spine to process. More... | |
dict | start (self, dict config) |
Reset the spine to a new configuration. More... | |
None | stop (self) |
Tell the spine to stop all actuators. | |
Interface to interact with a spine from a Python agent.
def upkie.spine.spine_interface.SpineInterface.__init__ | ( | self, | |
str | shm_name = "/upkie" , |
||
int | retries = 1 , |
||
bool | perf_checks = True |
||
) |
Connect to the spine shared memory.
shm_name | Name of the shared memory object. |
retries | Number of times to try opening the shared-memory file. |
perf_checks | If true, run performance checks after construction. |
def upkie.spine.spine_interface.SpineInterface.__del__ | ( | self | ) |
Close memory mapping.
Note that the spine process will unlink the shared memory object, so we don't unlink it here.
dict upkie.spine.spine_interface.SpineInterface.set_action | ( | self, | |
dict | action | ||
) |
Set action for the spine to process.
[in] | action | Action dictionary. |
dict upkie.spine.spine_interface.SpineInterface.start | ( | self, | |
dict | config | ||
) |
Reset the spine to a new configuration.
[in] | config | Configuration dictionary. |