Skip to content

Commit

Permalink
Merge pull request #53 from cwruRobotics/iron
Browse files Browse the repository at this point in the history
Iron
  • Loading branch information
InvincibleRMC authored Jan 22, 2024
2 parents 0d96f01 + ebe0c1c commit 5f5005c
Show file tree
Hide file tree
Showing 38 changed files with 89 additions and 61 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/linux/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name" : "ROV Linux",
"image": "ghcr.io/cwrurobotics/rov-24:main",
"image": "ghcr.io/cwrurobotics/rov-24:iron",
"containerEnv": {
"DISPLAY": "${localEnv:DISPLAY}"
},
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/macos/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name" : "ROV macOS",
"image": "ghcr.io/cwrurobotics/rov-24:main",
"image": "ghcr.io/cwrurobotics/rov-24:iron",
"containerEnv": {
"DISPLAY": "${localEnv:DISPLAY}"
},
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/windows/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name" : "ROV Windows",
"image": "ghcr.io/cwrurobotics/rov-24:main",
"image": "ghcr.io/cwrurobotics/rov-24:iron",
"containerEnv": {
"DISPLAY": "${localEnv:DISPLAY}"
},
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
#
name: Create and publish a Docker image

# Configures this workflow to run every time a change is pushed to a branch in the branches array.
on:
push:
branches: ['main']
branches: ['iron']

# Defines two custom environment variables for the workflow. These are used for the Container registry domain, and a name for the Docker image that this workflow builds.
env:
Expand Down
18 changes: 11 additions & 7 deletions .github/workflows/industrial_ci_action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
strategy:
# fail-fast: false # uncomment if failing jobs should not cancel the others immediately
matrix: # matrix is the product of entries
ROS_DISTRO: [humble]
ROS_DISTRO: [iron]
ROS_REPO: [main]
# exclude: # specific configuration can be excludes
# - {ROS_DISTRO: melodic, ROS_REPO: testing}
Expand All @@ -29,9 +29,6 @@ jobs:
CCACHE_DIR: "${{ github.workspace }}/.ccache" # directory for ccache (and how we enable ccache in industrial_ci)
steps:
- uses: actions/checkout@v4 # clone target repository
with:
# Clone submodules as well
submodules: 'true'
- uses: actions/cache@v4 # fetch/store the directory used by ccache before/after the ci run
with:
path: ${{ env.CCACHE_DIR }}
Expand All @@ -44,7 +41,14 @@ jobs:
- uses: 'ros-industrial/industrial_ci@master' # run industrial_ci
env: # either pass all entries explicitly
DOCKER_IMAGE: ghcr.io/cwrurobotics/rov-24:main
ROS_REPO: ${{ matrix.ROS_REPO }}
# Added back so testing without Dockerfile can be done
ROS_DISTRO: ${{ matrix.ROS_DISTRO }}
DOCKER_IMAGE: ghcr.io/cwrurobotics/rov-24:iron
ROS_REPO: ${{ matrix.ROS_REPO }}
# Install missing libxcb-cursor0 xvfb for PyQt unit testing
# https://pytest-qt.readthedocs.io/en/latest/troubleshooting.html
ADDITIONAL_DEBS: 'libxcb-cursor0 xvfb'
# Crazy one liner for install python dependencies
AFTER_INSTALL_TARGET_DEPENDENCIES_EMBED: 'for d in /root/target_ws/src/rov-24/src/pi/*/ /root/target_ws/src/rov-24/src/surface/*/; do pip install -e "$d"; done'
AFTER_INSTALL_TARGET_DEPENDENCIES_EMBED: 'for d in /root/target_ws/src/rov-24/src/pi/*/ /root/target_ws/src/rov-24/src/surface/*/; do pip install -e "$d"; done'
# Used for running our CI but don't necessarily want to run others failing unit tests (ej. robot_upstart)
UPSTREAM_WORKSPACE: 'github:clearpathrobotics/robot_upstart#foxy-devel'
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
[submodule "src/surface/ros2_video_streamer"]
path = src/surface/ros2_video_streamer
url = [email protected]:cwruRobotics/ros2_video_streamer.git
[submodule "src/pi/robot_upstart"]
path = src/pi/robot_upstart
url = [email protected]:clearpathrobotics/robot_upstart.git
branch = foxy-devel
4 changes: 2 additions & 2 deletions .vscode/install_dependencies.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#!/bin/bash

# Update ROS dependencies
. /opt/ros/humble/setup.sh && rosdep update
. /opt/ros/iron/setup.sh && rosdep update
sudo apt-get update -y

# Installs ROS dependencies
. /opt/ros/humble/setup.sh && rosdep install --from-paths src --ignore-src -r -y
. /opt/ros/iron/setup.sh && rosdep install --from-paths src --ignore-src -r -y

# Deletes ROS build directories
rm -rf build install log
Expand Down
6 changes: 3 additions & 3 deletions .vscode/pi_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ sudo apt-get update
sudo apt-get upgrade -y

# Install ROS2
sudo apt-get install ros-humble-ros-base -y
sudo apt-get install ros-iron-ros-base -y
sudo apt-get upgrade -y

# Add setup.bash to .bashrc only if it isn't already there
ROS_LINE='source /opt/ros/humble/setup.bash'
ROS_LINE='source /opt/ros/iron/setup.bash'
if ! grep -qF "$ROS_LINE" ~/.bashrc ;
then echo "$ROS_LINE" >> ~/.bashrc ;
fi
Expand All @@ -41,7 +41,7 @@ source ~/.bashrc

# Install only Pi dependencies
# Installs ROS dependencies
source /opt/ros/humble/setup.sh && rosdep install --from-paths src/pi --ignore-src -r -y
source /opt/ros/iron/setup.sh && rosdep install --from-paths src/pi --ignore-src -r -y

# Crazy one liner for install python dependencies
for d in src/pi/*/; do sudo pip install -e "$d"; done
Expand Down
15 changes: 13 additions & 2 deletions .vscode/ros2_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,25 @@ sudo apt-get update
sudo apt-get install curl -y
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 dev tools like rosdep among others. This is ros-distro agnostic.
# More info can be found here
# https://discourse.ros.org/t/ros-developer-tools-now-in-binary-form/29802
sudo apt install ros-dev-tools

# Install pip
sudo apt install python3-pip

# Update any installed packages
sudo apt-get update
sudo apt-get upgrade -y

# Install ROS2
sudo apt-get install ros-humble-desktop -y
sudo apt-get install ros-iron-desktop -y
sudo apt-get upgrade -y

# Add setup.bash to .bashrc only if it isn't already there
ROS_LINE='source /opt/ros/humble/setup.bash'
ROS_LINE='source /opt/ros/iron/setup.bash'
if ! grep -qF "$ROS_LINE" ~/.bashrc ;
then echo "$ROS_LINE" >> ~/.bashrc ;
fi
Expand All @@ -36,5 +46,6 @@ fi
source ~/.bashrc

# Start rosdep
sudo rosdep init
rosdep update
source ~/.bashrc
4 changes: 2 additions & 2 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@
{
"label": "Docker Pull",
"type": "shell",
"command": "sudo docker pull ghcr.io/cwrurobotics/rov-24:main",
"command": "sudo docker pull ghcr.io/cwrurobotics/rov-24:iron",
"windows": {
"command": "docker pull ghcr.io/cwrurobotics/rov-24:main"
"command": "docker pull ghcr.io/cwrurobotics/rov-24:iron"
},
"hide": true
},
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM osrf/ros:humble-desktop-full
FROM osrf/ros:iron-desktop-full

RUN sudo apt-get update -y

Expand Down Expand Up @@ -32,7 +32,7 @@ RUN echo "$export PYTHONWARNINGS=ignore:::setuptools.command.install,ignore:::se
# Installs ROS and python dependencies
RUN . /root/rov-24/.vscode/install_dependencies.sh

RUN . /opt/ros/humble/setup.sh \
RUN . /opt/ros/iron/setup.sh \
&& PYTHONWARNINGS=ignore:::setuptools.command.install,ignore:::setuptools.command.easy_install,ignore:::pkg_resources; export PYTHONWARNINGS\
&& colcon build --symlink-install

Expand Down
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ To reopen after a build Go to File > Open Recent /stuff/rov-24 \[Dev Container]

#### Bare Metal

To run the install script use `F1` or `ctrl+shift+p` to open the command bar and use `Tasks: Runs Task`. Then from the Task selection choose `First Time Setup`. This will install ROS and all our dependencies.
To run the install script use `F1` or `ctrl+shift+p` to open the command bar and use `Tasks: Runs Task`. Then from the Task selection choose `Setup Surface Environment`. This will install ROS and all our dependencies.

### Windows

Expand Down Expand Up @@ -89,7 +89,7 @@ After WSL has been installed follow [this](https://code.visualstudio.com/docs/re

Then run the install script.

To run the install script use `F1` or `ctrl+shift+p` to open the command bar and use `Tasks: Runs Task`. Then from the Task selection choose `First Time Setup`. This will install ROS and all our dependencies.
To run the install script use `F1` or `ctrl+shift+p` to open the command bar and use `Tasks: Runs Task`. Then from the Task selection choose `Setup Surface Environment`. This will install ROS and all our dependencies.

### macOS

Expand All @@ -106,6 +106,10 @@ To reopen after a build Go to File > Open Recent /stuff/rov-24 \[Dev Container]
<!-- Xserver testing on mac TODO ssh keys work -->
<!-- https://gist.github.com/cschiewek/246a244ba23da8b9f0e7b11a68bf3285 -->

## Upgrading Environment

If you are upgrading to a newer ROS version make sure to remove `source /opt/ros/$PREVIOUS_ROS_DISTRO/setup.bash`. If you are using Docker you can simply build the new container and delete the old one.

## Test environment

After running the script open a terminal and run
Expand Down
2 changes: 1 addition & 1 deletion src/pi/camera_streamer/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>camera_streamer</name>
<version>1.0.0</version>
<version>1.1.0</version>
<description>Capture video from usb and pi cameras and send it as MJPEG streams on ROS topics</description>
<maintainer email="[email protected]">Noah Mollerstuen</maintainer>
<license>Apches License 2.0</license>
Expand Down
4 changes: 2 additions & 2 deletions src/pi/camera_streamer/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

setup(
name=PACKAGE_NAME,
version='1.0.0',
version='1.1.0',
packages=[PACKAGE_NAME],
data_files=[
('share/ament_index/resource_index/packages',
Expand All @@ -18,7 +18,7 @@
(os.path.join('share', PACKAGE_NAME, 'launch'),
glob('launch/*launch.[pxy][yma]*'))
],
install_requires=['setuptools', 'flake8==5.0.4', 'mypy >= 1.7'],
install_requires=['setuptools', 'flake8==4.0.1', 'mypy >= 1.7'],
zip_safe=True,
maintainer='Noah Mollerstuen',
maintainer_email='[email protected]',
Expand Down
2 changes: 1 addition & 1 deletion src/pi/manipulators/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>manipulators</name>
<version>1.0.0</version>
<version>1.1.0</version>
<description>Code for manipulators.</description>
<maintainer email="[email protected]">Georgia Martinez</maintainer>
<maintainer email="[email protected]">Michael Carlstrom</maintainer>
Expand Down
4 changes: 2 additions & 2 deletions src/pi/manipulators/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

setup(
name=PACKAGE_NAME,
version='1.0.0',
version='1.1.0',
packages=[PACKAGE_NAME],
data_files=[
('share/ament_index/resource_index/packages',
Expand All @@ -18,7 +18,7 @@
(os.path.join('share', PACKAGE_NAME, 'launch'),
glob('launch/*launch.[pxy][yma]*'))
],
install_requires=['setuptools', 'flake8==5.0.4', 'mypy >= 1.7'],
install_requires=['setuptools', 'flake8==4.0.1', 'mypy >= 1.7'],
zip_safe=True,
maintainer='Georgia Martinez, Michael Carlstrom',
maintainer_email='[email protected], [email protected]',
Expand Down
5 changes: 3 additions & 2 deletions src/pi/pi_main/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,18 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>pi_main</name>
<version>1.0.0</version>
<version>1.1.0</version>
<description>MATE ROV Pi Main</description>
<maintainer email="[email protected]">Benjamin Poulin</maintainer>
<license>Apache License 2.0</license>

<build_depend>robot_upstart</build_depend>

<test_depend>ament_flake8</test_depend>
<test_depend>ament_pep257</test_depend>
<test_depend>python3-pytest</test_depend>

<exec_depend>ros2launch</exec_depend>
<build_depend>robot_upstart</build_depend>

<export>
<build_type>ament_python</build_type>
Expand Down
4 changes: 2 additions & 2 deletions src/pi/pi_main/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

setup(
name=PACKAGE_NAME,
version='1.0.0',
version='1.1.0',
packages=[PACKAGE_NAME],
data_files=[
('share/ament_index/resource_index/packages',
Expand All @@ -21,7 +21,7 @@
(os.path.join('share', PACKAGE_NAME, 'udev_rules'),
glob('udev_rules/*'))
],
install_requires=['setuptools', 'flake8==5.0.4', 'mypy >= 1.7'],
install_requires=['setuptools', 'flake8==4.0.1', 'mypy >= 1.7'],
zip_safe=True,
maintainer='Michael Carlstrom',
maintainer_email='[email protected]',
Expand Down
2 changes: 1 addition & 1 deletion src/pi/pixhawk_communication/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>pixhawk_communication</name>
<version>1.0.0</version>
<version>1.1.0</version>
<description>Manages Pixhawk</description>
<maintainer email="[email protected]">Michael Carlstrom</maintainer>
<license>Apache License 2.0</license>
Expand Down
4 changes: 2 additions & 2 deletions src/pi/pixhawk_communication/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

setup(
name=PACKAGE_NAME,
version='1.0.0',
version='1.1.0',
packages=[PACKAGE_NAME],
data_files=[
('share/ament_index/resource_index/packages',
Expand All @@ -18,7 +18,7 @@
(os.path.join('share', PACKAGE_NAME, 'launch'),
glob('launch/*launch.[pxy][yma]*'))
],
install_requires=['setuptools', 'flake8==5.0.4', 'mypy >= 1.7'],
install_requires=['setuptools', 'flake8==4.0.1', 'mypy >= 1.7'],
zip_safe=True,
maintainer='Michael Carlstrom',
maintainer_email='[email protected]',
Expand Down
2 changes: 1 addition & 1 deletion src/pi/realsense/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>realsense</name>
<version>1.0.0</version>
<version>1.1.0</version>
<description>MATE ROV Pi Realsense</description>
<maintainer email="[email protected]">Michael Carlstrom</maintainer>
<license>Apache License 2.0</license>
Expand Down
4 changes: 2 additions & 2 deletions src/pi/realsense/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

setup(
name=PACKAGE_NAME,
version='1.0.0',
version='1.1.0',
packages=[PACKAGE_NAME],
data_files=[
('share/ament_index/resource_index/packages',
Expand All @@ -19,7 +19,7 @@
(os.path.join('share', PACKAGE_NAME, 'launch'),
glob('launch/*launch.[pxy][yma]*'))
],
install_requires=['setuptools', 'flake8==5.0.4', 'mypy >= 1.7'],
install_requires=['setuptools', 'flake8==4.0.1', 'mypy >= 1.7'],
zip_safe=True,
maintainer='Michael Carlstrom',
maintainer_email='[email protected]',
Expand Down
1 change: 1 addition & 0 deletions src/pi/robot_upstart
Submodule robot_upstart added at 12340f
2 changes: 1 addition & 1 deletion src/rov_msgs/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>rov_msgs</name>
<version>1.0.1</version>
<version>1.1.0</version>
<description>MATE ROV Custom ROS messages</description>
<maintainer email="[email protected]">Benjamin Poulin</maintainer>
<maintainer email="[email protected]">Eric Yarnot</maintainer>
Expand Down
2 changes: 1 addition & 1 deletion src/surface/flight_control/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>flight_control</name>
<version>1.0.0</version>
<version>1.1.0</version>
<description>Mate ROV sub movement controllers</description>
<maintainer email="[email protected]">Benjamin</maintainer>
<license>Apache License 2.0</license>
Expand Down
4 changes: 2 additions & 2 deletions src/surface/flight_control/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

setup(
name=package_name,
version='1.0.0',
version='1.1.0',
packages=[package_name],
data_files=[
('share/ament_index/resource_index/packages',
Expand All @@ -17,7 +17,7 @@
(os.path.join('share', package_name, 'launch'),
glob('launch/*launch.[pxy][yma]*'))
],
install_requires=['setuptools', 'flake8==5.0.4', 'mypy>=1.7', 'pynput'],
install_requires=['setuptools', 'flake8==4.0.1', 'mypy>=1.7', 'pynput'],
zip_safe=True,
maintainer='benjamin',
maintainer_email='[email protected]',
Expand Down
Loading

0 comments on commit 5f5005c

Please sign in to comment.