It is displayed in this section the architecture of the ROS-CARLA Integration software for the ATLASCAR implementation. Our architecture can be divided into 4 sections: one section that describes the central framework that runs with ROS, another section used for user interaction which is the CARLA simulator, another section that portrays the handling of the data between the ROS and CARLA modules and another section that is responsible for the image data processing.
The first section consists in a ROS node known as "roscore" that is responsible for handling the processes from the another ROS nodes that are part of the ATLASCAR configuration(LAR ToolKit).
The second section consists in open-world simulator known as CARLA that provides user interaction with all the agent models present in that world and command accordingly.
The third section, is the actual meat of the pie, which consists in a bridge package that handles the data provided from ROS and CARLA. To handle this complex problem of handling what we have to assume, could be an enormous amount of data, we adopt a divide and conquer strategy, aproaching the issue with a micro-services solution. Although in order to reduce the complexity of the problem we adopted a client-server model in which a user communicates with the apllication using a set of commands from the client API.
Elements of this Architecture may change according to the deemed needs faced during the development process of this software
On this section we give an insight into each and every one of the components, explaining its main function and the external interface.
The central framework of this project is based on ROS Melodic on Ubuntu 18.04LTS
The ROS(Robot Operating System), although not an operating system, operates as a robotics middleware. ROS offers open-source services designed for developers that need hardware abstraction and low-level device control. Architectures in ROS are centered in applications called rosnodes which communicate with each other creating a graph of message-passing processes.
With ROS it is possible to receive data packets and transform them in messages that contain data from the sensors. It is possible to manipulate this data using ROS nodes and other tools.
RVIZ is the standard ROS tool for 3D visualization. The Rviz is one of the most important tools as it will be used to visualize data either directly in real-time by connecting a computer to the car or in rosbags. It will also serve as a debugging tool in which pointcloud values can be analyzed (ROS Wiki 2018b).
A rosbag is a file in ROS which contains messages saved from past events. While connected directly to a device, or several devices, multiple topics can be subscribed at once to be recorded into a rosbag.
The advantage of rosbags is to replicate the working environment of the ATLASCAR 2 offline. Several rosbags were recorded throughout the process of development in this project, either of calibration or for detection, tracking and labeling purposes.
In ROS, the rosbag package contains a set of tools for recording from and playing back to ROS topics. It is intended to be high performance and avoid deserialization and reserialization of the messages. It also features command line tools for working with bags as well as code APIs to read/write and manipulate bags (ROS Wiki 2018a).
The roslaunch files are used as a tool for easily launching multiple ROS nodes. A roslaunch file sets up a roscore (os ROS master), sets parameters on the Parameter Server, and can also execute other roslaunch files.
It includes options to automatically re-spawn processes that have already died. The roslaunch takes in one or more XML configuration files (with the .launch extension) that specify the parameters to set and nodes to launch.
For example, a rosbag can be given as parameter to the roslaunch which opens the Rviz with a previous defined configuration to visualize the data from that rosbag.
In this project, roslaunch files are used to set up calibration values before launching the Rviz and the nodes that process the data from the LIDARs and the camera. The transforma- tions between device frames are set up using roslaunch files and static transform publishers implemented by ROS.
The roslaunch files are also advantageous to set up the multiple drivers needed to bring up the several devices equipped in the ATLASCAR 2. Since the sensors are connected to a network switch, the parameters given in the driver’s roslaunch file are the IP addresses of each of the devices. The drivers will then receive packets from the sensors and remap them into the ROS format.
The rqt bag is a GUI to replay and display ROS bag files. In this program it is possible to show bag message contents, view image messages, plot message from selected topics, publish messages from selected topics and export messages to a new bag. The rqt bag is useful for the labelling process as it presents a timeline in which the user can select the time by clicking on it.
The LARTk is a software suite developed by members of LAR. The projects involved in the LARTk are based in the development of robotics solutions namely for the ATLAS project.
This toolkit is constituted by a set of packages: LARtk4Wiki
This module establishes communication with the atlascar control PLC, handling all main control communications.
This module is used to establish semi-automatic detection, tracking and labelling of active targets with the atlascar
This package was developed by Nuno Miguel Soares Silva(2018): GitHub
This multi-sensor calibration package contains a GUI used to calibrate the several sensors present in the ATLASCAR2
The package was initially developed for the ATLASCAR1, and it was further introduced into the ATLASCAR2 since the sensors were almost the same
The calibration package features a graphical user interface in which several sensors can be selected to be calibrated. The available devices are the SICK LMS151 and SICK LD-MRS mounted in the ATLASCAR 2, PointGrey cameras, Microsoft Kinects, the SwissRanger SR4000 and the Velodyne VLP16 used in the ATLASCAR1.
To calibrate, the user should roll a ball in front of the sensors in order to create a pointcloud of ball centers, and then align them. The user adds the sensors that will be calibrated and inserts the IP address of the sensor. One of the sensors will be defined as the reference sensor.
Some configurations can be done in the Options menu. The ball diameter can be defined here as well as the number of calibration points and distance between points. The calibration also has two acquisition types: automatic or user prompt.
In the automatic mode, while the ball rolls in front of the sensors the calibration programs automatically detects the ball center and publishes it. In the user prompt mode the user chooses when the ball should be captured.
In the end a file with the transformation matrices with the relative position of the sensors relatively to the reference sensor will be written.
This package was developed by Vieira da Silva(2016)
This package serves as a library that can provide the same kind of functionality as a matlab colormap for the atlascar
This package was developed by Professor Miguel Oliveira(2016): GitHub
This package introduces a kalman filter to the atlascar which is a set of mathematical equations that provides an efficient computational (recursive) solution of the least-squares method.
This filter is a very powerfull in several aspects:
- it supports estimations of past, present, and even future states, and it can do so even when the precise nature of the modeled system is unknown.
- it supports optimized algorithms even in the presence of correlated process or measurement noise.
The version of this kalman filter is in fact a Variable-Dimension Extended Kalman Filter (VDEKF).
This node is intended to explore some 2D laser segmentation algorithms.
The segmentation process, whose objective is grouping segments that belong to the same object, is analysed using several kinds of algorithms:
- Simple Clustering.
- Multivariable Segmentation.
- Adaptive Breakpoint Detector.
- Dietmayer Segmentation (Jump Distance).
- Adapted Dietmayer Segmentation (Santos Segmentation).
- Spacial Nearest Neighbour (Recursive Method).
The laser data is created from a .txt file with the ground-truth data.
The results of the Several Algorithms can be seen on a rviz plataform The segmentation results (segments' centers and boundaries) are published into .txt files.
The Multi Target Tracking(MTT) library is a set of methods and strategies specially designed for the ATLASCAR project with the goal to send perception parameters about objects captured in the LIDARs.
The MTT is capable of receiving LIDAR messages and break them in smaller groups. This process is called clustering. Clustering separates all objects found in a scan and returns their position. The clustering of data is an important step in the development of this dissertation as it facilitates the detection and tracking of objects in space.
The clustering algorithm of the MTT library is based on the Nearest Neighbor Clustering Algorithm (Luo, Habibi and Mohrenschildt 2016). It segments the received pointclouds using a predefined distance as threshold. Each set of points in the clusters are assumed as possible targets of interest.
The MTT then associates the targets found to a linked list of objects where the full description of the objects are stored. This list is later used to create a motion model where the estimated position of the objects and its velocity is calculated.
Some objects may be occluded during the sequence (for example when a car passes in front of another). The MTT estimates the position of the occluded objects by creating a motion model using their velocity allowing objects to be followed while they are out of the field of view but still in the surroundings.
The MTT defines targets that keep information about the object and its velocity plus their position and obstacle lines.
This package was developed by Soares De Almeida(2016).
This package receives velocity information from the Atlascar wheel encoder and its associated Arduino pulse counter.
This package establishes a Ethernet communication with the Arduino server, it receives the number of pulses per second, the number of revolutions per second, the velocity of the vehicle and finally the simple counter value.
This module publishes a locally defined status message with the received information.
This module receives data at a weired rate of 9hz.
The module makes use of the ros::diagnostics to publish the status of the Ethernet connection.
On some occasions the Arduino takes a few seconds to start sending data.
This module provides an easy to use TCP/IP client library. The library takes the form of a class that implements sys/socket, netinet/in and arpa/inet functions for socket control.
Only a client class was developed and it only supports IPv4 and not IPv6, though the expansion is easy to achieve.
For the more experienced user, the usage of the additional asynchronous client is highly recommended.
This library is based on the boost::asio library supporting either IPv4 and IPv6 connections.
This library is also accepts names of typical services (ssh, http, etc...) instead of port numbers.
This package provides a topic priority management library for atlascar
This library allows a module to receive multiple command messages with different origins and order them by priority and lifetime. A topic is kept while its lifetime does not expire. Of the still surviving topics the one with the highest priority is returned.