Raspberry Pi
Moderator: Moderators
Raspberry Pi
I've created some simple examples that show how to access the SpaceNavigator on a Raspberry Pi on GitHub
It is ideal for robot control.
Enjoy, join and contribute.
It is ideal for robot control.
Enjoy, join and contribute.
Re: Raspberry Pi
Hi, thanks for your help first of all. I am working on a similar project, which cosists on reading the data coming from a 3d mouse and send them afterward through a http-request. I've tried to execute your code of HelloSpaceNavigator but without success, it had detected the spacenavigator device but the axis data weren't caught. I pretend that some whether libraries ors usb packages are missing. I am actually getting a usb.core.USBError. Could you tell me please what I need to install on my linux OS before I execute any of these applications. Thanks in advance
Re: Raspberry Pi
You are running on an RPi or a PC running Linux with python?
This code/project is very RPi-specific.
Still, if you can detect the device you are almost there.
This code/project is very RPi-specific.
Still, if you can detect the device you are almost there.
Re: Raspberry Pi
Thank you for your prompt response. I am using directly a RaspberyPi board and try to run the application under the geany editor.
Re: Raspberry Pi
Do you get all the information about the device listed? You should get pages of information.
As I recall, detaching it from the kernel was a very important part to get it to work. You may want to check the error codes around that.
I run this under Raspian (from NOOBS) on a Pi3, in a root terminal window.
I have to run a specific python version for some of the examples (2.x vs 3.x).
I've installed, or had installed, libusb-1.0-0, pyusb (I may have gotten that from sourceforge) and pypubsub, typing for the latter examples.
As I recall, detaching it from the kernel was a very important part to get it to work. You may want to check the error codes around that.
I run this under Raspian (from NOOBS) on a Pi3, in a root terminal window.
I have to run a specific python version for some of the examples (2.x vs 3.x).
I've installed, or had installed, libusb-1.0-0, pyusb (I may have gotten that from sourceforge) and pypubsub, typing for the latter examples.
Re: Raspberry Pi
Yessss it is working now !!! I runned the application as administrator (super user) because it was mentioned at the debugging window that the access to the usb.core was denied cause of insufficient permissions so I had modified the running command of the geany compiler. Now I will try to collect the data infos and build a http request with to send it to the network. Thanks a lot !
Re: Raspberry Pi
Cool. Let us know if you do something fun with it.
Re: Raspberry Pi
I've used the SN+Pi to drive a Zumo tracked vehicle (see GitHub).
It's quite nice control.
Having all these bits of resolution and spatially-mapped movement has quite some possibilities.
Push to go forward, twist to turn is very intuitive. Push harder, twist harder, ... very natural.
It's quite nice control.
Having all these bits of resolution and spatially-mapped movement has quite some possibilities.
Push to go forward, twist to turn is very intuitive. Push harder, twist harder, ... very natural.
Re: Raspberry Pi
very nice, thank you.
Space Navigator x2, Space Pilot, Space Pilot Pro, SpaceMouse Enterprise
Re: Raspberry Pi
Hello, thank you for posting this. I've currently implemented the code on a raspberry pi 3 model B, currently running the HelloSpaceNavigator code.
I'm able to obtain values of the translations (tx, ty, tz) but not the rotations (rx,ry, rz). The data stream seems to provide a new line of data when rotating the mouse, but it's printing translation values of all zeros instead of rotation values. Any idea on how to resolve this? Thank you
I'm able to obtain values of the translations (tx, ty, tz) but not the rotations (rx,ry, rz). The data stream seems to provide a new line of data when rotating the mouse, but it's printing translation values of all zeros instead of rotation values. Any idea on how to resolve this? Thank you
Re: Raspberry Pi
It may be the device you have. The protocol changed at some point after the Spacenavigator. The SN had two separate packets (T and R). The newest devices have one 13 byte packet with all 6 T & R values in one packet.
Re: Raspberry Pi
Dear jwick,
I'm currently working on a project with the spacenavigator (Spacemouse wireless). I"m currently facing the problem that the navigator won't send the right packages, and i keep getting the USBERROR: 75 overflow error while running the HelloSpaceNavigetor.py. Can you help me fix this bug? Or do you have a example program with the fixed package size?
Thanks in advance,
Leon
I'm currently working on a project with the spacenavigator (Spacemouse wireless). I"m currently facing the problem that the navigator won't send the right packages, and i keep getting the USBERROR: 75 overflow error while running the HelloSpaceNavigetor.py. Can you help me fix this bug? Or do you have a example program with the fixed package size?
Thanks in advance,
Leon
Re: Raspberry Pi
A SpaceNavigator and a SpaceMouse Wireless are two different USB devices. It searches for only the SN (c626).
Looking at the code, I wonder what happens when it can't find a SpaceNavigator.
It looks it raises an exception. If it continues on, then it probably has nothing to continue on with.
If I could find my RPi, I'd test it...
Looking at the code, I wonder what happens when it can't find a SpaceNavigator.
It looks it raises an exception. If it continues on, then it probably has nothing to continue on with.
If I could find my RPi, I'd test it...
Re: Raspberry Pi
You're correct I've changed the id's into the wireless version. So it does find the device, but it Can't receive any data. I hope you can find something. Can you please reply if you can't find your Rpi? Then i will continue my search, or start from scratch. thanks in advance for the effort!
Re: Raspberry Pi
Thanks for the quick reply! Yes, you're right, i've changed the id's because they did'nt match. I hope that you can find the reason why it does'nt receives the packages. Can you please send a reply if you cannot find the Raspberry. Then I will continue my search or start from scratch.