a cpp bridge between Carla and tiev-plus
- GeographicLib for caluculating the UTM and GPS coordinates
- rapidjson (already in src) for setting parameters
- clang++-8.01 (the same as you compiled carla and LibCaral)
- cmake after version 3.0
- zeocm
- ubuntu default udp buffer is too small to run tiev-sim effciently, to enlarge kernel buffer size:
# sudo vi /etc/sysctl.conf and add below sentences to the bottom
net.core.rmem_max=104857600
net.core.rmem_default=104857600
net.core.wmem_max=104857600
net.core.wmem_default=104857600
- when compiled carla from source, do NOT use
sudo
or there may be some errors which need to change files' owner to fix. - when compiled carla, if
make launch
throw an error that showsUE4_ROOT
cannot be found but it has indeed already be set in~/.bashrc
correctly, addUE4_ROOT=PATH.../UnrealEngine-4.24
to the first line ofCarla/Util/BuildTools/BuildCarlaUE4.sh
- clone this repo to the carla installation path, such as
~/carla/
- make sure
LibCarla
been built and can be found in....../carla/PythonAPI/carla/dependencies
, there shall beinclude
andlib
folder - cmake and make, compiler should be assigned to clang++-8
- several macros to control this bridge
to change between LCM and ZCM, in MessageManager/MessageManger.h
#define USE_LCM
#define USE_ZCM
to change ego car's controller between carla default agent and tiev-plus, in tiev-sim.cpp
#define HIL_MODE
#define AUTOPILOT_MODE
to change message publishing mode between async and sync, or to test how much time spent for packing and publishing of every message (sync mode)
#define ASYNC_MODE
#define SYNC_MODE
#define OPT_TIME_TEST
to add a new feature supporting a new message, follow belowing guide:
Here we assume that the new zcm/lcm message named new_msg
- in
MessageManger.h
andMessageManger.cpp
, addpub_new_msg_loop(int freq)
andpublish_new_msg()
, inpublish_all_async()
, add a new line to rigitster the thread function. - using CarlaLib API to implement the
pack_new_msg()
function for packing new message. - if you have used a carla virtual sensor to implement
pack_new_msg()
, intiev-sim.cpp
a callback function for listening sensor data is needed. - if you haved used
carla::client::World
's method such asGetActors()
to implement your packing function, you need to call thisGetActors()
intick()
function ofMyWorld
.
- adjust coordinates from rear-axle to front axle.
- point cloud based fusionmap
- additional messages: roadmarking, traffic sign, traffic light, rain detection.
- how to create a display window like pygame in c++? or use a python script to get ego car's ID and attach a spectator?