Quick Start Guide - JOCIIIII/PX4-PILS-Runner GitHub Wiki
This quick start guide is written for Ubuntu 22.04 LTS environment. Some commands such as package installation may differ on other Linux distributions like Fedora.
Warning
PC and Jetson configurations are separated.
- Install Docker and Docker Compose from the link below:
- https://docs.docker.com/engine/install/ubuntu/
sudo apt update && sudo apt install -y git wget unzip- Clone this repository, JOCIIIII/PX4-PILS-RUNNER to your computer.
cd ~/
git clone https://github.com/jociiiii/PX4-PILS-Runner.git-
Download the ROS2 container image from GitLab.
-
If you have already downloaded it through SITL-runner, you can skip the image download process.
-
You need to login to GitLab first to download.
-
Login to Docker GitLab and download the image using the provided GitLab login documentation.
docker login reg.iacsl.org
docker pull reg.iacsl.org/a4-vai/sils-container:humble-cuda12.6-tensorrt10.7-cudnn9.7cd ~/PX4-PILS-Runner
./scripts/setup.sim.sh- Download the Unreal Engine binary and place it as a folder named
binarywithin the AirSim container workspace. - The Unreal Engine binaries are for path planning and path following tests, and path planning, path following, and collision avoidance tests.
- The default binary is for path planning and path following tests.
- To run path following and collision avoidance tests, you need to rename the corresponding binary file folder to
binary.
wget -P ~/Documents/A4VAI-PILS/AirSim \
--header="PRIVATE-TOKEN: <token>" https://git.iacsl.org/api/v4/projects/302/packages/generic/demo/1.0.0/demo_pf-ca.tar.gz
wget -P ~/Documents/A4VAI-PILS/AirSim \
--header="PRIVATE-TOKEN: <token>" https://git.iacsl.org/api/v4/projects/302/packages/generic/demo/1.0.0/demo_pp-pf.tar.gz
tar -xvzf ~/Documents/A4VAI-PILS/AirSim/demo_pf-ca.tar.gz -C ~/Documents/A4VAI-PILS/AirSim
tar -xvzf ~/Documents/A4VAI-PILS/AirSim/demo_pp-pf.tar.gz -C ~/Documents/A4VAI-PILS/AirSim
mv ~/Documents/A4VAI-PILS/AirSim/demo_world ~/Documents/A4VAI-PILS/AirSim/binary- Jetson Orin Nano 8GB or higher
- Jetpack 6.2
sudo apt update && sudo apt install -y git wget netplan.io docker login reg.iacsl.org
docker pull reg.iacsl.org/a4-vai/pils-container:humble-cuda12.6-tensorrt10.7-cudnn9.7- Clone this JOCIIIII/PX4-PILS-RUNNER GitHub repository to your Jetson.
cd ~/
git clone https://github.com/jociiiii/PX4-PILS-Runner.gitcd ~/PX4-PILS-Runner
./scripts/setup.onboard.shThe default path for the ROS2 container workspace is
~/Documents/A4VAI-PILS/ROS2
-Hardware Diagram
- Simulator PC x1
- Jetson Orin Nano 8GB x1
- USB to Ethernet Adapter (Min 100MB/s) x1
- Ethernet Cable x1
- Check the USB to Ethernet Adapter interface name on PC using
ip acommand:- Interface name :
enx----- - Example : enxc84d44261181
- Interface name :
- Run the following command in terminal
sudo nano /etc/netplan/01-usb-ethernet.yaml- Add the following content in nano editor, modify the interface name as needed, save with Ctrl+x, y, enter:
network:
version: 2
ethernets:
enxc84d44261181:
dhcp4: no
addresses:
- 192.168.50.1/24
- Apply changes with the following command
sudo netplan apply- Check the USB to Ethernet Adapter interface name on Jetson using
ip acommand:- Interface name :
en--- - Example : enP8p1s0
- Interface name :
- Run the following command in termina
sudo nano /etc/netplan/01-usb-ethernet.yaml- Add the following content in nano editor, modify the interface name as needed, save with Ctrl+x, y, enter
network:
version: 2
ethernets:
enP8p1s0:
dhcp4: no
addresses:
- 192.168.50.2/24
- Apply changes with the following command
sudo netplan applyping 192.168.50.2 on PC ping 192.168.50.1 on Jetson
- Run the following commands in PC terminal
ssh-keygen -t rsa -b 4096
ssh-copy-id <jetson username>@192.168.50.2
#ex ssh-copy-id [email protected]-
All preparations are complete. Finally, allow containers to display GUI programs.
-
Then, start the simulation using the commands below. Required docker images will be automatically downloaded.
-
By default, run the simulation from the simulator computer.
-
PILS remotely controls the target board from the simulator computer.
# You only need to run xhost + once per reboot.
xhost +
cd ~/PX4-PILS-Runner
# path following unit test
./scripts/run.sh sim gazebo-classic-airsim-pils test unit-test path-following
# path planning unit test
./scripts/run.sh sim gazebo-classic-airsim-pils test unit-test path-planning
# collision avoidance unit test
./scripts/run.sh sim gazebo-classic-airsim-pils test unit-test collision-avoidance
# path planning, path following integration test
./scripts/run.sh sim gazebo-classic-airsim-pils test integration-test pp-pf-integration
# path following collision avoidance integration test
./scripts/run.sh sim gazebo-classic-airsim-pils test integration-test pf-ca-integration- You can stop the simulation with the following command
cd ~/PX4-PILS-Runner
./scripts/run.sh sim gazebo-classic-airsim-pils stopNote
All topics used in the simulation are logged as rosbag format in the ~/Documents/A4VAI-PILS/ROS2/logs/rosbag path. Using MATLAB's ROS Toolbox, you can play back rosbag files in the MATLAB environment to load topics.