From 05e97d8155fdd1124196056d42169c59138ad50e Mon Sep 17 00:00:00 2001 From: Roni Kreinin Date: Fri, 3 Mar 2023 14:30:19 -0500 Subject: [PATCH 1/3] Updated ignition gui version Updated navigation launch files Updated oakd static transform link --- .../launch/ignition.launch.py | 69 ++++++++++--------- .../Turtlebot4Hmi/CMakeLists.txt | 2 +- turtlebot4_ignition_gui_plugins/package.xml | 2 +- 3 files changed, 37 insertions(+), 36 deletions(-) diff --git a/turtlebot4_ignition_bringup/launch/ignition.launch.py b/turtlebot4_ignition_bringup/launch/ignition.launch.py index f8b12e5..3e645aa 100644 --- a/turtlebot4_ignition_bringup/launch/ignition.launch.py +++ b/turtlebot4_ignition_bringup/launch/ignition.launch.py @@ -50,11 +50,11 @@ def perform( DeclareLaunchArgument('rviz', default_value='false', choices=['true', 'false'], description='Start rviz.'), - DeclareLaunchArgument('slam', default_value='off', - choices=['off', 'sync', 'async'], - description='Whether to run a SLAM'), - DeclareLaunchArgument('localization', default_value='false', + DeclareLaunchArgument('sync', default_value='true', choices=['true', 'false'], + description='Whether to run a SLAM'), + DeclareLaunchArgument('localization', default_value='off', + choices=['off', 'localization', 'slam'], description='Whether to run localization'), DeclareLaunchArgument('nav2', default_value='false', choices=['true', 'false'], @@ -120,8 +120,12 @@ def generate_launch_description(): [pkg_turtlebot4_ignition_bringup, 'launch', 'ros_ign_bridge.launch.py']) rviz_launch = PathJoinSubstitution( [pkg_turtlebot4_viz, 'launch', 'view_robot.launch.py']) - nav_launch = PathJoinSubstitution( - [pkg_turtlebot4_navigation, 'launch', 'nav_bringup.launch.py']) + nav2_launch = PathJoinSubstitution( + [pkg_turtlebot4_navigation, 'launch', 'nav2.launch.py']) + slam_launch = PathJoinSubstitution( + [pkg_turtlebot4_navigation, 'launch', 'slam.launch.py']) + localization_launch = PathJoinSubstitution( + [pkg_turtlebot4_navigation, 'launch', 'localization.launch.py']) node_launch = PathJoinSubstitution( [pkg_turtlebot4_ignition_bringup, 'launch', 'turtlebot4_nodes.launch.py']) create3_nodes_launch = PathJoinSubstitution( @@ -220,15 +224,25 @@ def generate_launch_description(): ) # Navigation - navigation = IncludeLaunchDescription( - PythonLaunchDescriptionSource([nav_launch]), - launch_arguments=[('slam', LaunchConfiguration('slam')), - ('nav2', LaunchConfiguration('nav2')), - ('localization', LaunchConfiguration('localization')), - ('use_sim_time', LaunchConfiguration('use_sim_time')), - ('map', LaunchConfiguration('map'))] + nav2 = IncludeLaunchDescription( + PythonLaunchDescriptionSource([nav2_launch]), + condition=IfCondition(LaunchConfiguration('nav2')) + ) + + slam = IncludeLaunchDescription( + PythonLaunchDescriptionSource([slam_launch]), + launch_arguments=[('sync', LaunchConfiguration('sync'))], + condition=LaunchConfigurationEquals('localization', 'slam') ) + localization = IncludeLaunchDescription( + PythonLaunchDescriptionSource([localization_launch]), + launch_arguments=[('map', LaunchConfiguration('map'))], + condition=LaunchConfigurationEquals('localization', 'localization') + ) + + # TurtleBot 4 nodes + turtlebot4_node = IncludeLaunchDescription( PythonLaunchDescriptionSource([node_launch]), launch_arguments=[('model', LaunchConfiguration('model')), @@ -257,30 +271,16 @@ def generate_launch_description(): ) # OAKD static transforms - oakd_pro_stf = Node( - name='camera_stf', - package='tf2_ros', - executable='static_transform_publisher', - output='screen', - arguments=[ - '0', '0', '0', '0', '0', '0', - 'oakd_pro_rgb_camera_optical_frame', - [LaunchConfiguration('robot_name'), '/oakd_pro_rgb_camera_frame/rgbd_camera'] - ], - condition=LaunchConfigurationEquals('model', 'standard') - ) - - oakd_lite_stf = Node( + oakd_stf = Node( name='camera_stf', package='tf2_ros', executable='static_transform_publisher', output='screen', arguments=[ '0', '0', '0', '0', '0', '0', - 'oakd_lite_rgb_camera_optical_frame', - [LaunchConfiguration('robot_name'), '/oakd_lite_rgb_camera_frame/rgbd_camera'] - ], - condition=LaunchConfigurationEquals('model', 'lite') + 'oakd_rgb_camera_optical_frame', + [LaunchConfiguration('robot_name'), '/oakd_rgb_camera_frame/rgbd_camera'] + ] ) # Define LaunchDescription variable @@ -299,8 +299,9 @@ def generate_launch_description(): ld.add_action(create3_nodes) ld.add_action(create3_ignition_nodes) ld.add_action(turtlebot4_node) - ld.add_action(navigation) + ld.add_action(nav2) + ld.add_action(slam) + ld.add_action(localization) ld.add_action(rplidar_stf) - ld.add_action(oakd_pro_stf) - ld.add_action(oakd_lite_stf) + ld.add_action(oakd_stf) return ld diff --git a/turtlebot4_ignition_gui_plugins/Turtlebot4Hmi/CMakeLists.txt b/turtlebot4_ignition_gui_plugins/Turtlebot4Hmi/CMakeLists.txt index b7c733c..f473e62 100644 --- a/turtlebot4_ignition_gui_plugins/Turtlebot4Hmi/CMakeLists.txt +++ b/turtlebot4_ignition_gui_plugins/Turtlebot4Hmi/CMakeLists.txt @@ -17,7 +17,7 @@ find_package(Qt5 ) # Find the Ignition gui library -find_package(ignition-gui5 REQUIRED) +find_package(ignition-gui6 REQUIRED) find_package(ignition-common4 REQUIRED) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${IGNITION-GUI_CXX_FLAGS}") diff --git a/turtlebot4_ignition_gui_plugins/package.xml b/turtlebot4_ignition_gui_plugins/package.xml index 686b525..d8ed26b 100644 --- a/turtlebot4_ignition_gui_plugins/package.xml +++ b/turtlebot4_ignition_gui_plugins/package.xml @@ -8,7 +8,7 @@ Apache 2.0 ament_cmake - ignition-gui5 + ignition-gui6 qml-module-qtquick-extras ament_lint_auto From 3e014d2fe82cae0cb2c14ba2c4a2f3f5f35bd06e Mon Sep 17 00:00:00 2001 From: Roni Kreinin Date: Fri, 3 Mar 2023 14:41:35 -0500 Subject: [PATCH 2/3] Removed dependencies.repos --- .github/workflows/ci.yml | 1 - dependencies.repos | 17 ----------------- 2 files changed, 18 deletions(-) delete mode 100644 dependencies.repos diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3ee521d..8ebd17d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,6 @@ jobs: with: target-ros2-distro: humble import-token: ${{ secrets.GITHUB_TOKEN }} - vcs-repo-file-url: dependencies.repos package-name: turtlebot4_ignition_bringup turtlebot4_ignition_gui_plugins diff --git a/dependencies.repos b/dependencies.repos deleted file mode 100644 index c14c219..0000000 --- a/dependencies.repos +++ /dev/null @@ -1,17 +0,0 @@ -repositories: - irobot_create_msgs: - type: git - url: https://github.com/iRobotEducation/irobot_create_msgs.git - version: main - create3_sim: - type: git - url: https://github.com/iRobotEducation/create3_sim.git - version: main - turtlebot4: - type: git - url: https://github.com/turtlebot/turtlebot4.git - version: galactic - turtlebot4_desktop: - type: git - url: https://github.com/turtlebot/turtlebot4_desktop.git - version: galactic From a868207fb7e2e60ceac977bfa4d9753b300dd4e4 Mon Sep 17 00:00:00 2001 From: Roni Kreinin Date: Fri, 3 Mar 2023 14:52:27 -0500 Subject: [PATCH 3/3] Linter fixes --- .../Turtlebot4Hmi/Turtlebot4Hmi.cc | 5 +++-- .../Turtlebot4Hmi/Turtlebot4Hmi.hh | 6 +++--- .../include/turtlebot4_ignition_toolbox/hmi_node.hpp | 3 ++- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/turtlebot4_ignition_gui_plugins/Turtlebot4Hmi/Turtlebot4Hmi.cc b/turtlebot4_ignition_gui_plugins/Turtlebot4Hmi/Turtlebot4Hmi.cc index d10532f..058ce0e 100644 --- a/turtlebot4_ignition_gui_plugins/Turtlebot4Hmi/Turtlebot4Hmi.cc +++ b/turtlebot4_ignition_gui_plugins/Turtlebot4Hmi/Turtlebot4Hmi.cc @@ -20,12 +20,13 @@ #include +#include +#include + #include #include #include -#include - using ignition::gui::Turtlebot4Hmi; Turtlebot4Hmi::Turtlebot4Hmi() diff --git a/turtlebot4_ignition_gui_plugins/Turtlebot4Hmi/Turtlebot4Hmi.hh b/turtlebot4_ignition_gui_plugins/Turtlebot4Hmi/Turtlebot4Hmi.hh index f7d9053..690b5d2 100644 --- a/turtlebot4_ignition_gui_plugins/Turtlebot4Hmi/Turtlebot4Hmi.hh +++ b/turtlebot4_ignition_gui_plugins/Turtlebot4Hmi/Turtlebot4Hmi.hh @@ -19,13 +19,13 @@ #ifndef TURTLEBOT4_IGNITION_GUI_PLUGINS__TURTLEBOT4HMI__TURTLEBOT4HMI_HH_ #define TURTLEBOT4_IGNITION_GUI_PLUGINS__TURTLEBOT4HMI__TURTLEBOT4HMI_HH_ -#include - #include -#include #include +#include +#include + namespace ignition { diff --git a/turtlebot4_ignition_toolbox/include/turtlebot4_ignition_toolbox/hmi_node.hpp b/turtlebot4_ignition_toolbox/include/turtlebot4_ignition_toolbox/hmi_node.hpp index 7596744..ddcfa74 100644 --- a/turtlebot4_ignition_toolbox/include/turtlebot4_ignition_toolbox/hmi_node.hpp +++ b/turtlebot4_ignition_toolbox/include/turtlebot4_ignition_toolbox/hmi_node.hpp @@ -19,9 +19,10 @@ #ifndef TURTLEBOT4_IGNITION_TOOLBOX__HMI_NODE_HPP_ #define TURTLEBOT4_IGNITION_TOOLBOX__HMI_NODE_HPP_ -#include #include +#include + #include "std_msgs/msg/int32.hpp" #include "std_msgs/msg/string.hpp" #include "turtlebot4_msgs/msg/user_button.hpp"