Observed since 21 Oct, 09:27 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
agrotechsimapi
Python API and calibrated autonomous flight control for AgroTechSim
AgroTechSim API — это Python-библиотека для работы с симулятором AgroTechSim, предназначенная для получения телеметрии с дронов, обработки сенсорных данных и реализации систем автономного управления. Библиотека предоставляет как низкоуровневый доступ к сырым данным сенсоров, так и высокоуровневые абстракции для упрощённого управления дроном.
Модуль позволяет разработчикам создавать сложные алгоритмы компьютерного зрения, навигации и управления без необходимости работы с реальным оборудованием, используя полнофункциональный симулятор дронов.
| Компонент | Версия | Статус |
|---|---|---|
| AgroTechSim API | 1.0.1-v1.0.2 | ✅ Compatible with AgroTechSim 1.0.3 |
| AgroTechSim API | 1.0.3 | ✅ Compatible with AgroTechSim 1.0.4-1.0.5 |
| Python | 3.10 | ✅ Recommended |
| InavMSPApi | 1.1.0 | ✅ Dependency |
pip install agrotechsimapi
Этот способ автоматически установит все зависимости, включая inavmspapi требуемой версии.
git clone https://github.com/AgroTechAvia/TechSimApi.git
cd TechSimApi
python setup_by_source.py
Скрипт автоматически установит все зависимости и настроит окружение.
# 1. Создайте виртуальное окружение
python -m venv .venv
# 2. Активируйте окружение
# Windows:
.venv\Scripts\activate
# Linux/Mac:
source .venv/bin/activate
# 3. Установите inavmspapi
git clone https://github.com/AgroTechAvia/InavMSPApi.git
cd InavMSPApi
git checkout v1.1.0
pip install .
# 4. Установите agrotechsimapi
cd ..
git clone https://github.com/AgroTechAvia/TechSimApi.git
cd TechSimApi
pip install .
SimClient)HighLevelSimClient)edu-ext, edu-constructor и edu можно выбрать при создании клиента; отдельные регуляторы по-прежнему можно переопределять вручную.В репозитории представлены готовые примеры:
examples_low_level/ - Низкоуровневые примерыexamples_high_level/ - Высокоуровневые примерыfrom agrotechsimapi import SimClient, CaptureType
import cv2
# Подключение к симулятору
client = SimClient(address="127.0.0.1", port=8080)
# Получение изображения с камеры
image = client.get_camera_capture(camera_id=0, type=CaptureType.color)
# Отображение изображения
cv2.imshow("Drone Camera", image)
cv2.waitKey(0)
cv2.destroyAllWindows()
По умолчанию HighLevelSimClient использует встроенный профиль edu-ext.
Профиль можно выбрать по имени:
from agrotechsimapi import HighLevelSimClient
client = HighLevelSimClient(calibration="edu")
Посмотреть доступные профили и создать конфигурацию новой калибровки:
python -m agrotechsimapi calibrations list
python -m agrotechsimapi calibrations init-config --output calibration.json
Сначала рекомендуется проверить план без подключения к симулятору, а затем
запустить полёт с --fly:
python -m agrotechsimapi calibrate --name my_drone --config calibration.json
python -m agrotechsimapi calibrate --name my_drone --config calibration.json --fly
Калибратор последовательно настраивает высоту, yaw, ускорение XY, скорость XY и положение XY. Посмотреть текущий запуск или готовый профиль можно в автономном HTML-отчёте:
python -m agrotechsimapi plot --current --last 8 --open
python -m agrotechsimapi plot --calibration my_drone --open
Профили можно переносить между окружениями:
python -m agrotechsimapi calibrations export my_drone --output my_drone.json
python -m agrotechsimapi calibrations import my_drone.json --name imported_drone
Подробности находятся в практической инструкции и техническом описании.
Для проверки корректной работы модуля с симулятором используйте интеграционные тесты. Файл test_sim_client_real.py содержит тесты, которые проверяют подключение к симулятору и работу всех основных функций.
# Перейдите в директорию проекта
cd TechSimApi
# Запустите тесты с симулятором
pytest test/test_sim_client_real.py --with-simulator -v
Тест test_sim_client_real.py последовательно проверяет:
============================================================
Running SimClient Integration Tests with Real Simulator
============================================================
test_connection: ✓ PASSED
test_get_camera_capture: ✓ PASSED
test_get_kinematics_data: ✓ PASSED
test_get_range_data: ✓ PASSED
test_get_laser_scan: ✓ PASSED
test_get_radar_point: ⚠ SKIPPED (Radar not available)
test_led_control: ✓ PASSED
test_image_processing_methods: ✓ PASSED
test_multiple_camera_ids: ✓ PASSED
test_call_event_action: ✓ PASSED
test_error_handling: ✓ PASSED
test_performance: ✓ PASSED
✅ Все основные функции работают корректно!
from agrotechsimapi import SimClient
client = SimClient()
print(f"Connected: {client.is_connected()}")
# Linux/Mac
nc -z localhost 8080
# Windows
Test-NetConnection -ComputerName localhost -Port 8080
Тестирование позволяет убедиться, что все компоненты модуля работают корректно с текущей версией симулятора.
AgroTechSim API is a Python library for working with the AgroTechSim simulator, designed for obtaining drone telemetry, processing sensor data, and implementing autonomous control systems. The library provides both low-level access to raw sensor data and high-level abstractions for simplified drone control.
The module enables developers to create complex computer vision, navigation, and control algorithms without the need for real hardware, using a full-featured drone simulator.
| Component | Version | Status |
|---|---|---|
| AgroTechSim API | 1.0.1-v1.0.2 | ✅ Works with AgroTechSim 1.0.3 |
| AgroTechSim API | 1.0.3 | ✅ Works with AgroTechSim 1.0.4-1.0.5 |
| Python | 3.10 | ✅ Recommended |
| InavMSPApi | 1.1.0 | ✅ Dependency |
pip install agrotechsimapi
This method will automatically install all dependencies, including the required version of inavmspapi.
git https://github.com/AgroTechAvia/TechSimApi.git
cd TechSimApi
python setup_by_source.py
The script will automatically install all dependencies and set up the environment.
# 1. Create a virtual environment
python -m venv .venv
# 2. Activate the environment
# Windows:
.venv\Scripts\activate
# Linux/Mac:
source .venv/bin/activate
# 3. Install inavmspapi
git clone https://github.com/AgroTechAvia/InavMSPApi.git
cd InavMSPApi
git checkout v1.1.0
pip install .
# 4. Install agrotechsimapi
cd ..
git clone https://github.com/AgroTechAvia/TechSimApi.git
cd TechSimApi
pip install .
SimClient)HighLevelSimClient)edu-ext, edu-constructor, or edu when creating the client; individual controllers can still be overridden manually.The repository includes ready-to-use examples:
examples_low_level/ - Low-level examplesexamples_high_level/ - High-level examplesfrom agrotechsimapi import SimClient, CaptureType
import cv2
# Connect to simulator
client = SimClient(address="127.0.0.1", port=8080)
# Get camera image
image = client.get_camera_capture(camera_id=0, type=CaptureType.color)
# Display image
cv2.imshow("Drone Camera", image)
cv2.waitKey(0)
cv2.destroyAllWindows()
HighLevelSimClient uses the bundled edu-ext profile by default. Select a
different profile by name:
from agrotechsimapi import HighLevelSimClient
client = HighLevelSimClient(calibration="edu")
List available profiles and create an editable calibration configuration:
python -m agrotechsimapi calibrations list
python -m agrotechsimapi calibrations init-config --output calibration.json
Preview the plan first, then add --fly to connect to the simulator:
python -m agrotechsimapi calibrate --name my_drone --config calibration.json
python -m agrotechsimapi calibrate --name my_drone --config calibration.json --fly
The workflow tunes altitude, yaw, XY acceleration, XY velocity and XY position in sequence. Generate a one-time HTML snapshot of the active run or a completed profile with:
python -m agrotechsimapi plot --current --last 8 --open
python -m agrotechsimapi plot --calibration my_drone --lang en --open
Export and import profiles between environments or computers:
python -m agrotechsimapi calibrations export my_drone --output my_drone.json
python -m agrotechsimapi calibrations import my_drone.json --name imported_drone
See the practical calibration guide and the technical reference for details.
To verify that the module works correctly with the simulator, use the integration tests. The test_sim_client_real.py file contains tests that check the connection to the simulator and the operation of all main functions.
localhost:8080# Go to the project directory
cd TechSimApi
# Run tests with simulator
pytest tests/test_sim_client_real.py --with-simulator -v
The test_sim_client_real.py test sequentially verifies:
============================================================
Running SimClient Integration Tests with Real Simulator
============================================================
test_connection: ✓ PASSED
test_get_camera_capture: ✓ PASSED
test_get_kinematics_data: ✓ PASSED
test_get_range_data: ✓ PASSED
test_get_laser_scan: ✓ PASSED
test_get_radar_point: ⚠ SKIPPED (Radar not available)
test_led_control: ✓ PASSED
test_image_processing_methods: ✓ PASSED
test_multiple_camera_ids: ✓ PASSED
test_call_event_action: ✓ PASSED
test_error_handling: ✓ PASSED
test_performance: ✓ PASSED
✅ All main functions work correctly!
from agrotechsimapi import SimClient
client = SimClient()
print(f"Connected: {client.is_connected()}")
# Linux/Mac
nc -z localhost 8080
# Windows
Test-NetConnection -ComputerName localhost -Port 8080
Testing allows you to ensure that all module components work correctly with the current simulator version.
Download counts and popularity will appear here as the collector receives them.
| Package / target | Requirement | Relationship |
|---|---|---|
backports.ssl-match-hostnameEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.10",
"evaluation": "NOT_EVALUATED"
} | backports.ssl-match-hostname | runtime |
contourpyEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.10",
"evaluation": "NOT_EVALUATED"
} | contourpy | runtime |
cyclerEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.10",
"evaluation": "NOT_EVALUATED"
} | cycler | runtime |
fonttoolsEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.10",
"evaluation": "NOT_EVALUATED"
} | fonttools | runtime |
FlaskEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.10",
"evaluation": "NOT_EVALUATED"
} | Flask<4,>=3.0 | runtime |
futureEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.10",
"evaluation": "NOT_EVALUATED"
} | future | runtime |
grpcioEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.10",
"evaluation": "NOT_EVALUATED"
} | grpcio | runtime |
grpcio-toolsEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.10",
"evaluation": "NOT_EVALUATED"
} | grpcio-tools | runtime |
iso8601Environment{
"extras": "",
"marker": null,
"requires_python": ">=3.10",
"evaluation": "NOT_EVALUATED"
} | iso8601 | runtime |
kiwisolverEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.10",
"evaluation": "NOT_EVALUATED"
} | kiwisolver | runtime |
matplotlibEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.10",
"evaluation": "NOT_EVALUATED"
} | matplotlib | runtime |
msgpack-pythonEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.10",
"evaluation": "NOT_EVALUATED"
} | msgpack-python | runtime |
msgpack-rpc-pythonEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.10",
"evaluation": "NOT_EVALUATED"
} | msgpack-rpc-python | runtime |
numpyEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.10",
"evaluation": "NOT_EVALUATED"
} | numpy | runtime |
opencv-contrib-pythonEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.10",
"evaluation": "NOT_EVALUATED"
} | opencv-contrib-python | runtime |
opencv-pythonEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.10",
"evaluation": "NOT_EVALUATED"
} | opencv-python | runtime |
packagingEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.10",
"evaluation": "NOT_EVALUATED"
} | packaging | runtime |
pillowEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.10",
"evaluation": "NOT_EVALUATED"
} | pillow | runtime |
protobufEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.10",
"evaluation": "NOT_EVALUATED"
} | protobuf | runtime |
pynputEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.10",
"evaluation": "NOT_EVALUATED"
} | pynput | runtime |
pyparsingEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.10",
"evaluation": "NOT_EVALUATED"
} | pyparsing | runtime |
python-dateutilEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.10",
"evaluation": "NOT_EVALUATED"
} | python-dateutil | runtime |
PyYAMLEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.10",
"evaluation": "NOT_EVALUATED"
} | PyYAML | runtime |
pyserialEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.10",
"evaluation": "NOT_EVALUATED"
} | pyserial | runtime |
sixEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.10",
"evaluation": "NOT_EVALUATED"
} | six | runtime |
tornadoEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.10",
"evaluation": "NOT_EVALUATED"
} | tornado | runtime |
transforms3dEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.10",
"evaluation": "NOT_EVALUATED"
} | transforms3d | runtime |
inavmspapiEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.10",
"evaluation": "NOT_EVALUATED"
} | inavmspapi | runtime |
bdist_wheel · 2,804.85 KB · Python py3
sdist · 2,780.43 KB · Python source
Observed since 21 Oct, 09:27 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package_version:52b02e09cd5016a47b7237e81a3eaee7e996509db2b2272b99f40312ffa7607c