From 3545d4a3656c12417cb29642d54f9f9bbd15d513 Mon Sep 17 00:00:00 2001 From: Michael Carlstrom <36806982+InvincibleRMC@users.noreply.github.com> Date: Tue, 14 Nov 2023 19:52:57 -0500 Subject: [PATCH 01/47] Update industrial_ci_action.yml --- .github/workflows/industrial_ci_action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/industrial_ci_action.yml b/.github/workflows/industrial_ci_action.yml index 9410ec45..48710130 100644 --- a/.github/workflows/industrial_ci_action.yml +++ b/.github/workflows/industrial_ci_action.yml @@ -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} @@ -44,7 +44,7 @@ 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_DISTRO: ${{ matrix.ROS_DISTRO }} ROS_REPO: ${{ matrix.ROS_REPO }} # 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' From 69c06ec5486d2ba840168a3b97e3544be71ae73a Mon Sep 17 00:00:00 2001 From: Michael Carlstrom Date: Tue, 14 Nov 2023 22:25:52 -0500 Subject: [PATCH 02/47] shrimple as test --- .gitmodules | 4 ++++ src/pi/pi_main/launch/pi_launch.py | 20 ++++++++++---------- src/pi/pi_main/package.xml | 1 - src/pi/pi_main/pi_main/install_on_boot.py | 18 +++++++++--------- src/pi/pi_main/pi_main/udev_copy.py | 1 + src/pi/pi_main/setup.py | 4 +--- src/pi/robot_upstart | 1 + 7 files changed, 26 insertions(+), 23 deletions(-) create mode 160000 src/pi/robot_upstart diff --git a/.gitmodules b/.gitmodules index f693d1eb..050eb907 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,7 @@ [submodule "src/surface/ros2_video_streamer"] path = src/surface/ros2_video_streamer url = git@github.com:cwruRobotics/ros2_video_streamer.git +[submodule "src/pi/robot_upstart"] + path = src/pi/robot_upstart + url = git@github.com:clearpathrobotics/robot_upstart.git + branch = foxy-devel diff --git a/src/pi/pi_main/launch/pi_launch.py b/src/pi/pi_main/launch/pi_launch.py index fbb550e4..59460c25 100644 --- a/src/pi/pi_main/launch/pi_launch.py +++ b/src/pi/pi_main/launch/pi_launch.py @@ -9,16 +9,16 @@ def generate_launch_description(): NS = 'pi' - # Manipulator Controller - manip_path: str = get_package_share_directory('manipulators') + # # Manipulator Controller + # manip_path: str = get_package_share_directory('manipulators') - manip_launch = IncludeLaunchDescription( - PythonLaunchDescriptionSource([ - os.path.join( - manip_path, 'launch', 'manip_launch.py' - ) - ]) - ) + # manip_launch = IncludeLaunchDescription( + # PythonLaunchDescriptionSource([ + # os.path.join( + # manip_path, 'launch', 'manip_launch.py' + # ) + # ]) + # ) # Camera Streamer cam_path: str = get_package_share_directory('camera_streamer') @@ -57,7 +57,7 @@ def generate_launch_description(): namespace_launch = GroupAction( actions=[ PushRosNamespace(NS), - manip_launch, + # manip_launch, pixhawk_launch, cam_launch, # realsense_launch diff --git a/src/pi/pi_main/package.xml b/src/pi/pi_main/package.xml index 830ecae1..92375014 100644 --- a/src/pi/pi_main/package.xml +++ b/src/pi/pi_main/package.xml @@ -12,7 +12,6 @@ python3-pytest ros2launch - robot_upstart ament_python diff --git a/src/pi/pi_main/pi_main/install_on_boot.py b/src/pi/pi_main/pi_main/install_on_boot.py index cc0e4bf0..43029b5b 100644 --- a/src/pi/pi_main/pi_main/install_on_boot.py +++ b/src/pi/pi_main/pi_main/install_on_boot.py @@ -1,9 +1,9 @@ import os import subprocess -import sys +import pathlib from ament_index_python.packages import get_package_share_directory -from robot_upstart import Job +from robot_upstart.job import Job def main(): @@ -20,14 +20,14 @@ def main(): os.symlink(launch_src, launch_dst) - udev_script = os.path.join(pi_main_share, 'udev_copy', 'udev_copy.py') + file_location = pathlib.Path(__file__).parent.resolve() - major_num = sys.version_info[0] - minor_num = sys.version_info[1] - udev_script = os.path.join(os.path.dirname(os.path.abspath(pi_main_share)), '../', 'lib', - f'python{major_num}.{minor_num}', - 'site-packages', 'pi_main', 'udev_copy.py') - subprocess.call(['/usr/bin/sudo', 'python3', udev_script, pi_main_share]) + udev_script = os.path.join(file_location, 'udev_copy.py') + + p = subprocess.run(['sudo'] + ['python'] + [udev_script] + [pi_main_share], capture_output=True, + check=True) + + print(p.stdout.decode()) cwrubotix_job = Job(name='cwrubotix_pi', rmw='rmw_cyclonedds_cpp') cwrubotix_job.symlink = True diff --git a/src/pi/pi_main/pi_main/udev_copy.py b/src/pi/pi_main/pi_main/udev_copy.py index 29c0ba17..539eaac4 100644 --- a/src/pi/pi_main/pi_main/udev_copy.py +++ b/src/pi/pi_main/pi_main/udev_copy.py @@ -9,3 +9,4 @@ udev_dst_dir = os.path.join('/etc', 'udev', 'rules.d') shutil.copytree(udev_src_dir, udev_dst_dir, dirs_exist_ok=True) + print("Copying udev rules.") diff --git a/src/pi/pi_main/setup.py b/src/pi/pi_main/setup.py index ecc7df52..d0959413 100644 --- a/src/pi/pi_main/setup.py +++ b/src/pi/pi_main/setup.py @@ -18,9 +18,7 @@ (os.path.join('share', package_name, 'launch'), glob('launch/*launch.[pxy][yma]*')), (os.path.join('share', package_name, 'udev_rules'), - glob('udev_rules/*')), - (os.path.join('share', package_name, 'udev_copy'), - glob('pi_main/udev_copy.py')) + glob('udev_rules/*')) ], install_requires=['setuptools'], zip_safe=True, diff --git a/src/pi/robot_upstart b/src/pi/robot_upstart new file mode 160000 index 00000000..12340f4c --- /dev/null +++ b/src/pi/robot_upstart @@ -0,0 +1 @@ +Subproject commit 12340f4c6835a9f455bb2fa81bded40bc069f78e From 587bc16707894afd4906eb552b9398ad15d9a896 Mon Sep 17 00:00:00 2001 From: Michael Carlstrom Date: Tue, 14 Nov 2023 22:41:52 -0500 Subject: [PATCH 03/47] cool new unit test --- src/pi/pi_main/pi_main/install_on_boot.py | 5 ++--- src/pi/pi_main/test/test_install_on_boot.py | 22 +++++++++++++++++++++ 2 files changed, 24 insertions(+), 3 deletions(-) create mode 100644 src/pi/pi_main/test/test_install_on_boot.py diff --git a/src/pi/pi_main/pi_main/install_on_boot.py b/src/pi/pi_main/pi_main/install_on_boot.py index 43029b5b..48c7d38c 100644 --- a/src/pi/pi_main/pi_main/install_on_boot.py +++ b/src/pi/pi_main/pi_main/install_on_boot.py @@ -21,11 +21,10 @@ def main(): os.symlink(launch_src, launch_dst) file_location = pathlib.Path(__file__).parent.resolve() - udev_script = os.path.join(file_location, 'udev_copy.py') - p = subprocess.run(['sudo'] + ['python'] + [udev_script] + [pi_main_share], capture_output=True, - check=True) + p = subprocess.run(['sudo'] + ['python'] + [udev_script] + [pi_main_share], + capture_output=True, check=True) print(p.stdout.decode()) diff --git a/src/pi/pi_main/test/test_install_on_boot.py b/src/pi/pi_main/test/test_install_on_boot.py new file mode 100644 index 00000000..b13df5ad --- /dev/null +++ b/src/pi/pi_main/test/test_install_on_boot.py @@ -0,0 +1,22 @@ +import os + +from pi_main.install_on_boot import main + +EXPECTED_SYSTEM_FILES = ["/etc/ros/humble/cwrubotix_pi.d/.installed_files", + "/etc/ros/humble/cwrubotix_pi.d/pi.launch.py", + "/etc/systemd/system/multi-user.target.wants/cwrubotix_pi.service", + "/lib/systemd/system/cwrubotix_pi.service", + "/usr/sbin/cwrubotix_pi-start", + "/usr/sbin/cwrubotix_pi-stop"] + + +def test_install_on_boot(): + """Test that file copying and systemd are made.""" + main() + + actual_rules_files = set(os.listdir(os.path.join("/etc", "udev", "rules.d"))) + expected_rules_files = set(["i2c.rules", "camera.rules", "pixhawk.rules"]) + assert expected_rules_files.issubset(actual_rules_files) + + for file in EXPECTED_SYSTEM_FILES: + assert os.path.isfile(file) From da0da1d16cfd9f8c4595e9172189790b8931573e Mon Sep 17 00:00:00 2001 From: Michael Carlstrom Date: Tue, 14 Nov 2023 22:42:41 -0500 Subject: [PATCH 04/47] comments --- src/pi/pi_main/test/test_install_on_boot.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pi/pi_main/test/test_install_on_boot.py b/src/pi/pi_main/test/test_install_on_boot.py index b13df5ad..23e568e6 100644 --- a/src/pi/pi_main/test/test_install_on_boot.py +++ b/src/pi/pi_main/test/test_install_on_boot.py @@ -14,9 +14,11 @@ def test_install_on_boot(): """Test that file copying and systemd are made.""" main() + # Test for rules files being copied correctly actual_rules_files = set(os.listdir(os.path.join("/etc", "udev", "rules.d"))) expected_rules_files = set(["i2c.rules", "camera.rules", "pixhawk.rules"]) assert expected_rules_files.issubset(actual_rules_files) + # Checks for files created by robot_upstart for file in EXPECTED_SYSTEM_FILES: assert os.path.isfile(file) From ab1ce0968a8a36f00013576a2529905996ed93db Mon Sep 17 00:00:00 2001 From: Michael Carlstrom Date: Tue, 14 Nov 2023 22:51:02 -0500 Subject: [PATCH 05/47] add try --- src/pi/pi_main/pi_main/install_on_boot.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/pi/pi_main/pi_main/install_on_boot.py b/src/pi/pi_main/pi_main/install_on_boot.py index 48c7d38c..2cc5bc79 100644 --- a/src/pi/pi_main/pi_main/install_on_boot.py +++ b/src/pi/pi_main/pi_main/install_on_boot.py @@ -23,8 +23,12 @@ def main(): file_location = pathlib.Path(__file__).parent.resolve() udev_script = os.path.join(file_location, 'udev_copy.py') - p = subprocess.run(['sudo'] + ['python'] + [udev_script] + [pi_main_share], - capture_output=True, check=True) + try: + p = subprocess.run(['sudo'] + ['python'] + [udev_script] + [pi_main_share], + capture_output=True, check=True) + except subprocess.CalledProcessError as e: + print(e) + assert False print(p.stdout.decode()) From 31bab5a6d5872aeb7c93ee172134190bfbf97a1c Mon Sep 17 00:00:00 2001 From: Michael Carlstrom Date: Tue, 14 Nov 2023 23:09:54 -0500 Subject: [PATCH 06/47] more debugging --- src/pi/pi_main/pi_main/install_on_boot.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/pi/pi_main/pi_main/install_on_boot.py b/src/pi/pi_main/pi_main/install_on_boot.py index 2cc5bc79..84e5a03a 100644 --- a/src/pi/pi_main/pi_main/install_on_boot.py +++ b/src/pi/pi_main/pi_main/install_on_boot.py @@ -1,4 +1,5 @@ import os +import sys import subprocess import pathlib @@ -22,14 +23,14 @@ def main(): file_location = pathlib.Path(__file__).parent.resolve() udev_script = os.path.join(file_location, 'udev_copy.py') - try: p = subprocess.run(['sudo'] + ['python'] + [udev_script] + [pi_main_share], capture_output=True, check=True) except subprocess.CalledProcessError as e: - print(e) - assert False + print(e.stderr) + sys.exit(1) + # Sucess Message print(p.stdout.decode()) cwrubotix_job = Job(name='cwrubotix_pi', rmw='rmw_cyclonedds_cpp') From efdbde800281b24bfb814e1e6ab386a75beb94b7 Mon Sep 17 00:00:00 2001 From: Michael Carlstrom Date: Tue, 14 Nov 2023 23:16:53 -0500 Subject: [PATCH 07/47] add full path for commadn --- src/pi/pi_main/pi_main/install_on_boot.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/pi/pi_main/pi_main/install_on_boot.py b/src/pi/pi_main/pi_main/install_on_boot.py index 84e5a03a..2b78e6be 100644 --- a/src/pi/pi_main/pi_main/install_on_boot.py +++ b/src/pi/pi_main/pi_main/install_on_boot.py @@ -23,9 +23,10 @@ def main(): file_location = pathlib.Path(__file__).parent.resolve() udev_script = os.path.join(file_location, 'udev_copy.py') + cmd = ['/usr/bin/sudo'] + ['/usr/bin/python'] + [udev_script] + [pi_main_share] + try: - p = subprocess.run(['sudo'] + ['python'] + [udev_script] + [pi_main_share], - capture_output=True, check=True) + p = subprocess.run(cmd, capture_output=True, check=True) except subprocess.CalledProcessError as e: print(e.stderr) sys.exit(1) From 088a45e62633ca7e606b6244efcfb309ee0e035f Mon Sep 17 00:00:00 2001 From: Michael Carlstrom Date: Tue, 14 Nov 2023 23:19:42 -0500 Subject: [PATCH 08/47] add error logging --- src/pi/pi_main/pi_main/install_on_boot.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pi/pi_main/pi_main/install_on_boot.py b/src/pi/pi_main/pi_main/install_on_boot.py index 2b78e6be..61f5be9d 100644 --- a/src/pi/pi_main/pi_main/install_on_boot.py +++ b/src/pi/pi_main/pi_main/install_on_boot.py @@ -27,6 +27,7 @@ def main(): try: p = subprocess.run(cmd, capture_output=True, check=True) + # Logs Error except subprocess.CalledProcessError as e: print(e.stderr) sys.exit(1) From 622260e2f5048807d2a031056d363701b535febc Mon Sep 17 00:00:00 2001 From: Michael Carlstrom Date: Tue, 14 Nov 2023 23:26:03 -0500 Subject: [PATCH 09/47] help --- src/pi/pi_main/pi_main/install_on_boot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pi/pi_main/pi_main/install_on_boot.py b/src/pi/pi_main/pi_main/install_on_boot.py index 61f5be9d..dde924e6 100644 --- a/src/pi/pi_main/pi_main/install_on_boot.py +++ b/src/pi/pi_main/pi_main/install_on_boot.py @@ -23,7 +23,7 @@ def main(): file_location = pathlib.Path(__file__).parent.resolve() udev_script = os.path.join(file_location, 'udev_copy.py') - cmd = ['/usr/bin/sudo'] + ['/usr/bin/python'] + [udev_script] + [pi_main_share] + cmd = ['/usr/bin/sudo'] + ['/usr/bin/python3'] + [udev_script] + [pi_main_share] try: p = subprocess.run(cmd, capture_output=True, check=True) From 7bb9f6b7a4093a6f5b732cbae77d00bff9c779d4 Mon Sep 17 00:00:00 2001 From: Michael Carlstrom Date: Tue, 14 Nov 2023 23:26:07 -0500 Subject: [PATCH 10/47] help --- src/pi/pi_main/pi_main/install_on_boot.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/pi/pi_main/pi_main/install_on_boot.py b/src/pi/pi_main/pi_main/install_on_boot.py index dde924e6..43c81ef4 100644 --- a/src/pi/pi_main/pi_main/install_on_boot.py +++ b/src/pi/pi_main/pi_main/install_on_boot.py @@ -23,6 +23,12 @@ def main(): file_location = pathlib.Path(__file__).parent.resolve() udev_script = os.path.join(file_location, 'udev_copy.py') + + print(os.listdir("/usr/bin")) + + print() + print() + cmd = ['/usr/bin/sudo'] + ['/usr/bin/python3'] + [udev_script] + [pi_main_share] try: From 5ac3dd9e95bc6f6272d7a254504065fb76f03796 Mon Sep 17 00:00:00 2001 From: Michael Carlstrom <36806982+InvincibleRMC@users.noreply.github.com> Date: Tue, 14 Nov 2023 23:36:18 -0500 Subject: [PATCH 11/47] Update industrial_ci_action.yml --- .github/workflows/industrial_ci_action.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/industrial_ci_action.yml b/.github/workflows/industrial_ci_action.yml index 48710130..33bdcc93 100644 --- a/.github/workflows/industrial_ci_action.yml +++ b/.github/workflows/industrial_ci_action.yml @@ -45,6 +45,9 @@ jobs: - uses: 'ros-industrial/industrial_ci@master' # run industrial_ci env: # either pass all entries explicitly ROS_DISTRO: ${{ matrix.ROS_DISTRO }} - ROS_REPO: ${{ matrix.ROS_REPO }} - # 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' + ROS_REPO: ${{ matrix.ROS_REPO }} + # Install missing libxcb-cursor0 xvfb for PyQt unit testing + # https://pytest-qt.readthedocs.io/en/latest/troubleshooting.html + # Added back so testing without Dockerfile can be done + # Crazy one liner for install pyqt testing and python dependencies + AFTER_INSTALL_TARGET_DEPENDENCIES_EMBED: 'sudo apt-g et install libxcb-cursor0 xvfb -y &&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' From d406dc957d1211eadeee4f500badcd3eb7f2776f Mon Sep 17 00:00:00 2001 From: Michael Carlstrom Date: Tue, 14 Nov 2023 23:36:30 -0500 Subject: [PATCH 12/47] remove text --- src/pi/pi_main/pi_main/install_on_boot.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/pi/pi_main/pi_main/install_on_boot.py b/src/pi/pi_main/pi_main/install_on_boot.py index 43c81ef4..4103e64b 100644 --- a/src/pi/pi_main/pi_main/install_on_boot.py +++ b/src/pi/pi_main/pi_main/install_on_boot.py @@ -24,11 +24,6 @@ def main(): file_location = pathlib.Path(__file__).parent.resolve() udev_script = os.path.join(file_location, 'udev_copy.py') - print(os.listdir("/usr/bin")) - - print() - print() - cmd = ['/usr/bin/sudo'] + ['/usr/bin/python3'] + [udev_script] + [pi_main_share] try: From 045a6c7ce824c21f1d955f63abc77bb7b9325596 Mon Sep 17 00:00:00 2001 From: Michael Carlstrom <36806982+InvincibleRMC@users.noreply.github.com> Date: Tue, 14 Nov 2023 23:45:13 -0500 Subject: [PATCH 13/47] Update industrial_ci_action.yml --- .github/workflows/industrial_ci_action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/industrial_ci_action.yml b/.github/workflows/industrial_ci_action.yml index 33bdcc93..d18bc2f3 100644 --- a/.github/workflows/industrial_ci_action.yml +++ b/.github/workflows/industrial_ci_action.yml @@ -50,4 +50,4 @@ jobs: # https://pytest-qt.readthedocs.io/en/latest/troubleshooting.html # Added back so testing without Dockerfile can be done # Crazy one liner for install pyqt testing and python dependencies - AFTER_INSTALL_TARGET_DEPENDENCIES_EMBED: 'sudo apt-g et install libxcb-cursor0 xvfb -y &&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: 'sudo apt-get install libxcb-cursor0 xvfb -y && 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' From e372c86f9c96fb86319ae1f6f314c0e209f2043d Mon Sep 17 00:00:00 2001 From: Michael Carlstrom Date: Wed, 15 Nov 2023 00:04:14 -0500 Subject: [PATCH 14/47] manual path --- src/pi/pi_main/pi_main/install_on_boot.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/pi/pi_main/pi_main/install_on_boot.py b/src/pi/pi_main/pi_main/install_on_boot.py index 4103e64b..880bc61c 100644 --- a/src/pi/pi_main/pi_main/install_on_boot.py +++ b/src/pi/pi_main/pi_main/install_on_boot.py @@ -36,7 +36,10 @@ def main(): # Sucess Message print(p.stdout.decode()) - cwrubotix_job = Job(name='cwrubotix_pi', rmw='rmw_cyclonedds_cpp') + install_path = os.path.join(pi_main_share, "..", "..", "install") + workspace_path = os.path.join(install_path, "setup.bash") + cwrubotix_job = Job(name='cwrubotix_pi', rmw='rmw_cyclonedds_cpp', + workspace_setup=workspace_path) cwrubotix_job.symlink = True cwrubotix_job.uninstall() cwrubotix_job.add(package='pi_main', filename='launch/pi.launch.py') From dfdf71af9b69f3ba7bc3f7ae791451db7c953f17 Mon Sep 17 00:00:00 2001 From: Michael Carlstrom Date: Wed, 15 Nov 2023 00:09:18 -0500 Subject: [PATCH 15/47] copium --- .github/workflows/industrial_ci_action.yml | 3 ++- src/pi/pi_main/pi_main/install_on_boot.py | 5 +---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/industrial_ci_action.yml b/.github/workflows/industrial_ci_action.yml index d18bc2f3..2db663f4 100644 --- a/.github/workflows/industrial_ci_action.yml +++ b/.github/workflows/industrial_ci_action.yml @@ -50,4 +50,5 @@ jobs: # https://pytest-qt.readthedocs.io/en/latest/troubleshooting.html # Added back so testing without Dockerfile can be done # Crazy one liner for install pyqt testing and python dependencies - AFTER_INSTALL_TARGET_DEPENDENCIES_EMBED: 'sudo apt-get install libxcb-cursor0 xvfb -y && 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' + # Add export CMAKE_PREFIX_PATH=/root/target_ws/rov-24/install/setup.bash + AFTER_INSTALL_TARGET_DEPENDENCIES_EMBED: 'sudo apt-get install libxcb-cursor0 xvfb -y && 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 && export CMAKE_PREFIX_PATH=/root/target_ws/rov-24/install/setup.bash' diff --git a/src/pi/pi_main/pi_main/install_on_boot.py b/src/pi/pi_main/pi_main/install_on_boot.py index 880bc61c..4103e64b 100644 --- a/src/pi/pi_main/pi_main/install_on_boot.py +++ b/src/pi/pi_main/pi_main/install_on_boot.py @@ -36,10 +36,7 @@ def main(): # Sucess Message print(p.stdout.decode()) - install_path = os.path.join(pi_main_share, "..", "..", "install") - workspace_path = os.path.join(install_path, "setup.bash") - cwrubotix_job = Job(name='cwrubotix_pi', rmw='rmw_cyclonedds_cpp', - workspace_setup=workspace_path) + cwrubotix_job = Job(name='cwrubotix_pi', rmw='rmw_cyclonedds_cpp') cwrubotix_job.symlink = True cwrubotix_job.uninstall() cwrubotix_job.add(package='pi_main', filename='launch/pi.launch.py') From 78095e016f3e4764516562c7fff0c322eb01abe2 Mon Sep 17 00:00:00 2001 From: Michael Carlstrom <36806982+InvincibleRMC@users.noreply.github.com> Date: Wed, 15 Nov 2023 00:15:56 -0500 Subject: [PATCH 16/47] Update industrial_ci_action.yml --- .github/workflows/industrial_ci_action.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/industrial_ci_action.yml b/.github/workflows/industrial_ci_action.yml index 2db663f4..ba294355 100644 --- a/.github/workflows/industrial_ci_action.yml +++ b/.github/workflows/industrial_ci_action.yml @@ -50,5 +50,6 @@ jobs: # https://pytest-qt.readthedocs.io/en/latest/troubleshooting.html # Added back so testing without Dockerfile can be done # Crazy one liner for install pyqt testing and python dependencies - # Add export CMAKE_PREFIX_PATH=/root/target_ws/rov-24/install/setup.bash - AFTER_INSTALL_TARGET_DEPENDENCIES_EMBED: 'sudo apt-get install libxcb-cursor0 xvfb -y && 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 && export CMAKE_PREFIX_PATH=/root/target_ws/rov-24/install/setup.bash' + AFTER_INSTALL_TARGET_DEPENDENCIES_EMBED: 'sudo apt-get install libxcb-cursor0 xvfb -y && 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' + # Add export CMAKE_PREFIX_PATH=/root/target_ws/rov-24/install/setup.bash for unit testing robot_upstart + CMAKE_PREFIX_PATH: '/root/target_ws/rov-24/install/setup.bash' From e44f2c166494b3da4516ca27b8701e737b076831 Mon Sep 17 00:00:00 2001 From: Michael Carlstrom Date: Wed, 15 Nov 2023 00:18:23 -0500 Subject: [PATCH 17/47] build depend? --- src/pi/pi_main/package.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pi/pi_main/package.xml b/src/pi/pi_main/package.xml index 92375014..890fa7d2 100644 --- a/src/pi/pi_main/package.xml +++ b/src/pi/pi_main/package.xml @@ -7,6 +7,8 @@ Benjamin Poulin Apache License 2.0 + robot_upstart + ament_flake8 ament_pep257 python3-pytest From 05153f2d72b9ae13a13db9e6c426f35b57776061 Mon Sep 17 00:00:00 2001 From: Michael Carlstrom Date: Wed, 15 Nov 2023 00:23:49 -0500 Subject: [PATCH 18/47] revert change --- .github/workflows/industrial_ci_action.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/industrial_ci_action.yml b/.github/workflows/industrial_ci_action.yml index ba294355..2db663f4 100644 --- a/.github/workflows/industrial_ci_action.yml +++ b/.github/workflows/industrial_ci_action.yml @@ -50,6 +50,5 @@ jobs: # https://pytest-qt.readthedocs.io/en/latest/troubleshooting.html # Added back so testing without Dockerfile can be done # Crazy one liner for install pyqt testing and python dependencies - AFTER_INSTALL_TARGET_DEPENDENCIES_EMBED: 'sudo apt-get install libxcb-cursor0 xvfb -y && 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' - # Add export CMAKE_PREFIX_PATH=/root/target_ws/rov-24/install/setup.bash for unit testing robot_upstart - CMAKE_PREFIX_PATH: '/root/target_ws/rov-24/install/setup.bash' + # Add export CMAKE_PREFIX_PATH=/root/target_ws/rov-24/install/setup.bash + AFTER_INSTALL_TARGET_DEPENDENCIES_EMBED: 'sudo apt-get install libxcb-cursor0 xvfb -y && 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 && export CMAKE_PREFIX_PATH=/root/target_ws/rov-24/install/setup.bash' From c24f184fa7c4a0a7b2c5207400edc8e8eb6d8588 Mon Sep 17 00:00:00 2001 From: Michael Carlstrom Date: Wed, 15 Nov 2023 00:37:43 -0500 Subject: [PATCH 19/47] fixed path to iron --- src/pi/pi_main/test/test_install_on_boot.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/pi/pi_main/test/test_install_on_boot.py b/src/pi/pi_main/test/test_install_on_boot.py index 23e568e6..d965edc1 100644 --- a/src/pi/pi_main/test/test_install_on_boot.py +++ b/src/pi/pi_main/test/test_install_on_boot.py @@ -2,10 +2,10 @@ from pi_main.install_on_boot import main -EXPECTED_SYSTEM_FILES = ["/etc/ros/humble/cwrubotix_pi.d/.installed_files", - "/etc/ros/humble/cwrubotix_pi.d/pi.launch.py", - "/etc/systemd/system/multi-user.target.wants/cwrubotix_pi.service", - "/lib/systemd/system/cwrubotix_pi.service", +ROS_DISTRO = os.getenv("ROS_DISTRO") + +EXPECTED_SYSTEM_FILES = [f"/etc/ros/{ROS_DISTRO}/cwrubotix_pi.d/.installed_files", + f"/etc/ros/{ROS_DISTRO}/cwrubotix_pi.d/pi.launch.py", "/usr/sbin/cwrubotix_pi-start", "/usr/sbin/cwrubotix_pi-stop"] From 90bf1411c2a3ccb5164c81bce081b3a32c9408d5 Mon Sep 17 00:00:00 2001 From: Michael Carlstrom Date: Wed, 15 Nov 2023 00:42:15 -0500 Subject: [PATCH 20/47] Downstream hope --- .github/workflows/industrial_ci_action.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/industrial_ci_action.yml b/.github/workflows/industrial_ci_action.yml index 2db663f4..4aedcc90 100644 --- a/.github/workflows/industrial_ci_action.yml +++ b/.github/workflows/industrial_ci_action.yml @@ -52,3 +52,5 @@ jobs: # Crazy one liner for install pyqt testing and python dependencies # Add export CMAKE_PREFIX_PATH=/root/target_ws/rov-24/install/setup.bash AFTER_INSTALL_TARGET_DEPENDENCIES_EMBED: 'sudo apt-get install libxcb-cursor0 xvfb -y && 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 && export CMAKE_PREFIX_PATH=/root/target_ws/rov-24/install/setup.bash' + # Used to disable submodule tests which might not be passing + NOT_TEST_DOWNSTREAM: true From 638a2f7a6dde22323882d519e4c69c41dc783750 Mon Sep 17 00:00:00 2001 From: Michael Carlstrom <36806982+InvincibleRMC@users.noreply.github.com> Date: Wed, 15 Nov 2023 00:47:46 -0500 Subject: [PATCH 21/47] Update industrial_ci_action.yml --- .github/workflows/industrial_ci_action.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/industrial_ci_action.yml b/.github/workflows/industrial_ci_action.yml index 4aedcc90..2db663f4 100644 --- a/.github/workflows/industrial_ci_action.yml +++ b/.github/workflows/industrial_ci_action.yml @@ -52,5 +52,3 @@ jobs: # Crazy one liner for install pyqt testing and python dependencies # Add export CMAKE_PREFIX_PATH=/root/target_ws/rov-24/install/setup.bash AFTER_INSTALL_TARGET_DEPENDENCIES_EMBED: 'sudo apt-get install libxcb-cursor0 xvfb -y && 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 && export CMAKE_PREFIX_PATH=/root/target_ws/rov-24/install/setup.bash' - # Used to disable submodule tests which might not be passing - NOT_TEST_DOWNSTREAM: true From 7d4da6577bebf9b0a2c6d1efbe53e4ada7421e04 Mon Sep 17 00:00:00 2001 From: Michael Carlstrom Date: Wed, 15 Nov 2023 09:43:44 -0500 Subject: [PATCH 22/47] iron --- Dockerfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 377edcea..9d5114be 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ -FROM osrf/ros:humble-desktop-full +FROM osrf/ros:iron-desktop-full -RUN . /opt/ros/humble/setup.sh \ +RUN . /opt/ros/iron/setup.sh \ && rosdep update RUN sudo apt-get update -y @@ -33,13 +33,13 @@ WORKDIR /root/rov-24 COPY . . # Installs ROS dependencies -RUN . /opt/ros/humble/setup.sh \ +RUN . /opt/ros/iron/setup.sh \ && rosdep install --from-paths src --ignore-src -r -y # Crazy one liner for install python dependencies RUN for d in src/pi/*/ src/surface/*/; do sudo pip install -e "$d"; done -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 From a136c19f9c1815a29bbcc3d63df9d4a6e56be4dc Mon Sep 17 00:00:00 2001 From: Michael Carlstrom Date: Wed, 15 Nov 2023 09:48:42 -0500 Subject: [PATCH 23/47] add explicit path --- src/pi/pi_main/pi_main/install_on_boot.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/pi/pi_main/pi_main/install_on_boot.py b/src/pi/pi_main/pi_main/install_on_boot.py index 4103e64b..393f4627 100644 --- a/src/pi/pi_main/pi_main/install_on_boot.py +++ b/src/pi/pi_main/pi_main/install_on_boot.py @@ -1,3 +1,4 @@ +from gettext import install import os import sys import subprocess @@ -36,7 +37,10 @@ def main(): # Sucess Message print(p.stdout.decode()) - cwrubotix_job = Job(name='cwrubotix_pi', rmw='rmw_cyclonedds_cpp') + install_path = os.path.join(pi_main_share, "..", "..") + workspace_path = os.path.join(install_path, "setup.bash") + cwrubotix_job = Job(name='cwrubotix_pi', rmw='rmw_cyclonedds_cpp', + workspace_setup=workspace_path) cwrubotix_job.symlink = True cwrubotix_job.uninstall() cwrubotix_job.add(package='pi_main', filename='launch/pi.launch.py') From 262fa0c7b162603afafe9b6c7505db69458605f4 Mon Sep 17 00:00:00 2001 From: Michael Carlstrom Date: Wed, 15 Nov 2023 09:57:23 -0500 Subject: [PATCH 24/47] remove mystery import --- src/pi/pi_main/pi_main/install_on_boot.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/pi/pi_main/pi_main/install_on_boot.py b/src/pi/pi_main/pi_main/install_on_boot.py index 393f4627..c5733ba6 100644 --- a/src/pi/pi_main/pi_main/install_on_boot.py +++ b/src/pi/pi_main/pi_main/install_on_boot.py @@ -1,4 +1,3 @@ -from gettext import install import os import sys import subprocess @@ -34,7 +33,7 @@ def main(): print(e.stderr) sys.exit(1) - # Sucess Message + # Success Message print(p.stdout.decode()) install_path = os.path.join(pi_main_share, "..", "..") From a38a2d044a3a077fea6d52106a528577932edc90 Mon Sep 17 00:00:00 2001 From: Michael Carlstrom Date: Wed, 15 Nov 2023 10:04:49 -0500 Subject: [PATCH 25/47] test upstream --- .github/workflows/industrial_ci_action.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/industrial_ci_action.yml b/.github/workflows/industrial_ci_action.yml index 2db663f4..bf6c1da8 100644 --- a/.github/workflows/industrial_ci_action.yml +++ b/.github/workflows/industrial_ci_action.yml @@ -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@v3 # fetch/store the directory used by ccache before/after the ci run with: path: ${{ env.CCACHE_DIR }} @@ -50,5 +47,6 @@ jobs: # https://pytest-qt.readthedocs.io/en/latest/troubleshooting.html # Added back so testing without Dockerfile can be done # Crazy one liner for install pyqt testing and python dependencies - # Add export CMAKE_PREFIX_PATH=/root/target_ws/rov-24/install/setup.bash - AFTER_INSTALL_TARGET_DEPENDENCIES_EMBED: 'sudo apt-get install libxcb-cursor0 xvfb -y && 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 && export CMAKE_PREFIX_PATH=/root/target_ws/rov-24/install/setup.bash' + AFTER_INSTALL_TARGET_DEPENDENCIES_EMBED: 'sudo apt-get install libxcb-cursor0 xvfb -y && 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.com:clearpathrobotics/robot_upstart#foxy-devel' From 6bef2c85a98539f585e058586eabbe75832f6e39 Mon Sep 17 00:00:00 2001 From: Michael Carlstrom <36806982+InvincibleRMC@users.noreply.github.com> Date: Wed, 15 Nov 2023 10:14:09 -0500 Subject: [PATCH 26/47] Update industrial_ci_action.yml --- .github/workflows/industrial_ci_action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/industrial_ci_action.yml b/.github/workflows/industrial_ci_action.yml index bf6c1da8..42a33822 100644 --- a/.github/workflows/industrial_ci_action.yml +++ b/.github/workflows/industrial_ci_action.yml @@ -49,4 +49,4 @@ jobs: # Crazy one liner for install pyqt testing and python dependencies AFTER_INSTALL_TARGET_DEPENDENCIES_EMBED: 'sudo apt-get install libxcb-cursor0 xvfb -y && 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.com:clearpathrobotics/robot_upstart#foxy-devel' + UPSTREAM_WORKSPACE: 'github:clearpathrobotics/robot_upstart#foxy-devel' From 91b005da52359417567f1412871de947d2800e57 Mon Sep 17 00:00:00 2001 From: Michael Carlstrom Date: Wed, 15 Nov 2023 15:43:12 -0500 Subject: [PATCH 27/47] test out iron container --- .devcontainer/linux/devcontainer.json | 2 +- .devcontainer/macos/devcontainer.json | 2 +- .devcontainer/windows/devcontainer.json | 2 +- .github/workflows/docker.yml | 2 +- .github/workflows/industrial_ci_action.yml | 3 ++- .vscode/tasks.json | 4 ++-- 6 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.devcontainer/linux/devcontainer.json b/.devcontainer/linux/devcontainer.json index 6f09be19..7d44aab2 100644 --- a/.devcontainer/linux/devcontainer.json +++ b/.devcontainer/linux/devcontainer.json @@ -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}" }, diff --git a/.devcontainer/macos/devcontainer.json b/.devcontainer/macos/devcontainer.json index 56c90a99..0cc12191 100644 --- a/.devcontainer/macos/devcontainer.json +++ b/.devcontainer/macos/devcontainer.json @@ -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}" }, diff --git a/.devcontainer/windows/devcontainer.json b/.devcontainer/windows/devcontainer.json index 62d1d937..2d72cc18 100644 --- a/.devcontainer/windows/devcontainer.json +++ b/.devcontainer/windows/devcontainer.json @@ -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}" }, diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 17f37f23..d7b8db81 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -4,7 +4,7 @@ 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: diff --git a/.github/workflows/industrial_ci_action.yml b/.github/workflows/industrial_ci_action.yml index 42a33822..9c3b001b 100644 --- a/.github/workflows/industrial_ci_action.yml +++ b/.github/workflows/industrial_ci_action.yml @@ -41,7 +41,8 @@ jobs: - uses: 'ros-industrial/industrial_ci@master' # run industrial_ci env: # either pass all entries explicitly - ROS_DISTRO: ${{ matrix.ROS_DISTRO }} + 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 diff --git a/.vscode/tasks.json b/.vscode/tasks.json index b41334a4..b819f549 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -34,9 +34,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 }, From 9e95a2c91420310b0b30083389a2d23707226b31 Mon Sep 17 00:00:00 2001 From: Michael Carlstrom Date: Fri, 17 Nov 2023 12:32:39 -0500 Subject: [PATCH 28/47] move deb install --- .github/workflows/industrial_ci_action.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/industrial_ci_action.yml b/.github/workflows/industrial_ci_action.yml index 9c3b001b..824abc07 100644 --- a/.github/workflows/industrial_ci_action.yml +++ b/.github/workflows/industrial_ci_action.yml @@ -47,7 +47,8 @@ jobs: # Install missing libxcb-cursor0 xvfb for PyQt unit testing # https://pytest-qt.readthedocs.io/en/latest/troubleshooting.html # Added back so testing without Dockerfile can be done - # Crazy one liner for install pyqt testing and python dependencies - AFTER_INSTALL_TARGET_DEPENDENCIES_EMBED: 'sudo apt-get install libxcb-cursor0 xvfb -y && 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' + 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' # 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' From 5582f1313bed56e82915caa925ff92589705342b Mon Sep 17 00:00:00 2001 From: Michael Carlstrom Date: Sun, 26 Nov 2023 20:23:07 -0500 Subject: [PATCH 29/47] update install files to iron --- .vscode/install_dependencies.sh | 4 ++-- .vscode/pi_setup.sh | 6 +++--- .vscode/ros2_install.sh | 4 ++-- src/surface/ros2_video_streamer | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.vscode/install_dependencies.sh b/.vscode/install_dependencies.sh index 7c79c3d7..bba50925 100755 --- a/.vscode/install_dependencies.sh +++ b/.vscode/install_dependencies.sh @@ -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 # Crazy one liner for install python dependencies for d in src/pi/*/ src/surface/*/; do pip install -e "$d"; done diff --git a/.vscode/pi_setup.sh b/.vscode/pi_setup.sh index 7768434b..512f8427 100755 --- a/.vscode/pi_setup.sh +++ b/.vscode/pi_setup.sh @@ -17,11 +17,11 @@ sudo apt-get update sudo apt-get upgrade -y # Install ROS2 -sudo apt-get install ros-humble-ros-base +sudo apt-get install ros-iron-ros-base 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 @@ -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 diff --git a/.vscode/ros2_install.sh b/.vscode/ros2_install.sh index 7811cb31..0f305d4e 100755 --- a/.vscode/ros2_install.sh +++ b/.vscode/ros2_install.sh @@ -17,11 +17,11 @@ sudo apt-get update sudo apt-get upgrade -y # Install ROS2 -sudo apt-get install ros-humble-desktop +sudo apt-get install ros-iron-desktop 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 diff --git a/src/surface/ros2_video_streamer b/src/surface/ros2_video_streamer index ec5f178b..0d6f2496 160000 --- a/src/surface/ros2_video_streamer +++ b/src/surface/ros2_video_streamer @@ -1 +1 @@ -Subproject commit ec5f178bcc56df34f83aa157e6f691c2ef45503c +Subproject commit 0d6f24962e366b77a0f393a476cad22d33934e0e From 24c9deced65ea9ac99919b020d91521c4804d049 Mon Sep 17 00:00:00 2001 From: Michael Carlstrom Date: Sun, 26 Nov 2023 22:24:34 -0500 Subject: [PATCH 30/47] update clinet.py --- src/surface/gui/gui/event_nodes/client.py | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/surface/gui/gui/event_nodes/client.py b/src/surface/gui/gui/event_nodes/client.py index 02933f0d..38afd9b9 100644 --- a/src/surface/gui/gui/event_nodes/client.py +++ b/src/surface/gui/gui/event_nodes/client.py @@ -6,16 +6,17 @@ from rclpy.client import Client, SrvType, SrvTypeRequest from rclpy.node import Node -# Set to None for no timeout limits on service requests -# else set to float number of seconds to limit request spinning -# TODO? Should be param of each Client -TIMEOUT_SEC: float = 1.0 - class GUIEventClient(Node): """Multithreaded client for sending service requests from the GUI.""" - def __init__(self, srv_type: SrvType, topic: str, signal: pyqtBoundSignal): + # TODO in the release after Iron can add back the Optional around timeout + # The fix internally is already out on Rolling + # Set to None for no timeout limits on service requests + # else set to float number of seconds to limit request spinning + def __init__(self, srv_type: SrvType, topic: str, signal: pyqtBoundSignal, + timeout: float = 1.0): + # Name this node with a sanitized version of the topic self.name: str = f'client_{re.sub(r"[^a-zA-Z0-9_]", "_", topic)}' super().__init__(self.name, parameter_overrides=[]) @@ -28,9 +29,11 @@ def __init__(self, srv_type: SrvType, topic: str, signal: pyqtBoundSignal): Thread(target=self.__connect_to_service, daemon=True, name=f'{self.name}_connect_to_service').start() + self.timeout = timeout + def __connect_to_service(self) -> None: """Connect this client to a server in a separate thread.""" - while not self.cli.wait_for_service(timeout_sec=TIMEOUT_SEC): + while not self.cli.wait_for_service(timeout_sec=self.timeout): # TODO this f strings looks janky self.get_logger().info( 'Service for GUI event client node on topic' + @@ -46,7 +49,7 @@ def __send_request_with_signal(self, request: SrvTypeRequest) -> None: """Send synchronous request to server and emit signal.""" future = self.cli.call_async(request) rclpy.spin_until_future_complete( - self, future, timeout_sec=TIMEOUT_SEC) + self, future, timeout_sec=self.timeout) try: self.signal.emit(future.result()) From 020fce5e4c4d32a53c09a9ececcd76ea55abf746 Mon Sep 17 00:00:00 2001 From: Michael Carlstrom Date: Mon, 27 Nov 2023 22:40:27 -0500 Subject: [PATCH 31/47] update mypy.ini --- mypy.ini | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mypy.ini b/mypy.ini index 912121a5..34c3bfda 100644 --- a/mypy.ini +++ b/mypy.ini @@ -1,4 +1,8 @@ [mypy] strict = True +;Done becuase tons of python packages are missing stubs or py.typed markers ignore_missing_imports = True -disable_error_code = misc +;Done because some calls insides rclpy are not typed +disallow_untyped_calls = True +; Done because rclpy Node has type Any +disallow_subclassing_any = True From b42f009021343c36d7fbd48069ec98c165929e27 Mon Sep 17 00:00:00 2001 From: Michael Carlstrom Date: Mon, 27 Nov 2023 22:43:21 -0500 Subject: [PATCH 32/47] narrowed mypy.ini --- mypy.ini | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mypy.ini b/mypy.ini index 34c3bfda..d77b7e6a 100644 --- a/mypy.ini +++ b/mypy.ini @@ -3,6 +3,6 @@ strict = True ;Done becuase tons of python packages are missing stubs or py.typed markers ignore_missing_imports = True ;Done because some calls insides rclpy are not typed -disallow_untyped_calls = True +disallow_untyped_calls = False ; Done because rclpy Node has type Any -disallow_subclassing_any = True +disallow_subclassing_any = False From 3862fafb214b52b659764092e748e18167fb5bd2 Mon Sep 17 00:00:00 2001 From: Michael Carlstrom Date: Mon, 27 Nov 2023 22:51:43 -0500 Subject: [PATCH 33/47] pointless task selector fixes for linter --- src/surface/task_selector/task_selector/basic_task_node.py | 5 ++--- .../task_selector/task_selector/basic_task_timed_node.py | 5 ++--- src/surface/task_selector/task_selector/is_morning_node.py | 3 +-- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/surface/task_selector/task_selector/basic_task_node.py b/src/surface/task_selector/task_selector/basic_task_node.py index 68dc8c4c..73b04386 100644 --- a/src/surface/task_selector/task_selector/basic_task_node.py +++ b/src/surface/task_selector/task_selector/basic_task_node.py @@ -1,6 +1,5 @@ import rclpy -from rclpy.action import ActionServer, CancelResponse -from rclpy.action.server import ServerGoalHandle +from rclpy.action.server import ActionServer, CancelResponse, ServerGoalHandle from rclpy.executors import MultiThreadedExecutor from rclpy.node import Node @@ -38,7 +37,7 @@ def execute_callback(self, goal_handle: ServerGoalHandle) -> BasicTask.Result: result = BasicTask.Result() return result - def cancel_callback(self, goal_handle: ServerGoalHandle) -> CancelResponse.ACCEPT: + def cancel_callback(self, goal_handle: ServerGoalHandle) -> CancelResponse: self.get_logger().info('Received cancel request') return CancelResponse.ACCEPT diff --git a/src/surface/task_selector/task_selector/basic_task_timed_node.py b/src/surface/task_selector/task_selector/basic_task_timed_node.py index 7b0d57f7..c2156c4b 100644 --- a/src/surface/task_selector/task_selector/basic_task_timed_node.py +++ b/src/surface/task_selector/task_selector/basic_task_timed_node.py @@ -1,8 +1,7 @@ import time import rclpy -from rclpy.action import ActionServer, CancelResponse -from rclpy.action.server import ServerGoalHandle +from rclpy.action.server import ActionServer, CancelResponse, ServerGoalHandle from rclpy.executors import MultiThreadedExecutor from rclpy.node import Node @@ -44,7 +43,7 @@ def execute_callback(self, goal_handle: ServerGoalHandle) -> BasicTask.Result: result = BasicTask.Result() return result - def cancel_callback(self, goal_handle: ServerGoalHandle) -> CancelResponse.ACCEPT: + def cancel_callback(self, goal_handle: ServerGoalHandle) -> CancelResponse: self.get_logger().info('Received cancel request') return CancelResponse.ACCEPT diff --git a/src/surface/task_selector/task_selector/is_morning_node.py b/src/surface/task_selector/task_selector/is_morning_node.py index 8f05f381..b51ba49e 100644 --- a/src/surface/task_selector/task_selector/is_morning_node.py +++ b/src/surface/task_selector/task_selector/is_morning_node.py @@ -1,6 +1,5 @@ import rclpy -from rclpy.action import ActionServer -from rclpy.action.server import ServerGoalHandle +from rclpy.action.server import ActionServer, ServerGoalHandle from rclpy.executors import MultiThreadedExecutor from rclpy.node import Node From 22469316df9553f9993c4efeb74f12688355ab6a Mon Sep 17 00:00:00 2001 From: Michael Carlstrom Date: Mon, 4 Dec 2023 19:36:22 -0500 Subject: [PATCH 34/47] remove extra self.timeout --- src/surface/gui/gui/event_nodes/client.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/surface/gui/gui/event_nodes/client.py b/src/surface/gui/gui/event_nodes/client.py index 3579c5fb..4fb555e4 100644 --- a/src/surface/gui/gui/event_nodes/client.py +++ b/src/surface/gui/gui/event_nodes/client.py @@ -31,8 +31,6 @@ def __init__(self, srv_type: SrvType, topic: str, signal: pyqtBoundSignal, Thread(target=self.__connect_to_service, daemon=True, name=f'{self.name}_connect_to_service').start() - self.timeout = timeout - def __connect_to_service(self) -> None: """Connect this client to a server in a separate thread.""" while not self.cli.wait_for_service(timeout_sec=self.timeout): From 3c95f76da42b67afd292510740dd25c26294c1b5 Mon Sep 17 00:00:00 2001 From: Michael Carlstrom Date: Thu, 7 Dec 2023 10:15:32 -0500 Subject: [PATCH 35/47] clean up --- .github/workflows/docker.yml | 1 - .github/workflows/industrial_ci_action.yml | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index e88eb37f..1af96772 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -1,4 +1,3 @@ -# 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. diff --git a/.github/workflows/industrial_ci_action.yml b/.github/workflows/industrial_ci_action.yml index 824abc07..78d4b76a 100644 --- a/.github/workflows/industrial_ci_action.yml +++ b/.github/workflows/industrial_ci_action.yml @@ -41,12 +41,12 @@ jobs: - uses: 'ros-industrial/industrial_ci@master' # run industrial_ci env: # either pass all entries explicitly + # 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 - # Added back so testing without Dockerfile can be done 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' From 2af2cca02f044dbb8b2d4a4fac332a76f9eea909 Mon Sep 17 00:00:00 2001 From: Michael Carlstrom Date: Thu, 7 Dec 2023 10:32:00 -0500 Subject: [PATCH 36/47] iron breaks on flake8 >5 hoping the new rolling fix will get backported --- src/pi/camera_streamer/setup.py | 2 +- src/pi/manipulators/setup.py | 2 +- src/pi/pi_main/setup.py | 2 +- src/pi/pixhawk_communication/setup.py | 2 +- src/pi/realsense/setup.py | 2 +- src/surface/flight_control/setup.py | 2 +- src/surface/gui/setup.py | 2 +- src/surface/ps5_controller/setup.py | 2 +- src/surface/ros2_video_streamer | 2 +- src/surface/surface_main/setup.py | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/pi/camera_streamer/setup.py b/src/pi/camera_streamer/setup.py index 46dc20ed..1dcab2c8 100644 --- a/src/pi/camera_streamer/setup.py +++ b/src/pi/camera_streamer/setup.py @@ -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='noah@mollerstuen.com', diff --git a/src/pi/manipulators/setup.py b/src/pi/manipulators/setup.py index 91554f3c..6c45869d 100644 --- a/src/pi/manipulators/setup.py +++ b/src/pi/manipulators/setup.py @@ -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='gcm49@case.edu, rmc170@case.edu', diff --git a/src/pi/pi_main/setup.py b/src/pi/pi_main/setup.py index e83c8b65..6e345e61 100644 --- a/src/pi/pi_main/setup.py +++ b/src/pi/pi_main/setup.py @@ -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='rmc170@case.edu', diff --git a/src/pi/pixhawk_communication/setup.py b/src/pi/pixhawk_communication/setup.py index ff6d6920..f55542a6 100644 --- a/src/pi/pixhawk_communication/setup.py +++ b/src/pi/pixhawk_communication/setup.py @@ -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='rmc@carlstrom.com', diff --git a/src/pi/realsense/setup.py b/src/pi/realsense/setup.py index bc40b3d0..05114fa5 100644 --- a/src/pi/realsense/setup.py +++ b/src/pi/realsense/setup.py @@ -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='rmc170@case.edu', diff --git a/src/surface/flight_control/setup.py b/src/surface/flight_control/setup.py index 4213bd15..fecd198a 100644 --- a/src/surface/flight_control/setup.py +++ b/src/surface/flight_control/setup.py @@ -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='bwp18@case.edu', diff --git a/src/surface/gui/setup.py b/src/surface/gui/setup.py index 4bd963b4..8796a58c 100644 --- a/src/surface/gui/setup.py +++ b/src/surface/gui/setup.py @@ -20,7 +20,7 @@ glob('launch/*launch.[pxy][yma]*')) ], install_requires=['setuptools', 'pyqt6', 'pyqtdarktheme', 'opencv-python>=4.8.1', - 'numpy>=1.26', 'pytest-qt', 'pytest-xvfb', 'flake8==5.0.4', 'mypy>=1.7'], + 'numpy>=1.26', 'pytest-qt', 'pytest-xvfb', 'flake8==4.0.1', 'mypy>=1.7'], zip_safe=True, maintainer='Benjamin Poulin', maintainer_email='bwp18@case.edu', diff --git a/src/surface/ps5_controller/setup.py b/src/surface/ps5_controller/setup.py index 1e774264..d844a8c7 100644 --- a/src/surface/ps5_controller/setup.py +++ b/src/surface/ps5_controller/setup.py @@ -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='rmc170@case.edu', diff --git a/src/surface/ros2_video_streamer b/src/surface/ros2_video_streamer index bf082b09..aed5f989 160000 --- a/src/surface/ros2_video_streamer +++ b/src/surface/ros2_video_streamer @@ -1 +1 @@ -Subproject commit bf082b0929ed12949558ede6b6a1b82f82a939a8 +Subproject commit aed5f98999c1b73894d8f8ec21976f2c8077e1b0 diff --git a/src/surface/surface_main/setup.py b/src/surface/surface_main/setup.py index cb5f249c..83574567 100644 --- a/src/surface/surface_main/setup.py +++ b/src/surface/surface_main/setup.py @@ -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='rmc170@case.edu', From c3c61e6fad8160b1ab56aa170b8ba330f840f6f1 Mon Sep 17 00:00:00 2001 From: Michael Carlstrom Date: Mon, 18 Dec 2023 14:36:09 -0500 Subject: [PATCH 37/47] bump version number --- src/pi/camera_streamer/package.xml | 2 +- src/pi/camera_streamer/setup.py | 2 +- src/pi/manipulators/package.xml | 2 +- src/pi/manipulators/setup.py | 2 +- src/pi/pi_main/package.xml | 2 +- src/pi/pi_main/setup.py | 2 +- src/pi/pixhawk_communication/package.xml | 2 +- src/pi/pixhawk_communication/setup.py | 2 +- src/pi/realsense/package.xml | 2 +- src/pi/realsense/setup.py | 2 +- src/surface/flight_control/package.xml | 2 +- src/surface/flight_control/setup.py | 2 +- src/surface/gui/package.xml | 2 +- src/surface/gui/setup.py | 2 +- src/surface/ps5_controller/package.xml | 2 +- src/surface/ps5_controller/setup.py | 2 +- src/surface/ros2_video_streamer | 2 +- src/surface/rov_flir/package.xml | 2 +- src/surface/rov_flir/setup.py | 2 +- src/surface/rov_gazebo/package.xml | 2 +- src/surface/rov_gazebo/setup.py | 2 +- src/surface/surface_main/package.xml | 2 +- src/surface/surface_main/setup.py | 2 +- 23 files changed, 23 insertions(+), 23 deletions(-) diff --git a/src/pi/camera_streamer/package.xml b/src/pi/camera_streamer/package.xml index ce383216..e0e9a23e 100644 --- a/src/pi/camera_streamer/package.xml +++ b/src/pi/camera_streamer/package.xml @@ -2,7 +2,7 @@ camera_streamer - 1.0.0 + 1.1.0 Capture video from usb and pi cameras and send it as MJPEG streams on ROS topics Noah Mollerstuen Apches License 2.0 diff --git a/src/pi/camera_streamer/setup.py b/src/pi/camera_streamer/setup.py index 1dcab2c8..dcf5924e 100644 --- a/src/pi/camera_streamer/setup.py +++ b/src/pi/camera_streamer/setup.py @@ -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', diff --git a/src/pi/manipulators/package.xml b/src/pi/manipulators/package.xml index f7872a39..0de90e93 100644 --- a/src/pi/manipulators/package.xml +++ b/src/pi/manipulators/package.xml @@ -2,7 +2,7 @@ manipulators - 1.0.0 + 1.1.0 Code for manipulators. Georgia Martinez Michael Carlstrom diff --git a/src/pi/manipulators/setup.py b/src/pi/manipulators/setup.py index 6c45869d..6cd07e56 100644 --- a/src/pi/manipulators/setup.py +++ b/src/pi/manipulators/setup.py @@ -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', diff --git a/src/pi/pi_main/package.xml b/src/pi/pi_main/package.xml index 890fa7d2..82db3f36 100644 --- a/src/pi/pi_main/package.xml +++ b/src/pi/pi_main/package.xml @@ -2,7 +2,7 @@ pi_main - 1.0.0 + 1.1.0 MATE ROV Pi Main Benjamin Poulin Apache License 2.0 diff --git a/src/pi/pi_main/setup.py b/src/pi/pi_main/setup.py index 6e345e61..a5bf8efd 100644 --- a/src/pi/pi_main/setup.py +++ b/src/pi/pi_main/setup.py @@ -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', diff --git a/src/pi/pixhawk_communication/package.xml b/src/pi/pixhawk_communication/package.xml index c3c881d4..3347acba 100644 --- a/src/pi/pixhawk_communication/package.xml +++ b/src/pi/pixhawk_communication/package.xml @@ -2,7 +2,7 @@ pixhawk_communication - 1.0.0 + 1.1.0 Manages Pixhawk Michael Carlstrom Apache License 2.0 diff --git a/src/pi/pixhawk_communication/setup.py b/src/pi/pixhawk_communication/setup.py index f55542a6..23a5564d 100644 --- a/src/pi/pixhawk_communication/setup.py +++ b/src/pi/pixhawk_communication/setup.py @@ -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', diff --git a/src/pi/realsense/package.xml b/src/pi/realsense/package.xml index 41e15cfe..edf8d748 100644 --- a/src/pi/realsense/package.xml +++ b/src/pi/realsense/package.xml @@ -2,7 +2,7 @@ realsense - 1.0.0 + 1.1.0 MATE ROV Pi Realsense Michael Carlstrom Apache License 2.0 diff --git a/src/pi/realsense/setup.py b/src/pi/realsense/setup.py index 05114fa5..499dc125 100644 --- a/src/pi/realsense/setup.py +++ b/src/pi/realsense/setup.py @@ -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', diff --git a/src/surface/flight_control/package.xml b/src/surface/flight_control/package.xml index 78689a5a..beedf691 100644 --- a/src/surface/flight_control/package.xml +++ b/src/surface/flight_control/package.xml @@ -2,7 +2,7 @@ flight_control - 1.0.0 + 1.1.0 Mate ROV sub movement controllers Benjamin Apache License 2.0 diff --git a/src/surface/flight_control/setup.py b/src/surface/flight_control/setup.py index fecd198a..1651b242 100644 --- a/src/surface/flight_control/setup.py +++ b/src/surface/flight_control/setup.py @@ -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', diff --git a/src/surface/gui/package.xml b/src/surface/gui/package.xml index cea31521..1925b0e9 100644 --- a/src/surface/gui/package.xml +++ b/src/surface/gui/package.xml @@ -2,7 +2,7 @@ gui - 1.0.0 + 1.1.0 MATE ROV GUI and related ROS nodes Benjamin Poulin Apache License 2.0 diff --git a/src/surface/gui/setup.py b/src/surface/gui/setup.py index 8796a58c..e53887f4 100644 --- a/src/surface/gui/setup.py +++ b/src/surface/gui/setup.py @@ -8,7 +8,7 @@ setup( name=PACKAGE_NAME, - version='1.0.0', + version='1.1.0', packages=[PACKAGE_NAME, os.path.join(PACKAGE_NAME, 'widgets'), os.path.join(PACKAGE_NAME, 'event_nodes')], data_files=[ diff --git a/src/surface/ps5_controller/package.xml b/src/surface/ps5_controller/package.xml index 838d8120..9fd4de0a 100644 --- a/src/surface/ps5_controller/package.xml +++ b/src/surface/ps5_controller/package.xml @@ -2,7 +2,7 @@ ps5_controller - 1.0.0 + 1.1.0 Boilerplate for calling standard joystick launch file. Michael Carlstrom Apache License 2.0 diff --git a/src/surface/ps5_controller/setup.py b/src/surface/ps5_controller/setup.py index 3bdaccce..c7b19729 100644 --- a/src/surface/ps5_controller/setup.py +++ b/src/surface/ps5_controller/setup.py @@ -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', diff --git a/src/surface/ros2_video_streamer b/src/surface/ros2_video_streamer index e1a8d332..a33c6b01 160000 --- a/src/surface/ros2_video_streamer +++ b/src/surface/ros2_video_streamer @@ -1 +1 @@ -Subproject commit e1a8d332467ed3109117a19db74c2385b59f116a +Subproject commit a33c6b011d6241c678b141d057e2435d5bd91ae1 diff --git a/src/surface/rov_flir/package.xml b/src/surface/rov_flir/package.xml index be941b00..5e23881e 100644 --- a/src/surface/rov_flir/package.xml +++ b/src/surface/rov_flir/package.xml @@ -2,7 +2,7 @@ rov_flir - 1.0.0 + 1.1.0 Boilerplate for calling flir launch file. Michael Carlstrom Apache License 2.0 diff --git a/src/surface/rov_flir/setup.py b/src/surface/rov_flir/setup.py index 6717701e..a9b88642 100644 --- a/src/surface/rov_flir/setup.py +++ b/src/surface/rov_flir/setup.py @@ -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', diff --git a/src/surface/rov_gazebo/package.xml b/src/surface/rov_gazebo/package.xml index 61c48ae2..a1a0f183 100644 --- a/src/surface/rov_gazebo/package.xml +++ b/src/surface/rov_gazebo/package.xml @@ -2,7 +2,7 @@ rov_gazebo - 1.0.0 + 1.1.0 MATE ROV simulation Seongmin Jung Apache License 2.0 diff --git a/src/surface/rov_gazebo/setup.py b/src/surface/rov_gazebo/setup.py index 33f49162..85733d8e 100644 --- a/src/surface/rov_gazebo/setup.py +++ b/src/surface/rov_gazebo/setup.py @@ -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", ["resource/" + PACKAGE_NAME]), diff --git a/src/surface/surface_main/package.xml b/src/surface/surface_main/package.xml index 64644072..44ec4d30 100644 --- a/src/surface/surface_main/package.xml +++ b/src/surface/surface_main/package.xml @@ -2,7 +2,7 @@ surface_main - 1.0.0 + 1.1.0 MATE ROV Surface Main Benjamin Poulin Apache License 2.0 diff --git a/src/surface/surface_main/setup.py b/src/surface/surface_main/setup.py index 83574567..74db7982 100644 --- a/src/surface/surface_main/setup.py +++ b/src/surface/surface_main/setup.py @@ -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', From 33b09d753fcbaf3418d4aad63ea31d677f89d28d Mon Sep 17 00:00:00 2001 From: Michael Carlstrom Date: Mon, 18 Dec 2023 14:52:54 -0500 Subject: [PATCH 38/47] update missing version --- src/rov_msgs/package.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rov_msgs/package.xml b/src/rov_msgs/package.xml index 108cb80c..7d4c17f7 100644 --- a/src/rov_msgs/package.xml +++ b/src/rov_msgs/package.xml @@ -2,7 +2,7 @@ rov_msgs - 1.0.1 + 1.1.0 MATE ROV Custom ROS messages Benjamin Poulin Eric Yarnot From 5840e261841c6ee20269600d1e6f8ca239616563 Mon Sep 17 00:00:00 2001 From: Michael Carlstrom Date: Sat, 20 Jan 2024 14:45:45 -0500 Subject: [PATCH 39/47] fix? --- .github/workflows/industrial_ci_action.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/industrial_ci_action.yml b/.github/workflows/industrial_ci_action.yml index e6b7ea7b..5e92a0b4 100644 --- a/.github/workflows/industrial_ci_action.yml +++ b/.github/workflows/industrial_ci_action.yml @@ -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 }} From a4ad5ed0396a224bcd547557ef872afafe51aaaf Mon Sep 17 00:00:00 2001 From: Michael Carlstrom Date: Sat, 20 Jan 2024 15:00:22 -0500 Subject: [PATCH 40/47] update text --- README.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 475afc8a..18df4bd4 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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 @@ -106,6 +106,10 @@ To reopen after a build Go to File > Open Recent /stuff/rov-24 \[Dev Container] +## 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 From 0c2c735befa20ed191320763afea6cb4851c72c3 Mon Sep 17 00:00:00 2001 From: Michael Carlstrom Date: Sat, 20 Jan 2024 15:00:29 -0500 Subject: [PATCH 41/47] submod --- src/surface/ros2_video_streamer | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/surface/ros2_video_streamer b/src/surface/ros2_video_streamer index 6d254eb3..3bd06f81 160000 --- a/src/surface/ros2_video_streamer +++ b/src/surface/ros2_video_streamer @@ -1 +1 @@ -Subproject commit 6d254eb31c0d7d8a44f757233fa497839b204eab +Subproject commit 3bd06f81f3396eec948cf41db74cb5862869d2e0 From 83d83eb29adfba1358f53e4daa58766984c0212e Mon Sep 17 00:00:00 2001 From: Michael Carlstrom Date: Sat, 20 Jan 2024 15:09:12 -0500 Subject: [PATCH 42/47] ? --- .gitmodules | 4 ---- src/pi/robot_upstart | 1 - 2 files changed, 5 deletions(-) delete mode 160000 src/pi/robot_upstart diff --git a/.gitmodules b/.gitmodules index 050eb907..f693d1eb 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,7 +1,3 @@ [submodule "src/surface/ros2_video_streamer"] path = src/surface/ros2_video_streamer url = git@github.com:cwruRobotics/ros2_video_streamer.git -[submodule "src/pi/robot_upstart"] - path = src/pi/robot_upstart - url = git@github.com:clearpathrobotics/robot_upstart.git - branch = foxy-devel diff --git a/src/pi/robot_upstart b/src/pi/robot_upstart deleted file mode 160000 index 12340f4c..00000000 --- a/src/pi/robot_upstart +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 12340f4c6835a9f455bb2fa81bded40bc069f78e From 0ed26236b56e6e84b76c126b171010b95b5997f3 Mon Sep 17 00:00:00 2001 From: Michael Carlstrom Date: Sat, 20 Jan 2024 15:09:43 -0500 Subject: [PATCH 43/47] robot_upstart --- .gitmodules | 4 ++++ src/pi/robot_upstart | 1 + 2 files changed, 5 insertions(+) create mode 160000 src/pi/robot_upstart diff --git a/.gitmodules b/.gitmodules index f693d1eb..050eb907 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,7 @@ [submodule "src/surface/ros2_video_streamer"] path = src/surface/ros2_video_streamer url = git@github.com:cwruRobotics/ros2_video_streamer.git +[submodule "src/pi/robot_upstart"] + path = src/pi/robot_upstart + url = git@github.com:clearpathrobotics/robot_upstart.git + branch = foxy-devel diff --git a/src/pi/robot_upstart b/src/pi/robot_upstart new file mode 160000 index 00000000..12340f4c --- /dev/null +++ b/src/pi/robot_upstart @@ -0,0 +1 @@ +Subproject commit 12340f4c6835a9f455bb2fa81bded40bc069f78e From 22aee669795f939a7027069eaba75d3beac84a10 Mon Sep 17 00:00:00 2001 From: Michael Carlstrom Date: Sat, 20 Jan 2024 16:23:17 -0500 Subject: [PATCH 44/47] fix --- src/surface/gui/gui/event_nodes/subscriber.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/surface/gui/gui/event_nodes/subscriber.py b/src/surface/gui/gui/event_nodes/subscriber.py index f2a96f39..2fa1ba7a 100644 --- a/src/surface/gui/gui/event_nodes/subscriber.py +++ b/src/surface/gui/gui/event_nodes/subscriber.py @@ -6,19 +6,23 @@ from rclpy.executors import SingleThreadedExecutor from rclpy.node import Node from rclpy.qos import QoSProfile, qos_profile_system_default +from rclpy.subscription import MsgType class GUIEventSubscriber(Node): """Multithreaded subscriber for receiving messages to the GUI.""" - def __init__(self, msg_type: type, topic: str, signal: pyqtBoundSignal, + def __init__(self, msg_type: MsgType, topic: str, signal: pyqtBoundSignal, qos_profile: QoSProfile = qos_profile_system_default): # Name this node with a sanitized version of the topic name: str = f'subscriber_{re.sub(r"[^a-zA-Z0-9_]", "_", topic)}' super().__init__(name, parameter_overrides=[]) + self.signal = signal + self.subscription = self.create_subscription( - msg_type, topic, signal.emit, qos_profile) + msg_type, topic, lambda data: signal.emit(data), qos_profile) + # Wrap in silly lambda becuase PyQ6 and ROS won't play nice custom_executor = SingleThreadedExecutor() custom_executor.add_node(self) From f820d12cbfa21338f9aa610ef496a5d5812acdca Mon Sep 17 00:00:00 2001 From: Michael Carlstrom Date: Mon, 22 Jan 2024 14:36:26 -0500 Subject: [PATCH 45/47] add rosdep --- .vscode/ros2_install.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.vscode/ros2_install.sh b/.vscode/ros2_install.sh index 732597db..6f1b2f7d 100755 --- a/.vscode/ros2_install.sh +++ b/.vscode/ros2_install.sh @@ -13,6 +13,13 @@ 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 update && sudo apt install ros-dev-tools + +# Update any installed packages sudo apt-get update sudo apt-get upgrade -y @@ -36,5 +43,6 @@ fi source ~/.bashrc # Start rosdep +sudo rosdep init rosdep update source ~/.bashrc From aa41b65f8a85ecea8a068a2c4f8cbaf619776f34 Mon Sep 17 00:00:00 2001 From: Michael Carlstrom <36806982+InvincibleRMC@users.noreply.github.com> Date: Mon, 22 Jan 2024 15:55:21 -0500 Subject: [PATCH 46/47] Update ros2_install.sh --- .vscode/ros2_install.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.vscode/ros2_install.sh b/.vscode/ros2_install.sh index 6f1b2f7d..57c0bacb 100755 --- a/.vscode/ros2_install.sh +++ b/.vscode/ros2_install.sh @@ -19,6 +19,9 @@ echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-a # https://discourse.ros.org/t/ros-developer-tools-now-in-binary-form/29802 sudo apt update && 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 From ebe0c1cdcad39c5a4c8306dc8071289e8122de8c Mon Sep 17 00:00:00 2001 From: Michael Carlstrom Date: Mon, 22 Jan 2024 16:49:09 -0500 Subject: [PATCH 47/47] ben fixes --- .vscode/ros2_install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.vscode/ros2_install.sh b/.vscode/ros2_install.sh index 57c0bacb..a4ef06d3 100755 --- a/.vscode/ros2_install.sh +++ b/.vscode/ros2_install.sh @@ -17,7 +17,7 @@ echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-a # 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 update && sudo apt install ros-dev-tools +sudo apt install ros-dev-tools # Install pip sudo apt install python3-pip