Unable to get PSMoveTracker
hi there, im trying to use the psmoveapi for a school project, however, im facing the below error when trying to access tracker. im wondering is there something i might have missed out?
self.tracker = psmove.PSMoveTracker() AttributeError: module 'psmove' has no attribute 'PSMoveTracker'
i checked that the ps eye camera works fine. i'm using verision 4.0.12 of psmoveapi on ubuntu 22.04
thank you!
Have you built the project with tracker support, and installed all dependencies (e.g. OpenCV)? Can you attach the full build log (do a clean rebuild if you haven't captured the log, so it really builds everything from scratch)?
hi there, have attached the log. my apologies for my ignorance, how should i enable the tracker?
Thank you!
hi @thp , may i ask how do i build the project with tracker support? also, i cant use the set_led function,im just wondering if i missed out any steps, i followed the instructions on psmoveapi.readthedocs.io/en/latest/
hi @thp , may i ask how do i build the project with tracker support?
Later versions of the scripts/linux/build-debian (browse the code in the Git "master" branch (which is what GitHub shows you by default)) have been changed to automatically build with tracker support. I suggest you take a look at what it does.
also, i cant use the set_led function,im just wondering if i missed out any steps, i followed the instructions on psmoveapi.readthedocs.io/en/latest/
Where in the instructions does that function call appear exactly? I can't seem to find it. And which language bindings are you using?
hi @nitsch , thanks for responding, i used the 4.0.12 branch as i was facing the same problem as https://github.com/thp/psmoveapi/issues/495, i tried to use the master branch today and am still facing the same problem
build log: Untitled.docx
Before going through the steps for building 4.0.12 with tracker support ... Can't you just use the Linux binaries that come with that release?
hi @nitsch ,apologies for my ignorance, may i clarify "use the Linux binaries that come with that release"? Thank you!
The psmoveapi releases (https://github.com/thp/psmoveapi/releases/tag/4.0.12) come with pre-built binaries for multiple platforms. Linux is also included.
The library files (.so) can be found in the libs/ subdirectory of the respective archive, header files in the include/ subdirectory and so on.
It looks like libpsmoveapi_tracker.so depends on OpenCV 3.2 (you can use
the ldd command-line tool to check), so that would have to be
installed on your system in order to use tracking support.
Also, for the master branch, check out the scripts in https://github.com/thp/psmoveapi/tree/master/scripts -- these also build OpenCV and so should include tracker support. This even works for the master branch (and is what CI uses to verify the API can be built).