Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

USB permission issue #1

Open
radhen opened this issue Mar 12, 2020 · 6 comments
Open

USB permission issue #1

radhen opened this issue Mar 12, 2020 · 6 comments

Comments

@radhen
Copy link

radhen commented Mar 12, 2020

I successfully build and installed this package but I am unable to run the atctest executable without sudo permission. I have followed all the steps listed in the README but I am still facing the permission issue. Could someone please help me debug this problem? Appreciate your early response.

@radhen
Copy link
Author

radhen commented Apr 7, 2020

Aiming in the dark here!
Has anyone been able to read data from five sensors using this repository which by default reads only four sensors? If the author of this repo see this I request him to please get in touch with with any information he has on communicating with five sensors. I'd really really appreciate it.

@ChristophJud
Copy link
Owner

have you solved the permission issue?

@radhen
Copy link
Author

radhen commented Apr 8, 2020

Thank you so much for replying.
Yes! It was not working on my personal machine so I tried it on a fresh Ubuntu and it now works without sudo. Other than this, I wanted to know if it's possible to read from two TrakSTAR units using this repo? I have two TrakSTAR units and five sensors. I have tried to change some parameters by reading the manual provided by the company but no luck so far. Could you pin point to what needs to change in code to read five sensors, if possible? Or point me to a different repo that can do so?

@ChristophJud
Copy link
Owner

some time ago, someone reported a similar issue via email. digging deep into my mail-history (2015) if found that the driver has been successfully tested with 3 devices linked (12 sensors). I have never received a pull-request though. she figured out, that for multiple devices a master-slave configuration need to be setup. However, as I wrote, I have not received any code for that.

please let me know in case you managed it.

@radhen
Copy link
Author

radhen commented Apr 8, 2020

Good to know that the driver is tested for 3 device. To setup a master-slave configuration one needs to launch the companie's (NDI Digital) Windows GUI software to set the ID for one device=0(master) and other as device=1(slave). Once done, the driver should automatically detect both the devices as I have been told by a person at the company. Right now I can detect which sensors are attached using the sensorAttach(int sensorID) func in this code but the output only shows proper values for four sensors. The 5th sensor values are a copy of one of working four sensors. Strange! Can you please put me in touch with the person who was using multiple devices? I'll inform you if I hear back from her. My email: [email protected], if it makes communication simpler.

@nro-bot
Copy link

nro-bot commented Apr 25, 2020

Hi, I just wanted to document here what it took to get this to run with sudo, in case it helps others (it took me two hours of debugging I think) who may be trying to run this with ROS.

My hardware had different vendor IDs, and I think the primary issue was that the original way BIRD_VENDOR and BIRD_PRODUCT was defined was causing hex/dec confusion with the udev rules. I use hex for both. The process was to follow install process as in the README, then edit three files.

This is on Ubuntu 18.04.2 and I believe I did not need to create any libusb user groups or anything special besides the below.

$ vi ~/projects/ATC3DTracker/include/PointATC3DG.h
    #define BIRD_VENDOR     0x04b4
    #define BIRD_PRODUCT  0x1005 // trakSTAR
$ make clean
$ make
$ make install
$ sudo vi /etc/udev/rules.d/99-my-rule.rules
    SUBSYSTEM=="usb", ATTRS{idVendor}=="04b4", ATTRS{idProduct}=="1005", MODE="0666"
$ sudo udevadm control --reload-rules && udevadm triggersudo vi ~/.bashrc
$ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:~/projects/ATC3DGTracker/lib

then unplug and replug in the device.

Now you can run without sudo.

~projects/ATC3DGTracker/build (master *%)$ ./../bin/atcTest 
X: 20.6807, 	Y: 15.1304, 	Z: -4.47363, 	A: 60.0952, 	E: 0.373535, 	R: 144.075
X: 10.771, 	Y: 21.876, 	Z: -7.67285, 	A: -44.6484, 	E: -4.59229, 	R: -51.1743
...

The vendor and product ID values can be found in hex with lsusb, it would like similar to this I think (don't have the device on me to plug in and test at the moment):

$ lsusb
    Bus 008 Device 004: ID 04b4:1005 SomethingVendor, Ltd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants