Skip to main content

python-openimu

A message communication tool for OpenIMU, OpenRTK and other devices of Aceinna

Working Environment

  • Windows10: python 3.7
  • Mac OS: python 3.7

Steps

1. Start the tool

There are 3 ways to run the tool

Prepare

  1. Install the dependency library. It is better to create a virtual environment before to do it.
$ pip install -r requirements.txt
  1. Install pcap api library(optional). Because we try to support INS401 a new device from Aceinna. It would use 100BASE-T1 ethernet, and the data transfer is in low-level of network, so we need help of pcap api. Actually, we integrated scapy in our project. The pcap api library is the dependency of scapy. If you are using a INS401 device, please also install the library based on your platform.
Platform Libraray Reference
Windows npcap https://scapy.readthedocs.io/en/latest/installation.html#windows
Ubuntu tcpdump https://scapy.readthedocs.io/en/latest/installation.html#debian-ubuntu-fedora
Mac libpcap https://scapy.readthedocs.io/en/latest/installation.html#mac-os-x

A. From source code

Run

Please use this way if you want to contribute the project.

$ python main.py

B. Work as execution file

Build

The executable will be generated in dist folder.

$ pyinstaller build.spec
Run
$ cd dist
$ ./ans-devices

C. From pip

Install
$ pip install openimu
Run
$ openimu

Startup Arguments

You can specify some arguments while run the tool

Arguments:

Name Type Default Description
-i, --interface String 'default' Value should be uart, eth, 100base-t1
-p, --port Number '8000' Value should be an available port
--device-type String 'auto' Value should be one of IMU, RTK, DMU
-b, --baudrate String None Value should be a valid baudrate. The valid value should be one of 38400, 57600, 115200, 230400, 460800
-c, --com-port String 'auto' Value should be a COM port
--console-log Boolean False Output log on console
--debug Boolean False Log debug information
--with-data-log Boolean False Contains internal data log (OpenIMU only)
-s, --set-user-para Boolean False Set uesr parameters (OpenRTK only)

2. Connect Aceinna device

Link device to your pc or mac. The tool will auto detect the linked device by default.

More Usage

Work Mode

Default Mode

Normally, python-openimu works as default mode. It will establish a websocket server, then exchange messages through the websocket protocol. And it should work with aceinna developers site, it allows user to do data monitor, configuration and firmware management.

Command Line Mode

You can specify the startup argument --cli to switch to Command Line Mode. Command Line Mode helps you interact with device directly. And it also supply command to start a websocket server, so that you can use the full features of Default Mode.

Command Line Mode supports some commands for using, below is a list of commands description,

Help

Show help menu. It would show a list of description for all supported commands.

$ help

Get Device Info

Show information of connected device.

$ connect

Get Parameter (OpenIMU Only)

Retrieve current value of specified parameter.

$ get param_name

Set Parameter (OpenIMU Only)

Update the value of specified parameter. The value would be recoverd after device power off.

$ set param_name param_value

Save Configuration

Save the configuration into EEPROM. The value would be permanently saved.

$ save

Record Data (OpenIMU Only)

Log the device output data in path /data. It is not supported for OpenRTK, because OpenRTK device will automatically log data when it is connected.

$ record

Upgrade Firmware

Upgrade firmware from a specified path. The binary file should match with the device. This is a high risk command.

$ upgrade path/to/bin

Start Server

Establish a websocket server.

$ server_start

Stop Server

Stop the websocket server. If there is websocket server runing, it has to stop it when you want to use other command.

$ stop

Exit

Quit from Command Line Mode

$ exit

Interface

Aceinna Device could be connected with your PC via UART or LAN. The supported interface is depended on the device type.

Device Type Supported Protocols Description
DMU uart
OpenIMU uart
OpenRTK uart, eth The startup argument -i eth is supported
RTK330L uart
INS401 100base-t1 The startup argument -i 100base-t1 is supported

Parse Tool

There is a log parse tool integrated in. It could parse OpenRTK, RTK330LA, INS401 raw data log from data folder. Assgin parse to start it.

Arguments:

Name Type Default Description
-t String 'openrtk' Switch work mode. Value should be one of openrtk,rtkl,ins401
-p String '.' Value should be a valid path. It could be the container folder of log files
-i Number 5 INS kml rate(hz)

Example

Run from source code

$ python main.py parse

Work as execution file

$ ans-devices parse

Run from pip

$ openimu parse

Changelogs and Release Notes

Please refer to HISTORY.md

Metadata

Release files for openimu 2.6.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for openimu 2.6.1
File Size Uploaded Provenance Actions
openimu-2.6.1.tar.gz 446.1 kB Without provenance Details for openimu-2.6.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for openimu 2.6.1
File Interpreter ABI Platform Actions
openimu-2.6.1-py3-none-any.whl Python 3 none any Details for openimu-2.6.1-py3-none-any.whl

Total release size: 991.0 kB

Release files / openimu-2.6.1.tar.gz

Download URL openimu-2.6.1.tar.gz
Size 446.1 kB
Tags Source
SHA-256 checksum
How to use checksums
d3925878835824eac3e605816776e24a4cc0b8f83ad814a0e64259b68f1c61df
BLAKE2b-256 checksum
How to use checksums
00a797b88a209b8571fd14bbb7f4e0b6206e6638cc49c15c48aa564d2bed1dad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.4.3 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.0

Release files / openimu-2.6.1-py3-none-any.whl

Download URL openimu-2.6.1-py3-none-any.whl
Size 544.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
176cda345c14cd74a1cd50aa040256914e38c9a4249ff7df162a136bb60a7e35
BLAKE2b-256 checksum
How to use checksums
8367a9fadcb3f2db2d0735b10e1c57a63989e013c2a4da00ca9f3644afb5f305
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.4.3 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.0

Security for openimu 2.6.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page