Skip to content

Commit

Permalink
Merge pull request #34 from turtlebot/roni-kreinin/humble
Browse files Browse the repository at this point in the history
Humble fixes
  • Loading branch information
roni-kreinin authored Mar 3, 2023
2 parents 95f70a6 + a868207 commit 05e86c7
Show file tree
Hide file tree
Showing 8 changed files with 45 additions and 60 deletions.
1 change: 0 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
17 changes: 0 additions & 17 deletions dependencies.repos

This file was deleted.

69 changes: 35 additions & 34 deletions turtlebot4_ignition_bringup/launch/ignition.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'],
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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')),
Expand Down Expand Up @@ -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
Expand All @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,13 @@

#include <ignition/msgs/int32.pb.h>

#include <iostream>
#include <vector>

#include <ignition/plugin/Register.hh>
#include <ignition/gui/Application.hh>
#include <ignition/gui/MainWindow.hh>

#include <iostream>

using ignition::gui::Turtlebot4Hmi;

Turtlebot4Hmi::Turtlebot4Hmi()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@
#ifndef TURTLEBOT4_IGNITION_GUI_PLUGINS__TURTLEBOT4HMI__TURTLEBOT4HMI_HH_
#define TURTLEBOT4_IGNITION_GUI_PLUGINS__TURTLEBOT4HMI__TURTLEBOT4HMI_HH_

#include <ignition/transport/Node.hh>

#include <ignition/gui/qt.h>
#include <ignition/gui/Plugin.hh>

#include <string>

#include <ignition/transport/Node.hh>
#include <ignition/gui/Plugin.hh>

namespace ignition
{

Expand Down
2 changes: 1 addition & 1 deletion turtlebot4_ignition_gui_plugins/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<license>Apache 2.0</license>

<buildtool_depend>ament_cmake</buildtool_depend>
<buildtool_depend>ignition-gui5</buildtool_depend>
<buildtool_depend>ignition-gui6</buildtool_depend>
<depend>qml-module-qtquick-extras</depend>

<test_depend>ament_lint_auto</test_depend>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@
#ifndef TURTLEBOT4_IGNITION_TOOLBOX__HMI_NODE_HPP_
#define TURTLEBOT4_IGNITION_TOOLBOX__HMI_NODE_HPP_

#include <rclcpp/rclcpp.hpp>
#include <string>

#include <rclcpp/rclcpp.hpp>

#include "std_msgs/msg/int32.hpp"
#include "std_msgs/msg/string.hpp"
#include "turtlebot4_msgs/msg/user_button.hpp"
Expand Down

0 comments on commit 05e86c7

Please sign in to comment.