Closed ubgk closed 1 year ago
The version of posix-ipc
we use is from another repository: https://github.com/osvenskan/posix_ipc This is the one we get when installing from PyPI. (The repository you linked to is also called posix_ipc
, which is confusing :sweat_smile: In case of doubt, go to PyPI first then follow the links to GitHub.)
Your point is still valid though :+1:
Oh my bad, nice catch. No idea how I got to the wrong repo. 😅
Do you think this is an easy fix though?
As far as I recall Vulp does not use message queues. We open a shared-memory file with shm_open
(C) / posix_ipc.SharedMemory
(Python). We should be able to do without the posix-ipc
dependency and use the Python standard library instead: multiprocessing.shared_memory
But judging from this line, there may be a faster fix: setting flags
to zero and read_only=False
should work on both Linux and macOS.
@boragokbakan I tried the second option and it performs as before on Linux. We don't rely on posix_ipc.O_RDWR
any more so I expect this issue is fixed, feel free to re-open otherwise.
I suspect this could require non-trivial modifications to some parts of
vulp
. When I run tests nowvulp/spine/tests/spine_interface_test.py
throws anAttributeError: module 'posix_ipc' has no attribute 'O_RDWR'
: (cf. error.log).O_RDWR
is defined between guards here, so maybe macOS doesn't implement POSIX message queues?Originally posted by @boragokbakan in https://github.com/tasts-robots/vulp/issues/15#issuecomment-1531427156