-
Notifications
You must be signed in to change notification settings - Fork 3
For end‐users
choiwd edited this page Aug 4, 2023
·
1 revision
See /example to check an example implementation of the Follow Reference maneuver.
- Fancying a virtual env? (Not needed. Just in case you want to isolate it from your python setup)
$ sudo apt install python3.8-venv
$ python3 -m venv tutorial_env
$ source tutorial_env/bin/activate- To use:
$ pip3 install pyimclsts
$ # or, if you are cloning the repo, from the folder pyproject.toml is located:
$ pip3 install .- Choose a folder and have a version of the IMC schema. Otherwise, it will fetch the latest IMC version from the LSTS git repository. Extract messages locally, with:
$ python3 -m pyimclsts.extractThis will locally extract the IMC.xml as python classes. You will see a folder called pyimc_generated which contains base messages, bitfields and enumerations from the IMC.xml file. They can be locally loaded using, for example:
import pyimc_generated as pgIn the top-level module, you will find some functions to allow you to connect to a vehicle and subscribe to messages, namely, a subscriber class.
import pyimclsts.network as n
conn = n.tcp_interface('localhost', 6006)
sub = n.subscriber(conn)Check /example for a better example.