Skip to content

ERA using CARLA Simulator

Akin Sisbot edited this page Jun 26, 2020 · 2 revisions

Running EPOCHS Reference Application (ERA) on Ubuntu 18.04 with ROS Melodic and with CARLA Simulator

This is the package to get if you want to install ERA. The rosinstall script will fetch the necessary packages in the catkin workspace. This version is used to install the ERA application on Ubuntu 18.04 LTS using ROS Melodic.

Requirements

ERA requires:

  • Ubuntu 18.04
  • CARLA 0.9.9
  • python-wstool
  • ROS Melodic
  • GNU Radio 3.7.3+
  • gr-ieee802-11
  • Swig 3.0
  • LZ4 1.7.0+

Note that gr-ieee802-11 is included as a package in this project (i.e. no need to clone it separately).

To include some of these, use the following commands:

sudo apt-get install swig
sudo apt-get install doxygen
sudo apt-get install gnuradio
sudo apt-get install python-wstool

Follow these instructions to install CARLA.

Follow these instructions in ROS' official website to install ROS Melodic on Ubuntu 18.04. We recommend installing desktop-full install (sudo apt-get install ros-melodic-desktop-full).

We will get to the installation of the remaining packages below (by bringing the appropriate package sources into the catkin workspace and compiling them there).

Installing ERA

If not done yet, source the ROS environment setup file:

source /opt/ros/melodic/setup.bash

Fresh Install with No Preexisting Catkin Workspace

cd ~
mkdir -p catkin_ws/src
cd catkin_ws/src
catkin_init_workspace
git clone https://github.com/IBM/era.git
cd ..
wstool init src src/era/era.rosinstall
catkin_make
source devel/setup.bash

We also recommend putting . ~/catkin_ws/devel/setup.bash into the .bashrc file.

Installation into an Existing Workspace

cd catkin_ws/src
git clone https://github.com/IBM/era.git
cd ..
wstool merge -t src src/era/era.rosinstall
catkin_make
source devel/setup.bash

Installation of GNU Radio Components

ERA includes components implemented in GNU Radio (gr-ros_interface, gr-foo and gr-ieee802-11) that have to be built and installed separately as explained next. The gr-ieee802-11 project is the GNU Radio-based implementation of an IEEE 802.11p transceiver while the gr-foo project includes a collection of custom blocks that are used by gr-ieee802-11. The gr-ros_interface project implements the interface to connect together the ROS and GNU Radio "worlds".

Build and install gr-ros_interface:

cd ~/catkin_ws/src/dsrc/gr-ros_interface/
mkdir build
cd build
cmake ..
make
sudo make install
sudo ldconfig

Build and install gr-foo:

cd ~/catkin_ws/src/dsrc/gr-foo/
mkdir build
cd build
cmake ..
make
sudo make install
sudo ldconfig

Build and install gr-ieee802-11:

cd ~/catkin_ws/src/dsrc/gr-ieee802-11/
mkdir build
cd build
cmake ..
make
sudo make install
sudo ldconfig

Finally, the GNU Radio-based implementation of the IEEE 802.11p transceiver has to be generated using the GNU Radio Companion compiler (grcc):

cd ~/catkin_ws/src/dsrc/gr-ieee802-11/examples
grcc ./wifi_transceiver.grc -d .

Installing Carla Ros Bridge

Carla-ros-bridge is a ROS package that communicates with the CARLA server and links ROS world to CARLA world.

Download and install carla-ros-bridge with the following commands:

cd ~/catkin_ws/src
git clone https://github.com/carla-simulator/ros-bridge.git
cd ~/catkin_ws
catkin_make

Running ERA

Refer to the main README.md file at The ERA Git Repository for the rest of the use of ERA. Note: for the Melodic build, the "launch" files (e.g. those ending in .launch) should use the versions that have "melodic" in their name, e.g. where the initial launch of the era_gazebo model is invoked as:

roslaunch era_gazebo carla_with_two_cars.launch

Contributors

Augusto Vega (IBM)
Akin Sisbot (IBM)
J-D Wellman (IBM)

Current Maintainers

ajvega@us.ibm.com
easisbot@us.ibm.com
wellman@us.ibm.com