Xbox One controller, Fanatec DD1 wheels, adjustable rear view mirrors, share memory model between process routines.
This code demonstrates how to share carla data between different python processes via a shared memory dictionary.
Features
- Supports xbox one controller
- Supports Fanatec DD1 base & Wheels
- Mirror sensor camera images are processed and stored in a shared memory object
- Main simulation thread uses pygame window.
- Share memory is accessed by the mirror view routines and displayed using opencv
- Download and Install Carla Simualtor 0.9.13
- Download and Install AdditionalMaps_0.9.13.zip
- Install Python 3.8.10
- Install Poetry Dependency Management (https://python-poetry.org/docs/)
poetry install
- setup the environment- Ensure the Carla Simulator is running on localhost and listening to port 2000
.\CarlaUE4.exe -windowed -ResX=1024 -ResY=786 -carla-rpc-port=2000 -quality-level=High
- Set simulation parameters in
config.yaml
poetry run python sim_main.py
- main simulation threadpoetry run python mirror_views.py
- dual mirror viewspoetry run python right_mirror_view.py
- rigth mirror onlypoetry run python left_mirror_view.py
- left mirror only
NOTE: So far only testing on Windows 10.
poetry run python util_get_joystick_values.py
- Display joystick values untility tool
Left Stick
- SteeringRight Trigger
- AccelerateLeft Trigger
- BrakeA
- Toggle ReverseB
- Hand Brake
Wheel
- SteeringAccelerator Pedal
- AccelerateBrake Pedal
- BrakeA
- Toggle ReverseB
- Hand Brake
W
- Left Mirror Rotate UpX
- Left Mirror Rotate DownA
- Left Mirror Rotate away from carB
- Left Mirror Rotate towards car
T
- Right Mirror Rotate UpB
- Right Mirror Rotate DownH
- Right Mirror Rotate away from carF
- Right Mirror Rotate towards car