Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial Jazzy implementation #15

Merged
merged 40 commits into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
ba3aabc
Initial migration to Jazzy. Not all packages exist as binaries yet
civerachb-cpr Jul 5, 2024
dcab033
Add docker files
civerachb-cpr Jul 9, 2024
e8c929e
Use the complete path for the volume
civerachb-cpr Jul 9, 2024
32375b4
Fix the env file path
civerachb-cpr Jul 9, 2024
798a1b3
Fix the dockerfile & build script; i copied the wrong ones in before
civerachb-cpr Jul 9, 2024
c4bb779
Use macvlan to give the container a unique, public address. Add a mac…
civerachb-cpr Jul 9, 2024
c22d543
Update the RMW configuration files, remove the vlan-shim interface. B…
civerachb-cpr Jul 11, 2024
05f7f75
Add docker installation to jazzy.sh
civerachb-cpr Jul 11, 2024
b1cb8c5
Remove Docker; it's no longer necessary with the I.*.* firmware.
civerachb-cpr Sep 4, 2024
cfd0eca
Add a note about firmware compatibility to the readme
civerachb-cpr Sep 4, 2024
ae6de07
Add exception handling to the file i/o so the node doesn't just crash…
civerachb-cpr Sep 5, 2024
ed94f15
Add proper escape characters to title backslashes
civerachb-cpr Sep 5, 2024
92cab31
Add improved exception handling to the wifi settings parser
civerachb-cpr Sep 5, 2024
209f6a2
Update CI
civerachb-cpr Sep 10, 2024
07418fd
Properly escape all \ characters in stylized titles, add translation …
civerachb-cpr Sep 10, 2024
84c0f14
Add copyright & contribution notices, fix up code formatting, import …
civerachb-cpr Sep 10, 2024
4f7130c
Remove the docker-compose file; we don't need it anymore
civerachb-cpr Sep 10, 2024
fb9520e
Add XML namespaces & version to cyclone DDS config
civerachb-cpr Sep 10, 2024
8f81cb7
Revert FastDDS config now that we've removed the docker container
civerachb-cpr Sep 10, 2024
861f877
Omit XML linting (for now); it's consistently timing out and failing
civerachb-cpr Sep 10, 2024
8fd6836
Class newline
civerachb-cpr Sep 10, 2024
84dea4d
Add exception handling to the file preview
civerachb-cpr Sep 11, 2024
0008c94
Apply formatting to exception text
civerachb-cpr Sep 11, 2024
af7bc7a
Fix accidental over-escaping of \ characters
civerachb-cpr Sep 11, 2024
095d09b
Fix copyright date in comment blocks
civerachb-cpr Sep 11, 2024
52d65e2
Add an option to force the Create3 settings to be reapplied, even if …
civerachb-cpr Sep 11, 2024
7f3a23f
Remove superfluous concatenation
civerachb-cpr Sep 11, 2024
7b1142e
Fix trailing newlines
civerachb-cpr Sep 11, 2024
e1a87f2
Enable testing packages for CI
civerachb-cpr Sep 11, 2024
11451e4
Write the value of the enum to the bash file, use a regex to match ex…
civerachb-cpr Sep 12, 2024
44f3642
Disable checks on two lines with long format strings
civerachb-cpr Sep 12, 2024
ee12e6f
Add exception handling for install & uninstall
civerachb-cpr Sep 12, 2024
72f04a3
Add an error prompt to show errors during installation
civerachb-cpr Sep 12, 2024
6519d9b
Handle KeyErrors separately
civerachb-cpr Sep 12, 2024
15d0ead
Add newline to end of file
civerachb-cpr Sep 12, 2024
5eb194c
Fix indentation
civerachb-cpr Sep 12, 2024
a328097
''.format -> f''
civerachb-cpr Sep 12, 2024
77e8c52
Typo in Ubuntu
civerachb-cpr Sep 12, 2024
03ea9be
Update the default system file, print the keys instead of the enums
civerachb-cpr Sep 23, 2024
2880c69
Remove uses of .value when printing enums, just add a __str__ functio…
civerachb-cpr Sep 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/ISSUE_TEMPLATE/1-bug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ body:
- Select One
- Galactic
- Humble
- Jazzy
validations:
required: true
- type: dropdown
Expand All @@ -52,6 +53,7 @@ body:
- Select One
- Ubuntu 20.04
- Ubuntu 22.04
- Ubuntu 24.04
- Other Linux
- Windows / MAC
validations:
Expand Down
19 changes: 14 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,20 @@ name: turtlebot4_setup_ci
on: [push, pull_request]

jobs:
turtlebot4_humble_ci:
name: Humble
runs-on: ubuntu-22.04
turtlebot4_jazzy_ci:
name: Jazzy
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v2.3.4
- uses: ros-tooling/setup-ros@v0.3
- uses: ros-tooling/setup-ros@v0.7
with:
required-ros-distributions: humble
required-ros-distributions: jazzy
use-ros2-testing: true
- uses: ros-tooling/action-ros-ci@v0.3
id: action_ros_ci_step
with:
target-ros2-distro: jazzy
import-token: ${{ secrets.GITHUB_TOKEN }}
skip-tests: false
package-name:
turtlebot4_setup
7 changes: 7 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@ install(
DESTINATION lib/${PROJECT_NAME}
)

# disable XML linting; it consistently times out
# TODO (civerachb-cpr) -- figure out why it's timing out and re-enable
# hypothesis: it's related to the additional XML files in etc/turtlebot4
list(APPEND AMENT_LINT_AUTO_EXCLUDE
ament_cmake_xmllint
)

if(BUILD_TESTING)
find_package(ament_lint_auto REQUIRED)
ament_lint_auto_find_test_dependencies()
Expand Down
15 changes: 15 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Contributing to TurtleBot4 Setup

Any contribution that you make to this repository will
be under the Apache 2 License, as dictated by that
[license](http://www.apache.org/licenses/LICENSE-2.0.html):

~~~
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
~~~
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ Setup scripts and tools for the TurtleBot 4 Raspberry Pi.

Visit the [TurtleBot 4 User Manual](https://turtlebot.github.io/turtlebot4-user-manual/software/turtlebot4_setup.html) for more details.

Make sure your Create® 3 is updated to the `I.*.*` firmware; older versions of the firmware are not compatible with ROS 2 Jazzy.

# Create an image manually

Follow these instructions if you wish to create a Turtlebot4 image manually.
Expand All @@ -12,14 +14,14 @@ Follow these instructions if you wish to create a Turtlebot4 image manually.

First install the [Raspberry Pi Imager](https://www.raspberrypi.com/software/).

- Insert your SD card into your PC and run the Raspberry Pi Imager. Follow the instructions and install Ubuntu 22.04 Server (64-bit) onto the SD card.
- Ensure your Raspberry Pi 4 is not powered before inserting the flashed SD card.
- Insert your SD card into your PC and run the Raspberry Pi Imager. Follow the instructions and install Ubuntu 24.04 Server (64-bit) onto the SD card.
- Ensure your Raspberry Pi 4 is not powered before inserting the flashed SD card.
- You can set up the Raspberry Pi by either connecting it to your network via Ethernet or by using a keyboard and HDMI monitor via a micro HDMI cable.

### Ethernet Setup

- Connect the Raspberry Pi to your Network with an Ethernet cable.
- Boot the Raspberry Pi.
- Boot the Raspberry Pi.
- Find the Raspberry Pi's IP using your router's portal.
- SSH into the Raspberry Pi using the IP address.
```bash
Expand Down Expand Up @@ -62,7 +64,7 @@ ssh ubuntu@xxx.xxx.xxx.xxx
## Download and run the setup script

```
wget -qO - https://raw.githubusercontent.com/turtlebot/turtlebot4_setup/humble/scripts/turtlebot4_setup.sh | bash
wget -qO - https://raw.githubusercontent.com/turtlebot/turtlebot4_setup/jazzy/scripts/turtlebot4_setup.sh | bash
```

The script will automatically install ROS 2 Humble, TurtleBot 4 packages, and other important apt packages. It will also configure the RPi4 to work in a TurtleBot 4. Once complete, the RPi4 should be rebooted with `sudo reboot`. Then, run `turtlebot4-setup` to configure the robot with the setup tool.
The script will automatically install ROS 2 Jazzy, TurtleBot 4 packages, and other important apt packages. It will also configure the RPi4 to work in a TurtleBot 4. Once complete, the RPi4 should be rebooted with `sudo reboot`. Then, run `turtlebot4-setup` to configure the robot with the setup tool.
6 changes: 6 additions & 0 deletions etc/rc.local
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash

# Give ourselves some swap to deal with RAM issues
if [ -f /swapfile ]; then
swapon /swapfile
fi
6 changes: 5 additions & 1 deletion etc/turtlebot4/cyclonedds_rpi.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
<CycloneDDS>
<?xml version="1.0" encoding="utf-8"?>
<CycloneDDS
xmlns="https://cdds.io/config"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://cdds.io/config https://raw.githubusercontent.com/eclipse-cyclonedds/cyclonedds/master/etc/cyclonedds.xsd">
<Domain>
<General>
<Interfaces>
Expand Down
2 changes: 1 addition & 1 deletion etc/turtlebot4/discovery.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash
source /opt/ros/humble/setup.bash
source /opt/ros/jazzy/setup.bash
fastdds discovery -i 0 -p 11811
4 changes: 2 additions & 2 deletions etc/turtlebot4/fastdds_rpi.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<dds>
<?xml version="1.0" encoding="UTF-8"?>
<dds xmlns="http://www.eprosima.com/XMLSchemas/fastRTPS_Profiles">
<profiles xmlns="http://www.eprosima.com/XMLSchemas/fastRTPS_Profiles">
<participant profile_name="turtlebot4_default_profile" is_default_profile="true">
<rtps/>
Expand Down
4 changes: 2 additions & 2 deletions etc/turtlebot4/setup.bash
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export ROS_DOMAIN_ID=0
export ROS_DISCOVERY_SERVER=
export RMW_IMPLEMENTATION=rmw_fastrtps_cpp
export TURTLEBOT4_DIAGNOSTICS=1
export WORKSPACE_SETUP=/opt/ros/humble/setup.bash
export WORKSPACE_SETUP=/opt/ros/jazzy/setup.bash
export ROS_SUPER_CLIENT=False

source $WORKSPACE_SETUP
source $WORKSPACE_SETUP
7 changes: 4 additions & 3 deletions etc/turtlebot4/system
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
MODEL:standard
VERSION:1.0.0
ROS:Humble
MODEL:lite
VERSION:2.0.0
ROS:Jazzy
HOSTNAME:ubuntu
2 changes: 1 addition & 1 deletion scripts/create_update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

Help()
{
echo "Create 3 update script for robots running H.1.0 or higher"
echo "Create 3 update script for robots running I.*.*"
echo
echo "usage: bash create_update.sh /path/to/image.swu [-h]"
echo "options:"
Expand Down
8 changes: 6 additions & 2 deletions scripts/humble.sh → scripts/jazzy.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
#!/usr/bin/env bash
sudo apt update && sudo apt install curl gnupg lsb-release -y

# Add ROS sources
sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(source /etc/os-release && echo $UBUNTU_CODENAME) main" | sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null

# Install the packages
sudo apt update
sudo apt install -y \
ros-humble-ros-base \
ros-jazzy-ros-base \
build-essential \
cmake \
git \
wget \
ros-dev-tools \
socat \
network-manager \
chrony
chrony
14 changes: 7 additions & 7 deletions scripts/turtlebot4_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,23 +31,23 @@ echo "Setting up Turtlebot4";

sudo apt update && sudo apt upgrade

wget -qO - https://raw.githubusercontent.com/turtlebot/turtlebot4_setup/humble/scripts/humble.sh | bash
wget -qO - https://raw.githubusercontent.com/turtlebot/turtlebot4_setup/jazzy/scripts/jazzy.sh | bash

sudo apt update && sudo apt upgrade

sudo apt install -y ros-humble-ros-base \
ros-humble-turtlebot4-setup \
ros-humble-turtlebot4-robot \
ros-humble-irobot-create-control \
ros-humble-turtlebot4-navigation \
sudo apt install -y ros-jazzy-ros-base \
ros-jazzy-turtlebot4-setup \
ros-jazzy-turtlebot4-robot \
ros-jazzy-irobot-create-control \
ros-jazzy-turtlebot4-navigation \
ros-dev-tools \
socat \
network-manager \
chrony

sudo rm /etc/netplan/50-cloud-init.yaml

git clone https://github.com/turtlebot/turtlebot4_setup.git -b humble && \
git clone https://github.com/turtlebot/turtlebot4_setup.git -b jazzy && \
sudo mv turtlebot4_setup/boot/firmware/* /boot/firmware && rm turtlebot4_setup/ -rf

echo "export ROBOT_SETUP=/etc/turtlebot4/setup.bash" | sudo tee -a ~/.bashrc
Expand Down
4 changes: 2 additions & 2 deletions turtlebot4_discovery/configure_discovery.sh
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ do
# Prompt the user to offer the ability to correct the last server info or add additional servers
while [ 1 ]
do
read -p "Re-enter the last server (r), add another server (a), or done (d): " option
read -p "Re-enter the last server (r), add another server (a), or done (d): " option
if [[ $option =~ ^[r,R].* ]];
then
echo "Removing last server entry, re-enter the correct server information"
Expand Down Expand Up @@ -173,7 +173,7 @@ sudo mkdir -p /etc/turtlebot4_discovery/

# Create setup.bash file
setup_file_temp="/tmp/turtlebot4_discovery_setup.bash"
echo "source /opt/ros/humble/setup.bash" > $setup_file_temp
echo "source /opt/ros/jazzy/setup.bash" > $setup_file_temp
echo "export RMW_IMPLEMENTATION=rmw_fastrtps_cpp" >> $setup_file_temp
echo "[ -t 0 ] && export ROS_SUPER_CLIENT=True || export ROS_SUPER_CLIENT=False" >> $setup_file_temp

Expand Down
Loading
Loading