/simulator

A ROS/ROS2 Multi-robot Simulator for Autonomous Vehicles

Primary LanguageC#OtherNOASSERTION

A ROS/ROS2 Multi-robot Simulator for Autonomous Vehicles

Summary

We present a Unity-based multi-robot simulator for autonomous vehicle developers. We provide an open-source, out-of-the-box solution which can meet the needs of developers wishing to focus on testing their autonomous vehicle algorithms. It currently has integration with the MIT DuckieTown and Autoware platforms, can generate HD maps, and be immediately used for testing and validation of a whole system with little need for custom integrations. We hope to build a collaborative community among robotics and autonomous vehicle developers by open sourcing our efforts.

Video

A ROS/ROS2 Multi-robot Simulator for Autonomous Vehicles

Build

Build inside container:

cd Docker
docker-compose build

Manual build steps for Ubuntu host:

  1. Install Unity 2018.2.4f1: https://beta.unity3d.com/download/fe703c5165de/public_download.html

install into the /opt/Unity folder:

 chmod +x ~/Downloads/UnitySetup-2018.2.4f1
 ./UnitySetup-2018.2.4f1 --unattended --install-location=/opt/Unity --components=Unity,Windows-Mono

run Unity and make sure it's activated

  1. Make sure you have git-lfs installed: https://git-lfs.github.com/

  2. Clone simulator from GitHub:

 git clone https://github.com/lgsvl/simulator.git
  1. (temporary) For Autoware use this commit: 9686e3a
 cd simulator
 git checkout 9686e3a
 git lfs pull
 git lfs checkout
  1. Run build:
 mkdir build
 /usr/bin/xvfb-run /opt/Unity/Editor/Unity \
    -batchmode \
    -nographics \
    -silent-crashes \
    -quit \
    -buildDestination ./build/simulator \
    -buildTarget Linux64 \
    -executeMethod BuildScript.Build \
    -projectPath . \
    -logFile /dev/stdout

Test simulator:

  1. Run rosbridge:
   roslaunch rosbridge_server rosbridge_websocket.launch
  1. Run simulator from build/simulator Choose "Free Roaming" -> "DuckieDowntown" as map -> "Duckiebot-duckietown-ros1" as robot make sure it's connected, click "RUN" - make sure it's running, you can operate the robot

  2. Run rviz or rqt_image_view and see image from topic "/simulator/camera_node/image/compressed"

Copyright and License

Copyright (c) 2018 LG Electronics, Inc.

This software contains code licensed as described in LICENSE.