Skip to content

carlagx/carla-cpp-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CARLA C++ Client Repository

This repository builds a small CARLA C++ client against an already built CARLA source tree.

It uses the official CARLA Examples/CppClient build system. CARLA's documentation says that the C++ client example is located in CARLA_ROOT/Examples/CppClient, can be built with make on Linux, and can also be used outside the CARLA repository by editing the first location variables in the example Makefile.

Requirements

You need a working CARLA source build first. The expected default layout is:

~/carla-build/carla
~/UnrealEngine_4.26
~/carla-python-venv

The default CARLA source path used by this repository is:

CARLA_ROOT=$HOME/carla-build/carla

Override it when needed:

export CARLA_ROOT=/path/to/carla

Build

chmod +x scripts/*.sh
./scripts/status.sh
./scripts/build.sh

The built binary will be generated here:

vendor/CppClient/bin/cpp_client

Run

Start CARLA first in another terminal:

~/carla-build/launch-carla-clean.sh

Then run the C++ client:

./scripts/run.sh 127.0.0.1 2000 10

Arguments:

./scripts/run.sh [host] [port] [timeout_seconds]

Source code

The client code is in:

src/main.cpp

The current client connects to the CARLA server, prints the current map and lists available maps.

Why this repository copies the official Makefile

CARLA's C++ client build is tightly coupled to the CARLA source tree and its generated Build dependencies. For that reason, this repository bootstraps from the official Examples/CppClient folder and patches the Makefile paths automatically.

Typical workflow

git clone <your-repository-url> carla-cpp-client
cd carla-cpp-client
export CARLA_ROOT=$HOME/carla-build/carla
chmod +x scripts/*.sh
./scripts/build.sh
./scripts/run.sh

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors