Skip to content

Summary - Comparative Study and Implementation of SLAM in ROS, Gazebo, CARLA and Prototype

License

Notifications You must be signed in to change notification settings

prithvisekhar/ROS-AD-SLAM-Evaluation

Repository files navigation

ROS-AD-SLAM-Evaluation

Build Status Codacy Badge

How to setup Carla Environment to replicate the test results

Requirements

  • Ubuntu 18.04.
  • 16gb RAM.
  • Vulkan enabled GPU is preferred , Follow the LINK to check your GPU compatibility.
  • Unreal Engine 4.24 , for build instructions follow LINK.
  • Carla 0.9.8, for build instructions follow LINK.
  • ROS Melodic , for install instructions follow LINK.

Setup the ROS Environment

  • Navigate to carla build directory , you should find *.egg file in carla/Dist/CARLA_Shipping_0.9.8-***********/LinuxNoEditor/PythonAPI/carla/dist/ folder, which to be exported to python environment to run further simulations. Make sure you export appropiate egg file based on your preferred python version.
  • Install SLAM Nodes - Install Gmapping by sudo apt-get install ros-melodic-slam-gmapping. - Install Hector SLAM by sudo apt-get install ros-melodic-hector-slam. - Install RTAB-Map by sudo apt-get install ros-kinetic-rtabmap-ros. - Karto SLAM needs to be build from the source , follow standard ROS package installation procedure. The Kartoslam Github repo can be found LINK.
  • Clone the SLAM packages https://github.com/prithvisekhar/ROS-AD-SLAM-Evaluation.git
  • Copy the ros-bridge contents to a ros workspace src folder and build the workspace and source the workspace before running the roscore.

Running the Simulator

  • Run Carla simulator by navigating to carla/Dist/CARLA_Shipping_0.9.8-***********/LinuxNoEditor/ and running ./CarlaUE4.sh if you are using opengl then you should pass -opengl as configuration along with the carla launch command. it should open the simulator (Refer the below image as reference). For More info on graphics support follow this LINK Carla Window
  • Run the Carla ROS Client roslaunch carla_ros_bridge carla_ros_bridge_with_example_ego_vehicle.launch , Refer the below image as reference Carla Window
    • Run the Gmapping Node roslaunch carlabg Gmapping_Carla.launch , for configuration option see ros-bridge/carlabg/launch folder. After mapping session is over save the map using map_saver tool rosrun map_server map_saver -f /path to your file.
    • Run the Hector SLAM Node roslaunch carlabg Hectormapping_Carla.launch. Follow the same map saver command to save the map for Hector SLAM.
    • Run the Karto SLAM Node roslaunch carlabg KartoSLAM2.launch. Follow the same map saver command but this time pass the map frame as map2.
    • Launch the RTAB-Map Node roslaunch carlabg RtabMapping_Carla.launch. RTAB Map can be directly saved from the RTAB map application.