Skip to content

Commit

Permalink
Imported upstream version '1.0.5' of 'upstream'
Browse files Browse the repository at this point in the history
  • Loading branch information
civerachb-cpr committed Jan 14, 2025
1 parent 577d1c6 commit aa37c58
Show file tree
Hide file tree
Showing 27 changed files with 308 additions and 693 deletions.
2 changes: 0 additions & 2 deletions .github/ISSUE_TEMPLATE/1-bug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ body:
- Select One
- Galactic
- Humble
- Jazzy
validations:
required: true
- type: dropdown
Expand All @@ -53,7 +52,6 @@ body:
- Select One
- Ubuntu 20.04
- Ubuntu 22.04
- Ubuntu 24.04
- Other Linux
- Windows / MAC
validations:
Expand Down
19 changes: 5 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,11 @@ name: turtlebot4_setup_ci
on: [push, pull_request]

jobs:
turtlebot4_jazzy_ci:
name: Jazzy
runs-on: ubuntu-24.04
turtlebot4_humble_ci:
name: Humble
runs-on: ubuntu-22.04
steps:
- uses: actions/[email protected]
- uses: ros-tooling/setup-ros@v0.7
- uses: ros-tooling/setup-ros@v0.3
with:
required-ros-distributions: jazzy
use-ros2-testing: true
- uses: ros-tooling/[email protected]
id: action_ros_ci_step
with:
target-ros2-distro: jazzy
import-token: ${{ secrets.GITHUB_TOKEN }}
skip-tests: false
package-name:
turtlebot4_setup
required-ros-distributions: humble
50 changes: 4 additions & 46 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,53 +2,11 @@
Changelog for package turtlebot4_setup
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

2.0.2 (2024-10-23)
1.0.5 (2025-01-14)
------------------
* Add e2fsck to SD-flasher script
* Bump default version numbers
* Fix default hostname to match released SD card images
* Append `p2` for `mmcblk` devices, but just `2` for `sd*` devices when expanding the last partition
* Contributors: Chris Iverach-Brereton

2.0.1 (2024-10-04)
------------------
* Add a copy of the boot/firmware files to /etc/turtlebot for reference in case users modify these and want a clean, offline copy for reference
* Add ROBOT_SETUP to setup.bash
* Add growpart & resize2fs commands to the SD card-flashing script to expand the partition to use up the whole SD card
* Add socat as a package dependency instead of an ad-hoc post-install package
* Add MOTD file with the Turtlebot4 logotype
* Contributors: Chris Iverach-Brereton

2.0.0 (2024-09-28)
------------------
* Initial Jazzy implementation
* Add a note about firmware compatibility to the readme
* Add exception handling to the file i/o so the node doesn't just crash if we're missing a file
* Add improved exception handling to the wifi settings parser
* Update CI
* Properly escape all `\` characters in stylized titles, add translation & link to generator page in comments
* Add copyright & contribution notices, fix up code formatting, import ordering. Disable linting for some specific lines where appropriate
* Add XML namespaces & version to cyclone DDS config
* Omit XML linting (for now); it's consistently timing out and failing
* Code formatting fixes
* Add exception handling to the file preview
* Add an option to force the Create3 settings to be reapplied, even if we haven't changed anything else. Always apply the _do_not_use namespace, as we're universally using the republisher now
* Remove superfluous concatenation
* Enable testing packages for CI
* Disable checks on two lines with long format strings
* Add exception handling for install & uninstall
* Add an error prompt to show errors during installation
* Handle KeyErrors separately
* Add newline to end of file
* Fix indentation
* `''.format` -> `f''`
* Update the default system file, print the keys instead of the enums
* Add a `__str_\_` function to the relevant classes
* Disable DHCP4 on the built-in ethernet interface, make it non-optional
* Change the post-install chrony file command from mv to cp
* Only copy if the file exists
* Initial Jazzy implementation (`#15 <https://github.com/turtlebot/turtlebot4_setup/issues/15>`_)
* Contributors: Chris Iverach-Brereton
* Remove dhcp true because it was causing eth0 to lose the static IP (`#17 <https://github.com/turtlebot/turtlebot4_setup/issues/17>`_)
* Change the post-install chrony file command from mv to cp. Only copy if the file actually exists.
* Contributors: Chris Iverach-Brereton, Hilary Luo

1.0.4 (2024-07-02)
------------------
Expand Down
7 changes: 0 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,6 @@ 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: 0 additions & 15 deletions CONTRIBUTING.md

This file was deleted.

12 changes: 5 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ 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 @@ -14,14 +12,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 24.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 22.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 @@ -64,7 +62,7 @@ ssh [email protected]
## Download and run the setup script

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

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.
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.
4 changes: 0 additions & 4 deletions etc/motd

This file was deleted.

3 changes: 1 addition & 2 deletions etc/netplan/40-ethernets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ network:
eth0:
addresses:
- 192.168.185.3/24
dhcp4: false
optional: false
optional: true
usb0:
addresses:
- 192.168.186.3/24
Expand Down
6 changes: 0 additions & 6 deletions etc/rc.local

This file was deleted.

6 changes: 1 addition & 5 deletions etc/turtlebot4/cyclonedds_rpi.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
<?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">
<CycloneDDS>
<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/jazzy/setup.bash
source /opt/ros/humble/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 xmlns="http://www.eprosima.com/XMLSchemas/fastRTPS_Profiles">
<?xml version="1.0" encoding="UTF-8" ?>
<dds>
<profiles xmlns="http://www.eprosima.com/XMLSchemas/fastRTPS_Profiles">
<participant profile_name="turtlebot4_default_profile" is_default_profile="true">
<rtps/>
Expand Down
1 change: 0 additions & 1 deletion etc/turtlebot4/firmware/cmdline.txt

This file was deleted.

46 changes: 0 additions & 46 deletions etc/turtlebot4/firmware/config.txt

This file was deleted.

5 changes: 2 additions & 3 deletions etc/turtlebot4/setup.bash
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +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/jazzy/setup.bash
export WORKSPACE_SETUP=/opt/ros/humble/setup.bash
export ROS_SUPER_CLIENT=False
export ROBOT_SETUP=/etc/turtlebot4/setup.bash

source $WORKSPACE_SETUP
source $WORKSPACE_SETUP
7 changes: 3 additions & 4 deletions etc/turtlebot4/system
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
MODEL:lite
VERSION:2.0.2
ROS:Jazzy
HOSTNAME:turtlebot4
MODEL:standard
VERSION:1.0.0
ROS:Humble
3 changes: 1 addition & 2 deletions package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>turtlebot4_setup</name>
<version>2.0.2</version>
<version>1.0.5</version>
<description>Turtlebot4 setup scripts</description>
<maintainer email="[email protected]">rkreinin</maintainer>
<license>Apache 2.0</license>
Expand All @@ -16,7 +16,6 @@
<exec_depend>rmw_fastrtps_cpp</exec_depend>
<exec_depend>robot_upstart</exec_depend>
<exec_depend>simple_term_menu_vendor</exec_depend>
<exec_depend>socat</exec_depend>

<test_depend>ament_lint_auto</test_depend>
<test_depend>ament_lint_common</test_depend>
Expand Down
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 I.*.*"
echo "Create 3 update script for robots running H.1.0 or higher"
echo
echo "usage: bash create_update.sh /path/to/image.swu [-h]"
echo "options:"
Expand Down
8 changes: 2 additions & 6 deletions scripts/jazzy.sh → scripts/humble.sh
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
#!/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-jazzy-ros-base \
ros-humble-ros-base \
build-essential \
cmake \
git \
wget \
ros-dev-tools \
socat \
network-manager \
chrony
chrony
13 changes: 0 additions & 13 deletions scripts/sd_flash.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,3 @@ do
done

sudo dcfldd if=$1 sizeprobe=if bs=1M$of

for device in $device_names
do
if [[ $device == mmcblk* ]]; then
last_partition="${device}p2"
else
last_partition="${device}2"
fi

sudo e2fsck -f /dev/${last_partition}
sudo growpart /dev/$device 2
sudo resize2fs /dev/${last_partition}
done
19 changes: 9 additions & 10 deletions scripts/turtlebot4_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,24 +31,23 @@ echo "Setting up Turtlebot4";

sudo apt update && sudo apt upgrade

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

sudo apt update && sudo apt upgrade

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 \
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 \
ros-dev-tools \
socat \
network-manager \
chrony

if [ -f /etc/netplan/50-cloud-init.yaml ]; then
sudo rm /etc/netplan/50-cloud-init.yaml
fi
sudo rm /etc/netplan/50-cloud-init.yaml

git clone https://github.com/turtlebot/turtlebot4_setup.git -b jazzy && \
git clone https://github.com/turtlebot/turtlebot4_setup.git -b humble && \
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
Loading

0 comments on commit aa37c58

Please sign in to comment.