RaccoonLab tools
Project description
Cyphal/DroneCAN nodes tools
tools
is a collection of scripts for testing and configuration of Cyphal/CAN and DroneCAN nodes.
This package is under development. It is avaliable in test.pypi at the moment.
Preparation
-
Install the package either from test.pypi or from sources:
pip install -i https://test.pypi.org/simple/ raccoonlab-tools
git clone https://github.com/PonomarevDA/tools.git cd tools pip install .
-
Clone the nodes config files somewhere. We recommend
~/.raccoonlab_tools/vendors
For example:mkdir -p ~/.raccoonlab_tools/vendors/raccoonlab cd ~/.raccoonlab_tools/vendors/raccoonlab git clone https://github.com/RaccoonlabDev/raccoonlab_nodes_configs.git .
-
Install additional dependencies if you want to upload a firmware with STM32-programmer:
- On ubuntu install stlink,
- On Windows install STM32CubeProgrammer to the default directory.
-
Before working with a Cyphal node, you should configure the Cyphal-related environment variables. Check Cyphal for help. You can use scripts/cyphal as a hint.
1. Test cyphal specification
rl-test-cyphal-specification
2. Test dronecan specification
rl-test-dronecan-specification
rl-test-dronecan-gps-mag-baro
3. Get Node Info (Cyphal / DroneCAN)
rl-get-info
Return:
- Online CAN-sniffers
- Detect protocol if any CAN-node is avaliable: cyphal | dronecan | none
- Show node info of Cyphal/CAN or DroneCAN node if it is avaliable
4. Upload firmware with st-link linux / STM32CubeProgrammer Windows
rl-upload-firmware --config PATH_TO_YAML_CONFIG
rl-upload-firmware --binary PATH_TO_BIN_FILE
There are a few ways how you can specify the path to the binary:
- (recommended) Using a GitHub Repository. It will always download the latest released firmware.
# config.yaml
metadata:
link: RaccoonlabDev/mini_v2_node
- Direct Link to the Firmware File
# config.yaml
metadata:
link: https://github.com/RaccoonlabDev/docs/releases/download/v1.6.5/gnss_v2_cyphal_v1.6.5_c78d47c3.bin
- Using a Local Path
# config.yaml
metadata:
link: /user/home/firmwares/node.bin
- Direct .bin path with
--binary
option
5. Upload config
rl-config --config PATH
Example of yaml config file:
# config.yaml
params:
uavcan.node_id: 31
uavcan.node.name: co.rl.mini
6. Monitor
rl-monitor
This script is used for automated node analysis. Within a single command:
- detect the protocol (Cyphal or DroneCAN),
- detect the node type,
- check the software version and highlight if it is not the latest,
- configure it if it has not been configured yet,
- subscribes on all possible topics,
- provide basic tests and diagnostics, highlight issues,
- publish some test commands if possible,
- print all data in real time.
An example of rl-monitor
with gnss node:
7. U-center with Cyphal GNSS
rl-ublox-center
For RL GNSS it is possible to run u-center over Cyphal via gps.ubx_tx
and gps.ubx_rx
topics.
- Download u-center (tested with u-center 23.08)
- Run the u-center. On ubuntu you can use wine (
wine64 u-centersetup_v23.08/u-center_v23.08.exe
) - Configure the Cyphal environment
- Run the script
rl-ublox-center
- Press Receiver - > Connection -> Network connection
- Add new connection
tcp://127.0.0.1:2001
An illustration:
Developer notes
Deploy to TestPyPI:
./scripts/deploy.sh
Deploy to PyPI:
./scripts/deploy.sh --pypi
License
The scripts are distributed under MIT license. In general, you can do with them whatever you want. If you find a bug, please suggest a PR or an issue.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for raccoonlab_tools-0.0.16-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cdced9042df8d2e8538f3ab959ab06f2107410458e6cf433d3b3d2478332b131 |
|
MD5 | 38c4f0f7f9d03759f03c1ef8c9416e93 |
|
BLAKE2b-256 | 3423f1b6cab3c10e746772bd7d386affb7f727170a43fd2762c071b3b4bbaa12 |