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

GPIO::Tools::ToolsError on livox_sdk_1 branch #30

Open
MattiasTancred opened this issue Jan 15, 2025 · 12 comments
Open

GPIO::Tools::ToolsError on livox_sdk_1 branch #30

MattiasTancred opened this issue Jan 15, 2025 · 12 comments

Comments

@MattiasTancred
Copy link

I encountered the following error while running the repository on the livox_sdk_1 branch after following the installation instructions in the README:

./control_program
./led_demo
./button_demo

 terminate called after throwing an instance of 'GPIO::Tools::ToolsError'
   what(): cannot write file: Invalid argument

System Details:

Hardware: Raspberry Pi 4B
OS: Bookworm 64-bit

Are there any additional configurations required for the livox_sdk_1 branch on Bookworm 64-bit?

Any insights or suggestions would be greatly appreciated.

@JanuszBedkowski
Copy link
Owner

livox_sdk_1 branch is not much supported.
I will ask Michal for help.

@JanuszBedkowski
Copy link
Owner

Please try run it as root.

@michalpelka
Copy link
Collaborator

Hello @JanuszBedkowski, @MattiasTancred
It will not work. livox_sdk_1 branch is using dead library GpioLibCpp.
I've replaced it in main branch with this commit : 2e1453b

The issue you are experiencing is the issue #13

I recommend to rebase livox-sdk-1 branch on top of main and it should work.

@michalpelka
Copy link
Collaborator

Or we can think to add support for livox SDK 1 with cmake configuration. What do you think @JanuszBedkowski ?

@JanuszBedkowski
Copy link
Owner

It is an interesting idea for Livox AVIA users.

@MattiasTancred
Copy link
Author

Thank you @JanuszBedkowski and @michalpelka

I will proceed with rebasing the livox_sdk_1 branch on top of the main branch as suggested. If I encounter any issues I’ll reach out again.

Adding support for Livox SDK 1 with a CMake configuration would be perfect.

@michalpelka
Copy link
Collaborator

michalpelka commented Jan 16, 2025

Good Luck @MattiasTancred , reach me if you have any problem. It seems non-trivial at this moment.

@MattiasTancred
Copy link
Author

MattiasTancred commented Jan 17, 2025

Thank you for the helpful responses, @JanuszBedkowski and @michalpelka .

I think I need some experts :)

I’ve moved forward, rebased the livox_sdk_1 branch on-top of main. GPIO handling, button functionality, and LED indications are all working correctly. IMU and LiDAR data are also being read as expected (working with AVIA). However, I believe there’s a formatting issue with the IMU data output to .laz that doesn’t align with what HDMapping expects as input.

Could you provide guidance on the correct .laz output format for compatibility with HDMapping? Are there specific field requirements or transformations I should consider?

Any advice would be greatly appreciated!

@JanuszBedkowski
Copy link
Owner

Check if format is like this
timestamp gyroX gyroY gyroZ accX accY accZ imuId timestampUnix
1723390177448695880 -0.0234479 -0.00470489 -0.025444 -1.00205 -0.00775822 -0.00291577 0 1723390176459
1723390177451916910 -0.012972 -0.00205715 -0.0018907 0.000824815 0.0211757 0.995707 1 1723390176462
1723390177454260490 -0.0223826 -0.00470489 -0.025444 -0.999856 -0.00604924 -0.00291577 0 1723390176464
1723390177458391320 -0.0234479 -0.00363962 -0.0243787 -0.998392 -0.00946721 -0.00120679 0 1723390176468

@MattiasTancred
Copy link
Author

MattiasTancred commented Jan 18, 2025

After some additional tinkering, the issue has been resolved. There were references to SDK 2 in the livox_sdk_1 branch, which I had to address and more. Everything is functioning as expected.

The next step is to collect datasets to thoroughly test the sensor and evaluate its performance to HDMapping.

Thank you for your support! Let me know if there’s anything else I should consider.

@michalpelka
Copy link
Collaborator

Could you @MattiasTancred make tthis rebased branch public?
I am considering to add confiiguration for other SDKs than Livox SDK2.

@MattiasTancred
Copy link
Author

@michalpelka yes off-course. Give me a couple of days, I am trying out a STM32 microcontroller to reduced jitter to the Raspberry Pi via I2C. I will invite you to my fork, where you can access and use anything you need for the project.

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