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.
-
Run and observe the autonomous racecar simulation locally.
-
Deploy and register a ROS on Linux virtual machine on Azure.
-
Integrate a GitHub project with Azure Pipelines or GitHub Actions.
-
Observe the simulation runs and test results on the pipeline.
-
An Microsoft Azure account from https://portal.azure.com.
-
An Azure DevOps account from https://dev.azure.com.
-
A GitHub account from https://github.com.
This lab supports for both Windows and Linux. For the Windows instructions, visit here.
- Fork this repository into your GitHub account.
- Follow this ROS Wiki page to install ROS Melodic on Ubuntu.
- Open a new shell. The below example assumes using
bash
.
# Clone the github project
git clone https://github.com/<your account>/ros_simulation_lab --recursive
cd ros_simulation_lab
# install required components
sudo apt update
rosdep update
rosdep install --from-paths catkin_ws/src --ignore-src -r -y
pip install circle-fit
# build it
cd catkin_ws
catkin_make
- Run the autonomous car simulation.
# source the ROS devel space.
source ./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.
- End the previous exercise and run the following rostest file:
# source the ROS devel space.
source ./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.
- This module guides you how to prepare permission for the agent pool.
- Take a note of the personal access token (PAT).
This ROS on Azure with Linux VM
is a Azure quickstart template to help setup an Azure virtual machine with ROS installed.
-
Navigate to the template. Click
Deploy to Azure
. -
A form will be brought to you and here are some important parameters for this exercise.
- Pipeline Provider: Select
AzurePipelines
to use Azure DevOps. - Vsts Account: This is your Azure DevOps organization name. For example, this is the
name
ofhttps://dev.azure.com/<name>
. - Vsts Personal Access Token: This is the PAT noted from the previous section.
- Vsts Pool Name: Leave it to
Default
to match the pool name in this exercise.
- Pipeline Provider: Select
- Fork this repository into your GitHub account.
- 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. - Navigate to the "Existing Azure Pipelines YAML file" and select
azure-pipelines-linux.yml
. - Now you should have a pipeline running (or ready to run).
-
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. -
Check the
Test and coverage
and you can find details test results by following the pass rate hyperlink.
- Fork this repository into your GitHub account.
- Go to your forked repository and navigate to the
Actions
tab. - Make sure it is enabled by your permission.
- Create a GitHub personal access token and select the scope of
repo
. - Take a note of the personal access token (PAT).
This ROS on Azure with Linux VM
is a Azure quickstart template to help setup an Azure virtual machine with ROS installed.
- Navigate to the template. Click
Deploy to Azure
. - A form will be brought to you and here are some important parameters for this exercise.
- Pipeline Provider: Select
GitHubRunner
to use Azure DevOps. - GitHub Repo: This is your GitHub account and the repository name seperated by a forward slash. For example,
<your GitHub account>/ros_simulation_lab
is the value of this fork. - GitHub Personal Access Token: This is the PAT noted from the previous section.
- Pipeline Provider: Select
-
Navigate to the
Actions
tab and make sure workflows are listed there. -
Push some changes to the fork.
-
Observe the runs of the workflows. And you can explore more on GitHub Help.
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 opencode@microsoft.com with any additional questions or comments.