Coder Social home page Coder Social logo

x-imu3-software's Introduction

tag build pypi python License

x-IMU3 Software

This is main software repository for the x-IMU3. The repository includes the x-IMU3 GUI and APIs with examples for C, C++, C#, Python, and Rust. The x-IMU3 GUI is written in C++ using JUCE. The core API is written in Rust with a generated C interface layer. APIs in all other languages are wrappers for the C interface layer.

Development Setup

  1. Install C++ toolchain
  2. Install Rust toolchain using rustup
  3. Install Clion, including Rust plugin
  4. Configure Clion toolchain (Windows)
    • Settings > Build, Execution, Deployment > Toolchains > Add > Visual Studio, Architecture: x86_amd64
  5. Select Ninja to improve compile time (Windows)
    • Settings > Build, Execution, Deployment > CMake > Generator: Ninja

Distributions

Licence

The x-IMU3 Software is covered by the MIT Licence except for the x-IMU3 GUI which uses JUCE and so is covered by the GNU GPLv3 License as per the JUCE 7 EULA.

x-imu3-software's People

Contributors

jellebakker avatar xiotechnologies avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

x-imu3-software's Issues

trying to install the development setup

You can help me to understand, why i'm getting this error mensagens when i try to run this repo? i have made everything that was indicate on Development Setup section.

[149/229] Linking CXX executable Examples\Cpp\Cpp-Examples.exe
FAILED: Examples/Cpp/Cpp-Examples.exe 
cmd.exe /C "cd . && C:\PROGRA~1\JETBRA~1\CLION2~1.3\bin\mingw\bin\G__~1.EXE -g  Examples/Cpp/CMakeFiles/Cpp-Examples.dir/main.cpp.obj -o Examples\Cpp\Cpp-Examples.exe -Wl,--out-implib,Examples\Cpp\libCpp-Examples.dll.a -Wl,--major-image-version,0,--minor-image-version,0  C:/Users/danig/Documents/GitHub/x-IMU3-Software/x-IMU3-API/Rust/target/release/ximu3.lib  -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 && cd ."
Warning: corrupt .drectve at end of def file
C:\Program Files\JetBrains\CLion 2023.1.3\bin\mingw\bin/ld.exe: Examples/Cpp/CMakeFiles/Cpp-Examples.dir/main.cpp.obj: in function `ximu3::DataLogger::getResult()':
C:/Users/danig/Documents/GitHub/x-IMU3-Software/x-IMU3-API/Cpp/DataLogger.hpp:25: undefined reference to `XIMU3_data_logger_get_result'
C:\Program Files\JetBrains\CLion 2023.1.3\bin\mingw\bin/ld.exe: Examples/Cpp/CMakeFiles/Cpp-Examples.dir/main.cpp.obj: in function `ximu3::NetworkAnnouncement::getResult()':
C:/Users/danig/Documents/GitHub/x-IMU3-Software/x-IMU3-API/Cpp/NetworkAnnouncement.hpp:26: undefined reference to `XIMU3_network_announcement_get_result'
C:\Program Files\JetBrains\CLion 2023.1.3\bin\mingw\bin/ld.exe: C:/Users/danig/Documents/GitHub/x-IMU3-Software/x-IMU3-API/Rust/target/release/ximu3.lib(ximu3-9d51039fde32745d.ximu3.0eefa5cf-cgu.6.rcgu.o):ximu3.0eefa5cf-cgu:(.xdata[$cppxdata$_ZN107_$LT$alloc..boxed..Box$LT$$u5b$I$u5d$$GT$$u20$as$u20$core..iter..traits..collect..FromIterator$LT$I$GT$$GT$9from_iter17he6755c612336f861E]+0x2c): undefined reference to `__CxxFrameHandler3'
C:\Program Files\JetBrains\CLion 2023.1.3\bin\mingw\bin/ld.exe: C:/Users/danig/Documents/GitHub/x-IMU3-Software/x-IMU3-API/Rust/target/release/ximu3.lib(ximu3-9d51039fde32745d.ximu3.0eefa5cf-cgu.6.rcgu.o):ximu3.0eefa5cf-cgu:(.xdata[$cppxdata$_ZN17crossbeam_channel7channel15Sender$LT$T$GT$4send17h1836224e2fcb7d55E]+0x10): undefined reference to `__CxxFrameHandler3'
C:\Program Files\JetBrains\CLion 2023.1.3\bin\mingw\bin/ld.exe: C:/Users/danig/Documents/GitHub/x-IMU3-Software/x-IMU3-API/Rust/target/release/ximu3.lib(ximu3-9d51039fde32745d.ximu3.0eefa5cf-cgu.6.rcgu.o):ximu3.0eefa5cf-cgu:(.xdata[$cppxdata$_ZN17crossbeam_channel7channel15Sender$LT$T$GT$4send17h62e50a5a41aefd23E]+0x14): undefined reference to `__CxxFrameHandler3'

appropriate Python tool/method to integrate IMU data with my existing code

I am implementing an algorithm for object pose estimation, where position is estimated by a camera+Tag system, and orientation is fused using the camera+Tag and IMU orientation reading.
I already have the python code for computing position and orientation through a camera + Tag system , as well as the sensor fusing algorithm.
My question is about the best approach to integrate IMU data reading into my existing setup for object pose estimation.
One idea is to send out the orientation through sockets, and use a different python file to read the real-time data, but I am encountering some issues. Not sure what the best approach is.
Any suggestions would be appreciated! Thanks!

Feature Request: Implement a `ReadAll` settings command

I've noticed that the x-IMU3 GUI sends out all 79 readSetting commands on startup. Would it be easier to have the host send a single readAll command that has the device send all of its settings in one shot, rather than overload the device receiving buffer with requests. Then, memory usage and processing time on the device can be lowered since only a fraction of commands need to be processed. It also allows for new settings to be dynamically added without needing to implement an additional readSetting command on startup.

I have already added support for this in my Arduino implementation of the xioAPI

Python API under linux

The python api is almost functional in Debian with the modification from in setup.py to add:


elif platform.system() == "Linux":
    libraries = ["ximu3", "udev"]

However using gdb to run python, on the python examples directory I can test the usb_connection with:

gdb python 
GNU gdb (Debian 10.1-1.7) 10.1.90.20210103-git
Copyright (C) 2021 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from python...
(No debugging symbols found in python)
(gdb) run
Starting program: /usr/bin/python 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Python 3.9.2 (default, Feb 28 2021, 17:03:44) 
[GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import usb_connection
Search for connections? [Y/N]
Y
Searching for connections
[New Thread 0x7ffff7140700 (LWP 8529)]
[New Thread 0x7ffff6f3f700 (LWP 8530)]
[New Thread 0x7ffff6d3e700 (LWP 8531)]
[New Thread 0x7ffff6b3d700 (LWP 8532)]
[New Thread 0x7ffff693c700 (LWP 8533)]
[Thread 0x7ffff6b3d700 (LWP 8532) exited]
[Thread 0x7ffff693c700 (LWP 8533) exited]
[Thread 0x7ffff6d3e700 (LWP 8531) exited]
Found x-IMU3 - 814C-5410-EC7B-D236
[New Thread 0x7ffff6d3e700 (LWP 8534)]
Print data messages? [Y/N]
[Thread 0x7ffff6f3f700 (LWP 8530) exited]
[Thread 0x7ffff7140700 (LWP 8529) exited]
Y
Connecting to USB - /dev/ttyACM0
[New Thread 0x7ffff7140700 (LWP 8535)]
[New Thread 0x7ffff6f3f700 (LWP 8536)]
Connection successful
3278799606 us    0.441 g   -1.274 g    2.842 g
3278800968 us   53.329 a.u.    6.430 a.u. -160.386 a.u.
3278811115 us    0.066 deg/s   -0.074 deg/s   -0.020 deg/s   -0.012 g    0.010 g    1.022 g
3278811115 us    1.000    0.002    0.005    0.032
3278820257 us    0.490 g   -1.274 g    2.891 g
3278831177 us   -0.056 deg/s   -0.074 deg/s    0.026 deg/s   -0.007 g    0.004 g    1.010 g
3278831177 us    1.000    0.002    0.005    0.032
3278840908 us    0.490 g   -1.274 g    2.842 g
3278850891 us   53.329 a.u.    6.052 a.u. -160.840 a.u.
3278851240 us   -0.162 deg/s   -0.036 deg/s    0.087 deg/s   -0.006 g    0.002 g    1.011 g
3278851240 us    1.000    0.002    0.005    0.032
3278861558 us    0.539 g   -1.225 g    2.842 g
3278871302 us   -0.231 deg/s   -0.028 deg/s    0.056 deg/s   -0.008 g    0.001 g    1.010 g
3278871302 us    1.000    0.002    0.005    0.032
3278882208 us    0.588 g   -1.274 g    2.891 g
3278891364 us   -0.245 deg/s    0.079 deg/s    0.026 deg/s   -0.012 g   -0.002 g    1.014 g
3278891364 us    1.000    0.002    0.005    0.032
3278900827 us   53.708 a.u.    5.673 a.u. -160.409 a.u.
3278902858 us    0.588 g   -1.225 g    2.842 g
3278911427 us    0.205 deg/s    0.048 deg/s    0.102 deg/s   -0.013 g   -0.001 g    1.010 g
3278911427 us    1.000    0.002    0.005    0.032
3278923508 us    0.588 g   -1.274 g    2.891 g
3278931490 us    0.273 deg/s   -0.021 deg/s    0.101 deg/s   -0.013 g    0.002 g    1.013 g
3278931490 us    1.000    0.002    0.005    0.032
3278944159 us    0.539 g   -1.274 g    2.842 g
3278950733 us   53.708 a.u.    5.673 a.u. -160.409 a.u.
3278951552 us    0.150 deg/s   -0.028 deg/s   -0.036 deg/s   -0.007 g    0.009 g    1.008 g
3278951552 us    1.000    0.002    0.005    0.032
3278964809 us    0.588 g   -1.225 g    2.891 g
3278971614 us    0.059 deg/s   -0.066 deg/s   -0.005 deg/s   -0.008 g    0.010 g    1.011 g
3278971614 us    1.000    0.002    0.005    0.032

Thread 1 "python" received signal SIGSEGV, Segmentation fault.
0x0000000000606481 in PyList_Size ()

When trying to run the udp_connection.py example I run into a different error:

gdb python
GNU gdb (Debian 10.1-1.7) 10.1.90.20210103-git
Copyright (C) 2021 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from python...
(No debugging symbols found in python)
(gdb) run
Starting program: /usr/bin/python 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Python 3.9.2 (default, Feb 28 2021, 17:03:44) 
[GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import udp_connection
Search for connections? [Y/N]
Y
Searching for connections
[New Thread 0x7ffff7140700 (LWP 8036)]
*** stack smashing detected ***: terminated

Thread 1 "python" received signal SIGABRT, Aborted.
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
50	../sysdeps/unix/sysv/linux/raise.c: No such file or directory.

What is the correct response to "{"serialRtsCtsEnabled":null}"

Hi, very good GUI for AHRS applications.
I am trying to porting my own sensor to this wonderful GUI, serial connection already done, but for the {"serialRtsCtsEnabled":null} command still can't pass.

according to user manual, I write code to send back json response as: {"serialRtsCtsEnabled":false}
But I get the response on GUI like: Unable to confirm command {"serialRtsCtsEnabled":null} for Serial xx

If the response is not : {"serialRtsCtsEnabled":false}, then what is the correct one?

Contribution, Licensing and Usage Policy

Hello Team,

First of all, congratulations on your great project.

I am confused with the licensing because the main project is GPL-3. But at the same time, the API code for the sensor connection is distributed in PyPI for Python and Crates for Rust with MIT. In both platforms, the code reference is pointing to this repository.

I assume the code of the Python package published in PyPI is: https://github.com/xioTechnologies/x-IMU3-Software/tree/main/x-IMU3-API/Python

The code of the Rust package published in Crates is: https://github.com/xioTechnologies/x-IMU3-Software/tree/main/x-IMU3-API/Rust

While the MIT license allows these packages to be used in third-party developments for Python and Rust, they do not allow the use of the code that is in this repository because it is marked as GPL-3. This circumstance does not allow contributions to be made to the package code, nor to directly use the code of those distributions because all code must be distributed with the GPL-3 due to this license. Is this what is expected?

This situation does not allow, for example, to include the package in vcpkg to be distributed as is the case with Python and Rust. I could collaborate on this if the license was correct because I cannot legally re-license part of a GPL-3 repository to be MIT in its distribution.

Maybe what you want is to protect general apps with GPL-3, but then you want to facilitate the use of sensors by publishing MIT-licensed packages in different languages, as seems to be the case in this repository path:

In this case, the normal thing is to generate a repository with its own MIT license for each connector in each language and then include them in the repository as Git submodules. This also makes code reusability much easier.

If this is too much trouble it is also possible to enter licenses in the subdirectories, but this is less clear and would require an explanatory note somewhere.

All these comments have no other objective than to maximize collaboration and use of the project while respecting the license agreement, which must be clear.

ℹ️ More info about software licenses and each clause: https://choosealicense.com/appendix/

Trying to Integrate xio API Onto Custom Embedded Board

I have been trying to integrate the IMU API onto my custom board and am having trouble getting the data to show up in the GUI. My implementation writes the "Euler angles message" to the serial port at 20 Hz. The angles are computed from the Fusion library and are good. Below is a sample of the output information:

A,1075887198,-0.0458,2.5299,-124.4267
A,1075941199,-0.0470,2.4980,-124.6745
A,1075995199,-0.0449,2.4367,-124.9043
A,1076049199,-0.0435,2.3313,-125.1606
A,1076103199,-0.0460,2.2200,-125.3819
A,1076157199,-0.0500,2.0731,-125.5776
A,1076211199,-0.0540,1.9971,-125.7597
A,1076265199,-0.0547,1.9035,-125.9520
A,1076319199,-0.0610,1.7915,-126.1387
A,1076378183,-0.0665,1.6960,-126.3233
A,1076432199,-0.0700,1.6098,-126.4728
A,1076486199,-0.0681,1.5323,-126.6172
A,1076540199,-0.0690,1.4572,-126.8056
A,1076594199,-0.0731,1.3591,-126.9686
A,1076648199,-0.0755,1.2729,-127.0300
A,1076702199,-0.0840,1.1683,-127.1952
A,1076756199,-0.0879,1.0820,-127.2724
A,1076810199,-0.0886,1.0126,-127.3917
A,1076864199,-0.0942,0.9440,-127.5378

Note that each line is followed with \r\n, it is just not displayed in the terminal output.

Is there an implementation issue on my end, or does the GUI require a handshake before it can start displaying data?

Arduino-compatible library for xioAPI

As I've been working on integrating the xioAPI onto my custom board, I have forked a repository from Reefwing. But their library is limited and relies on their common hardware libraries.

I'd like to develop a general library that can be deployed onto Arduino-compatible microcontrollers. Would it be possible for you to release the files you use for the x-IMU3 and its API implementation? Else, help me develop a generalized library. My current effort can be found in the ThetisAPI repo.

My end goal is to develop a package that can be downloaded onto Arduinos with IMUs and be instantly compatible with the x-IMU GUI.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.