A Python API for AVIS Engine (Autonomous Vehicles Intelligent Simulation Software) - a robust simulation platform for autonomous vehicle development and testing.
AVIS Engine provides a realistic simulation environment for developing and testing autonomous vehicle algorithms. This Python API allows you to easily interface with the simulator, control vehicles, and collect sensor data.
- Control vehicle throttle and steering
- Access real-time sensor data (distance sensors, radar, cameras)
- Retrieve vehicle telemetry (speed, position)
- Configure camera settings (FOV, position, resolution)
- Multiple simulation environments (race track, urban settings)
- Support for semantic segmentation and depth cameras
pip install -r requirements.txt
git clone https://github.com/AvisEngine/AVIS-Engine-Python-API
cd AVIS-Engine-Python-API
pip install avisengine
Download the latest simulator from the AVIS Engine website.
Version | Link |
---|---|
2.1.0 (Latest Beta) | Download |
2.0.1 (Stable) | Download |
- Open the simulator
- Select a track
- Click "Open Info Panel"
- Configure server settings:
- IP Address (Default: 127.0.0.1)
- Port (Default: 25001)
- Click "Start Server"
Here's a basic example to connect to the simulator and control the vehicle:
import avisengine
import config
import time
import cv2
# Create car instance
car = avisengine.Car()
# Connect to simulator
car.connect(config.SIMULATOR_IP, config.SIMULATOR_PORT)
# Wait for connection to establish
time.sleep(3)
try:
while True:
# Set throttle (range: -100 to 100)
car.setSpeed(20)
# Set steering (range: -100 to 100)
car.setSteering(-10)
# Configure sensors
car.setSensorAngle(40)
# Get updated data
car.getData()
# Retrieve sensor data
sensors = car.getSensors() # [left, middle, right] distances in cm
# Get camera image (OpenCV format)
image = car.getImage()
# Get vehicle speed (km/h)
speed = car.getSpeed()
# Display image
cv2.imshow('Camera', image)
if cv2.waitKey(10) == ord('q'):
break
time.sleep(0.001)
finally:
# Ensure the car stops when the program exits
car.stop()
connect(ip, port)
- Connect to the simulatorgetData()
- Retrieve the latest data from the simulatorstop()
- Stop the car and close the connection
setSpeed(value)
- Set throttle (-100 to 100)setSteering(value)
- Set steering angle (-100 to 100)setSensorAngle(angle)
- Set the angle between sensor rays
getSensors()
- Returns [left, middle, right] sensor distances in cmgetImage()
- Returns camera image as OpenCV compatible arraygetSpeed()
- Returns current speed in km/h
The simulator includes a checkerboard pattern for camera calibration. Access this feature in simulator version 1.0.5 or higher.
Calibration Example 1 | Calibration Example 2 |
---|---|
- ZMQ communication protocol
- Configuration file support
- Configurable camera settings (FOV, position, bird's-eye view)
- Configurable post-processing (DOF, bloom, color corrections)
- Semantic segmentation mode
- Depth camera support
- Radar sensor support
- Pub-sub pattern messaging system
- Major API update
- Updated image encoding
- Compressed TCP packets
- Added Utils.py and Config.py
- Added traffic system
- Improved lighting
- Higher resolution camera with better performance
- Adjustable camera resolution
- Message compression algorithm
- Defined
<EOF>
tag in transferred data - Adjustable front sensor angle
- Added KMP search for
<EOF>
detection
- Added new city environment
- Added fog effects
- General improvements
- Added localization (English, Persian, Russian, French, German, Chinese, Italian, Spanish, Japanese, Korean, Turkish)
- Visual and performance improvements
- Main menu redesign
- Added "About this simulator" and "Terms of use"
- Improved performance
- Added top speed slider
- Added "Right lane Only" toggle
- Added "Visible Sensor detection lines" toggle
- Added angle setting between sensors
- UI/UX improvements
- Improved lighting
- Low-poly vehicle model for better performance
- New checkpoint counting system
- New skyboxes and terrain maps
- Updated textures
- Improved tag material contrast (Urban)
- Added borders to signs and tags (Urban)
- Fixed raycast hit detection
- Added camera calibration checkerboard
- Added urban track
MIT License - See LICENSE file for details
For questions, issues, or feature requests:
Last updated: May 19, 2025