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

Problem with Q2-USB #4

Open
colombojrj opened this issue May 19, 2023 · 4 comments
Open

Problem with Q2-USB #4

colombojrj opened this issue May 19, 2023 · 4 comments

Comments

@colombojrj
Copy link

Dear support,

Firstly, thanks for this driver. We have a Q2-USB, which should have basic support on Linux. I have installed the driver and followed all the instructions. The example analog_loop builds fine. However, when I try to run the analog_loop test, I face the error 986. This issue also happens with the lastest version of the windows hil sdk driver. However, it runs fine with older version (2019, for example).

What I have tried:

  • to copy the libhil.so to the same folder containing the binary, without success
  • to add /opt/quanser/lib to the PATH variable, also without success

If you could address this issue it would be a great help.

Thanks.

@jshuquanser
Copy link

Hi,

I'm surprised that you're actually able to use q2-usb before, as there might be a typo in the hil_sdk_x86_64 readme file that says q2_usb is uspported. Just to double check, did you use the HIL SDK on Ubuntu before, or on another platform?

Can you do the following command on your Ubuntu/Linux computer and show us the output:
ls -l /opt/quanser/hardware/

@colombojrj
Copy link
Author

Hi,

I have the lastest version of HIL SDK installed on my Ubuntu right now. I have never been able to run the HIL SDK from Linux. But on Windows the driver is working.

Here is the result of the ls -l /opt/quanser/hardware command:

$ ls -l /opt/quanser/hardware/
total 368
-r-xr-xr-x 1 root root 80688 abr 29  2022 hil_proxy.so
-r-xr-xr-x 1 root root 22872 abr 29  2022 null_device.so
-r-xr-xr-x 1 root root 93304 abr 29  2022 qarm_usb.so
-r-xr-xr-x 1 root root 60480 abr 29  2022 quanser_aero_usb.so
-r-xr-xr-x 1 root root 56376 abr 29  2022 quanser_pwmpaq_usb.so
-r-xr-xr-x 1 root root 56384 abr 29  2022 qube_servo2_usb.so

Now I notice the lastest version of the HIL SDK doesn't have the libhil.so. However, older versions have it. The 2019 version has it. See the result of the command

$ file libhil.so 
libhil.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=ac39226cfb048016d24d898b3e1a6b45620830f2, stripped

And the result of a $ nm -gD libhil.so command is in this pastebin.

Should I be able to use the Q2-USB on Linux with the lastest version of HIL SDK?

@jshuquanser
Copy link

Regarding Q2-USB, it is indeed our mistakes to put it in README.txt as being supported on x86_64 Linux. As you see in /opt/quanser/hardware, those are the only devices that are supported. We're still working on that one....there're some performance issue that we want like to work on before releasing it.

If you really want to try Q2-USB in a Linux environment, we do have HIL SDK that supports Q2-USB for the pi (https://github.com/quanser/hil_sdk_linux_pi_3). Although it is built against pi3, it shoudl work on pi4 as well. Note however that the SDK is built as 32-bit, so I'm not sure if it will run in 64-bit Raspbian OS.

Regarding libhil.so, in previous versions of HIL SDK, we put the file in the same directory as the other "HIL driver" .so files, but in the latest HIL SDK, we've moved it to /opt/quanser/lib/libhil.so, and we have a symolic link in /usr/lib/ to point to it. We did that to make it easier for the system to find libhil.so (so you don't have to add /opt/quanser/lib to the PATH).

@colombojrj
Copy link
Author

I understand. I do have a rpi3 and I will try to test it. Thanks.

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

2 participants