Skip to content

Aku02/ros_simulation_lab

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ROS Simulation Lab on Azure Pipelines

Overview

After defining your robot behavior, it is important to ensure the robot running as expected as the project iterates. This repository demonstrates how to run a autonomous car in the Gazebo simulator, test it on the rostest framework, and cloud-host the continuous integration on Azure Pipelines.

This lab uses the software developed by the Autonomous Racing Project Group of TU Dortmund. Credit goes to all the contributors.

Objectives

  • Run and observe the autonomous racecar simulation locally.

  • Deploy and register a ROS on Windows GPU optimized virtual machine on Azure.

  • Integrate a GitHub project with an Azure DevOps pipeline.

  • Observe the simulation runs and test results on the pipeline.

Prerequisites

Exercise 1: Build And Run Autonomous Car Simulation Locally

  1. Fork this repository into your GitHub account.
  2. Follow this ROS Wiki page to install ROS Melodic on Windows.
  3. Open the ROS command prompt, and run the following to build the project.
:: Clone the github project
git clone https://github.com/<your account>/ros_simulation_lab --recursive
cd ros_simulation_lab

:: install required components
vcpkg install sdl2:x64-windows
pip install circle-fit

:: build it
cd catkin_ws
catkin_make --use-ninja -DCMAKE_BUILD_TYPE=RELEASE
  1. Run the autonomous car simulation.
:: source the ROS devel space.
devel\setup.bat

:: run the application
roslaunch src\ar-tu-do\ros_ws\launch\gazebo.launch world:=racetrack mode_override:=2

This launch file runs a racecar in a simulated track in Gazebo and runs autonomous driving.

simulation

Exercise 2: Run ROSTest With Autonomous Car Simulation Locally

  1. End the previous exercise and run the following rostest file:
:: source the ROS devel space.
devel\setup.bat

:: run the rostest
rostest demo demo.test

This demo.test runs the same task as the previous exercise but in headless mode. Additonally, it runs a demo.py node to kick off a validation on the latest lap time. The demo package demonstrates an example how to organize your robot simulation with the rostest framework. Now let's move this exercise to cloud-hosted environment with Azure Pipelines.

Exercise 3: Provision Cloud CI Environment With Azure Pipelines

Task 1: Prepare Permission For Azure DevOps Agent Pool

  1. This module guides you how to prepare permission for the agent pool.
  2. Take a note of the personal access token (PAT).

Task 2: Deploy Virtual Machine and Register as Azure DevOps Build Agent

This ROS on Azure with Windows VM is a Azure quickstart template to help setup an Azure virtual machine with ROS installed.

  1. Navigate to the template. Click Deploy to Azure.

  2. A form will be brought to you and here are some important parameters for this exercise.

    • Virtual Machine Size: Select Standard_NV* for GPU optimized virtual machine. This is required for Gazebo.
    • Vm Image: Select Visual Studio 2019 for the required toolchain to build project.
    • Vsts Account: This is your Azure DevOps organization name. For example, this is the name of https://dev.azure.com/<name>.
    • Vsts Personal Access Token: This is the PAT noted from the previous section.
    • Enable Autologon: Select True to run build agent in the interactive session. This is required for Gazebo.

    template

Task 3: Integrate Your GitHub Projects With Azure Pipelines

  1. Fork this repository into your GitHub account.
  2. The Integrate Your GitHub Projects With Azure Pipelines guides you how to create a pipeline for a GitHub project in Task 1 & 2. Use your fork as the target repository.
  3. Now you should have a pipeline running (or ready to run).

Task 4: Observe the Build Summary and Test Results

  1. Click on a finished build and you will see a summary like: summary

  2. Check the Related and there is one artifact published, where you can find details logs for this run. In this example, you can also find the bag files for further analysis. logs

  3. Check the Test and coverage and you can find details test results by following the pass rate hyperlink. test_results

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

About

ROS Simulation Lab on Azure Pipelines

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • CMake 85.4%
  • Python 14.6%