Raspberry Pi

Post questions, comments and feedback to our 3Dconnexion UNIX and Linux Development Team.

Moderator: Moderators

Post Reply
jwick
Moderator
Moderator
Posts: 2439
Joined: Wed Dec 20, 2006 2:25 pm
Location: USA
Contact:

Raspberry Pi

Post by jwick » Fri Jan 06, 2017 3:36 am

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.

nourich
Posts: 3
Joined: Mon Jan 30, 2017 7:14 am

Re: Raspberry Pi

Post by nourich » Mon Jan 30, 2017 7:21 am

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

jwick
Moderator
Moderator
Posts: 2439
Joined: Wed Dec 20, 2006 2:25 pm
Location: USA
Contact:

Re: Raspberry Pi

Post by jwick » Mon Jan 30, 2017 7:40 am

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.

nourich
Posts: 3
Joined: Mon Jan 30, 2017 7:14 am

Re: Raspberry Pi

Post by nourich » Mon Jan 30, 2017 7:54 am

Thank you for your prompt response. I am using directly a RaspberyPi board and try to run the application under the geany editor.

jwick
Moderator
Moderator
Posts: 2439
Joined: Wed Dec 20, 2006 2:25 pm
Location: USA
Contact:

Re: Raspberry Pi

Post by jwick » Mon Jan 30, 2017 8:15 am

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.

nourich
Posts: 3
Joined: Mon Jan 30, 2017 7:14 am

Re: Raspberry Pi

Post by nourich » Mon Jan 30, 2017 8:29 am

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 !

jwick
Moderator
Moderator
Posts: 2439
Joined: Wed Dec 20, 2006 2:25 pm
Location: USA
Contact:

Re: Raspberry Pi

Post by jwick » Mon Jan 30, 2017 8:34 am

Cool. Let us know if you do something fun with it.

jwick
Moderator
Moderator
Posts: 2439
Joined: Wed Dec 20, 2006 2:25 pm
Location: USA
Contact:

Re: Raspberry Pi

Post by jwick » Tue Mar 07, 2017 10:52 am

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.

Phil999
Posts: 378
Joined: Tue Jun 30, 2009 5:20 am

Re: Raspberry Pi

Post by Phil999 » Thu Mar 09, 2017 12:19 am

very nice, thank you.

jbartates
Posts: 1
Joined: Sun May 05, 2019 1:03 am

Re: Raspberry Pi

Post by jbartates » Sun May 05, 2019 1:37 am

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

jwick
Moderator
Moderator
Posts: 2439
Joined: Wed Dec 20, 2006 2:25 pm
Location: USA
Contact:

Re: Raspberry Pi

Post by jwick » Tue May 07, 2019 12:05 am

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.

Post Reply