Skip to content

Commit

Permalink
Merge pull request #2 from ros-realtime/add-scripts
Browse files Browse the repository at this point in the history
Add scripts to create the humble image
  • Loading branch information
carlossvg authored Oct 14, 2022
2 parents 02f8d19 + 037c93b commit acd842d
Show file tree
Hide file tree
Showing 5 changed files with 124 additions and 1 deletion.
20 changes: 19 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,20 @@
# rpi4-rt-benchmarks-image
A Raspberry Pi 4 image with ROS 2, Linux RT and ROS 2 real-time benchmark tools preinstalled

This repository includes the scripts required to generate a
ROS 2 RPI4 image including the tools used for the ROS 2 real-time benchmarks.

## How to build the image

### Humble

```bash
# Clone this repository
git clone https://github.com/ros-realtime/rpi4-rt-benchmarks-image
# Clone the `ros-realtime-rpi4-image` repository
git clone https://github.com/ros-realtime/ros-realtime-rpi4-image
# copy the customized layer to the image_builder directory
cp -r rpi4-rt-benchmarks-image/ros2-rt-benchmark-tools ros-realtime-rpi4-image/image_builder/data
# Build the image
cd rpi4-rt-benchmarks-image
sudo ./ros-rt-img build jammy-rt jammy-rt-humble ros2-rt-benchmark-tools
```
2 changes: 2 additions & 0 deletions config.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[build]
output_filename = ros2-rt-benchmark-tools.img
5 changes: 5 additions & 0 deletions ros2-rt-benchmark-tools/config.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[build]
output_filename = ros2-rt-benchmark-tools.img

# Increrase size to have enough space
image_size = 8G
49 changes: 49 additions & 0 deletions ros2-rt-benchmark-tools/scripts/phase1-target
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
#!/bin/bash

set -xe

apt-get update
apt-get install -y ros-$ROS_DISTRO-pendulum-control ros-$ROS_DISTRO-pendulum-msgs

apt update && sudo apt install -y \
build-essential \
cmake \
git \
python3-colcon-common-extensions \
python3-flake8 \
python3-flake8-blind-except \
python3-flake8-builtins \
python3-flake8-class-newline \
python3-flake8-comprehensions \
python3-flake8-deprecated \
python3-flake8-docstrings \
python3-flake8-import-order \
python3-flake8-quotes \
python3-pip \
python3-pytest \
python3-pytest-cov \
python3-pytest-repeat \
python3-pytest-rerunfailures \
python3-rosdep \
python3-setuptools \
python3-vcstool \
wget

# init rosdep
rosdep init
rosdep update

# install dependencies for reference-system
python3 -m pip install psrecord bokeh

mkdir -p /tmp/ros2_rt_benchmarks_ws/src
cd /tmp/ros2_rt_benchmarks_ws/src || exit 1
git clone https://gitlab.com/ApexAI/performance_test.git
git clone https://github.com/ros-realtime/reference-system
cd .. || exit 1
rosdep install --from-paths src --ignore-src -y --skip-keys "fastcdr rti-connext-dds-6.0.1 urdfdom_headers"

# build tools
source /opt/ros/$ROS_DISTRO/setup.bash
mkdir -p /opt/ros/$ROS_DISTRO-rt-tools
colcon build --cmake-force-configure --cmake-args -DRUN_BENCHMARK=ON --install-base /opt/ros/$ROS_DISTRO-rt-tools
49 changes: 49 additions & 0 deletions scripts/phase1-target
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
#!/bin/bash

set -xe

apt-get update
apt-get install -y ros-$ROS_DISTRO-pendulum-control ros-$ROS_DISTRO-pendulum-msgs

apt update && sudo apt install -y \
build-essential \
cmake \
git \
python3-colcon-common-extensions \
python3-flake8 \
python3-flake8-blind-except \
python3-flake8-builtins \
python3-flake8-class-newline \
python3-flake8-comprehensions \
python3-flake8-deprecated \
python3-flake8-docstrings \
python3-flake8-import-order \
python3-flake8-quotes \
python3-pip \
python3-pytest \
python3-pytest-cov \
python3-pytest-repeat \
python3-pytest-rerunfailures \
python3-rosdep \
python3-setuptools \
python3-vcstool \
wget

# init rosdep
rosdep init
rosdep update

# install dependencies for reference-system
python3 -m pip install psrecord bokeh

mkdir -p ~/ros2_rt_benchmarks_ws/src
cd ~/ros2_rt_benchmarks_ws/src
git clone https://gitlab.com/ApexAI/performance_test.git
git clone https://github.com/ros-realtime/reference-system
cd ..
rosdep install --from-paths src --ignore-src -y --skip-keys "fastcdr rti-connext-dds-6.0.1 urdfdom_headers"

# build tools
source /opt/ros/$ROS_DISTRO/setup.bash
mkdir /opt/ros/humble-rt-tools
colcon build --cmake-force-configure --cmake-args -DRUN_BENCHMARK=ON --install-base /opt/ros/humble-rt-tools

0 comments on commit acd842d

Please sign in to comment.