From 1f62297e633f44bb9a3f4bd61e30bfd430d9fbd9 Mon Sep 17 00:00:00 2001 From: mfikih Date: Fri, 24 Jul 2026 15:30:15 +0900 Subject: [PATCH 01/19] add cuvslam --- README.md | 5 + doc/3a_manual_simulation.md | 4 +- doc/3b_manual_hil.md | 2 +- doc/3c_manual_real.md | 2 +- doc/4a_mapping_simulation.md | 4 +- doc/4b_mapping_hil.md | 2 +- doc/4c_mapping_real.md | 2 +- doc/5a_navigation_simulation.md | 2 +- doc/5b_navigation_hil.md | 2 +- doc/5c_navigation_real.md | 2 +- docker/isaac-ros_3.2.Dockerfile | 1 + docker/isaac-ros_4.1.Dockerfile | 1 + .../urdf/diffbot/perception.xacro | 29 +++++ .../config/diffbot/ekf_cuvslam.yaml | 118 ++++++++++++++++++ .../launch/base.launch.py | 29 ++++- .../launch/mapping.launch.py | 5 + .../launch/navigation.launch.py | 4 + movensys_navigation_nav2_config/package.xml | 5 + 18 files changed, 207 insertions(+), 12 deletions(-) create mode 100644 movensys_navigation_nav2_config/config/diffbot/ekf_cuvslam.yaml diff --git a/README.md b/README.md index da06b89..4dc6bd4 100644 --- a/README.md +++ b/README.md @@ -59,6 +59,11 @@ prefix selects the scenario; the trailing letter selects the execution mode. Host-setup guides (`doc/1_setup.md`, `doc/2_docker.md`) are also provided. +An optional add-on, [`doc/6_cuvslam.md`](doc/6_cuvslam.md), fuses NVIDIA +**cuVSLAM** (Isaac ROS Visual SLAM) visual-inertial odometry from a RealSense +D435i into the EKF — enabled with `use_cuvslam:=true` on the base / mapping / +navigation launches (requires an `isaac-ros_*` image and an NVIDIA GPU). + ## Requirements - Ubuntu 22.04 or 24.04 diff --git a/doc/3a_manual_simulation.md b/doc/3a_manual_simulation.md index daa97f1..855c382 100644 --- a/doc/3a_manual_simulation.md +++ b/doc/3a_manual_simulation.md @@ -25,9 +25,9 @@ nros ros2 launch movensys_navigation_nav2_config sim_bridge.launch.py use_sim_ti ### Step 3: Run EKF + RSP ``` -nros ros2 launch movensys_navigation_nav2_config base.launch.py use_sim_time:=true +nros ros2 launch movensys_navigation_nav2_config base.launch.py use_sim_time:=true ``` -add `rsp:=false` if use gazebo (step 1b). +add `rsp:=false` if use gazebo (step 1b) and add `use_cuvslam:=true` for use cuvslam. diff --git a/doc/3b_manual_hil.md b/doc/3b_manual_hil.md index 96a3083..1a333ae 100644 --- a/doc/3b_manual_hil.md +++ b/doc/3b_manual_hil.md @@ -23,7 +23,7 @@ set `use_sim_time:=true` ``` nros ros2 launch movensys_navigation_nav2_config base.launch.py use_sim_time:=true ``` -add `rsp:=false` if use gazebo (step 1b) or ros2_control. +add `rsp:=false` if use gazebo (step 1b) or ros2_control add `use_cuvslam:=true` for use cuvslam. diff --git a/doc/3c_manual_real.md b/doc/3c_manual_real.md index 7a13c66..2a3fa83 100644 --- a/doc/3c_manual_real.md +++ b/doc/3c_manual_real.md @@ -12,7 +12,7 @@ check `~/workspaces/movensys_ws/src/wmx-r2/doc/launch__navigat ``` nros ros2 launch movensys_navigation_nav2_config base.launch.py ``` -add `rsp:=false` if use ros2_control. +add `rsp:=false` if use ros2_control add `use_cuvslam:=true` for use cuvslam. diff --git a/doc/4a_mapping_simulation.md b/doc/4a_mapping_simulation.md index 744a44f..53fbd94 100644 --- a/doc/4a_mapping_simulation.md +++ b/doc/4a_mapping_simulation.md @@ -25,9 +25,9 @@ nros ros2 launch movensys_navigation_nav2_config sim_bridge.launch.py use_sim_ti ### Step 3: Mapping ``` -nros ros2 launch movensys_navigation_nav2_config mapping.launch.py use_sim_time:=true +nros ros2 launch movensys_navigation_nav2_config mapping.launch.py use_sim_time:=true ``` -add `rsp:=false` if use gazebo (step 1b) +add `rsp:=false` if use gazebo (step 1b) add `use_cuvslam:=true` for use cuvslam diff --git a/doc/4b_mapping_hil.md b/doc/4b_mapping_hil.md index 28b146d..1dc0880 100644 --- a/doc/4b_mapping_hil.md +++ b/doc/4b_mapping_hil.md @@ -25,7 +25,7 @@ set `use_sim_time:=true` ``` nros ros2 launch movensys_navigation_nav2_config mapping.launch.py use_sim_time:=true ``` -add `rsp:=false` if use gazebo (step 1b) or ros2_control. +add `rsp:=false` if use gazebo (step 1b) or ros2_control add `use_cuvslam:=true` for use cuvslam. diff --git a/doc/4c_mapping_real.md b/doc/4c_mapping_real.md index 8d60d10..bc42462 100644 --- a/doc/4c_mapping_real.md +++ b/doc/4c_mapping_real.md @@ -17,7 +17,7 @@ check `~/workspaces/movensys_ws/src/wmx-r2/doc/launch__navigat ``` nros ros2 launch movensys_navigation_nav2_config mapping.launch.py ``` -add `rsp:=false` if use ros2_control. +add `rsp:=false` if use ros2_control add `use_cuvslam:=true` for use cuvslam. diff --git a/doc/5a_navigation_simulation.md b/doc/5a_navigation_simulation.md index 3280992..93a4794 100644 --- a/doc/5a_navigation_simulation.md +++ b/doc/5a_navigation_simulation.md @@ -26,7 +26,7 @@ nros ros2 launch movensys_navigation_nav2_config sim_bridge.launch.py use_sim_ti ``` nros ros2 launch movensys_navigation_nav2_config navigation.launch.py use_sim_time:=true ``` -add `rsp:=false` if use gazebo (step 1b). +add `rsp:=false` if use gazebo (step 1b) add `use_cuvslam:=true` for use cuvslam. diff --git a/doc/5b_navigation_hil.md b/doc/5b_navigation_hil.md index 068b895..5f5ec12 100644 --- a/doc/5b_navigation_hil.md +++ b/doc/5b_navigation_hil.md @@ -21,7 +21,7 @@ set `use_sim_time:=true` ``` nros ros2 launch movensys_navigation_nav2_config navigation.launch.py use_sim_time:=true ``` -add `rsp:=false` if use gazebo (step 1b) or ros2_control. +add `rsp:=false` if use gazebo (step 1b) or ros2_control add `use_cuvslam:=true` for use cuvslam. diff --git a/doc/5c_navigation_real.md b/doc/5c_navigation_real.md index 62938c3..176803c 100644 --- a/doc/5c_navigation_real.md +++ b/doc/5c_navigation_real.md @@ -12,7 +12,7 @@ check `~/workspaces/movensys_ws/src/wmx-r2/doc/launch__navigat ``` nros ros2 launch movensys_navigation_nav2_config navigation.launch.py ``` -add `rsp:=false` if use ros2_control. +add `rsp:=false` if use ros2_control add `use_cuvslam:=true` for use cuvslam. ### Step 3: Set initial pose diff --git a/docker/isaac-ros_3.2.Dockerfile b/docker/isaac-ros_3.2.Dockerfile index 592fe49..0ee59c7 100644 --- a/docker/isaac-ros_3.2.Dockerfile +++ b/docker/isaac-ros_3.2.Dockerfile @@ -26,6 +26,7 @@ RUN apt-get update && \ ros-humble-rmw-cyclonedds-cpp \ ros-humble-tf-transformations \ ros-humble-isaac-ros-nvblox \ + ros-humble-isaac-ros-visual-slam \ ros-humble-isaac-ros-examples \ ros-humble-isaac-ros-realsense \ ros-humble-isaac-ros-ess \ diff --git a/docker/isaac-ros_4.1.Dockerfile b/docker/isaac-ros_4.1.Dockerfile index 9e81278..50b931d 100644 --- a/docker/isaac-ros_4.1.Dockerfile +++ b/docker/isaac-ros_4.1.Dockerfile @@ -36,6 +36,7 @@ RUN apt-get update && \ RUN apt-get update && \ apt-get install -y \ ros-jazzy-isaac-ros-nvblox \ + ros-jazzy-isaac-ros-visual-slam \ ros-jazzy-robot-localization \ ros-jazzy-slam-toolbox \ ros-jazzy-navigation2 \ diff --git a/movensys_navigation_description/urdf/diffbot/perception.xacro b/movensys_navigation_description/urdf/diffbot/perception.xacro index eee0933..a35cb23 100644 --- a/movensys_navigation_description/urdf/diffbot/perception.xacro +++ b/movensys_navigation_description/urdf/diffbot/perception.xacro @@ -134,4 +134,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/movensys_navigation_nav2_config/config/diffbot/ekf_cuvslam.yaml b/movensys_navigation_nav2_config/config/diffbot/ekf_cuvslam.yaml new file mode 100644 index 0000000..41a97c9 --- /dev/null +++ b/movensys_navigation_nav2_config/config/diffbot/ekf_cuvslam.yaml @@ -0,0 +1,118 @@ +### ekf config file (with cuVSLAM visual-inertial odometry fused in) ### +# Same as ekf.yaml, plus odom1 = /visual_slam/tracking/odometry from Isaac ROS +# Visual SLAM (cuVSLAM). Selected by base.launch.py when use_cuvslam:=true. +# +# Sources fused here: +# odom0 (/odom_enc) -> wheel encoder twist (vx, vyaw) +# odom1 (/visual_slam/tracking/odometry)-> visual-inertial odometry (x, y, yaw) +# imu0 (/imu) -> wheeltec N100 IMU yaw + yaw rate +ekf_filter_node: + ros__parameters: + frequency: 50.0 + sensor_timeout: 0.1 + two_d_mode: true + transform_time_offset: 0.0 + transform_timeout: 0.0 + print_diagnostics: true + debug: false + debug_out_file: odometry_debug.txt + permit_corrected_publication: false + publish_acceleration: false + publish_tf: true + map_frame: map # Defaults to "map" if unspecified + odom_frame: odom # Defaults to "odom" if unspecified + base_link_frame: base_link # Defaults to "base_link" if unspecified + world_frame: odom # Defaults to the value of odom_frame if unspecified + + #The order of the values is + #x, y, z, + #roll, pitch, yaw, + #vx, vy, vz, + #vroll, vpitch, vyaw, + #ax, ay, az. + + odom0: /odom_enc + odom0_config: [false, false, false, + false, false, false, + true, true, false, + false, false, true, + false, false, false] + odom0_queue_size: 2 + odom0_nodelay: false + odom0_differential: false + odom0_relative: false + odom0_pose_rejection_threshold: 50.0 + odom0_twist_rejection_threshold: 10.0 + + # cuVSLAM visual-inertial odometry. Fused as a differential pose source so + # that its (drift-free over short horizons) relative motion complements the + # wheel encoder without fighting it over absolute position. two_d_mode keeps + # z/roll/pitch flat, so only x, y and yaw are pulled from it. + odom1: /visual_slam/tracking/odometry + odom1_config: [true, true, false, + false, false, true, + false, false, false, + false, false, false, + false, false, false] + odom1_queue_size: 10 + odom1_nodelay: true + odom1_differential: true + odom1_relative: false + odom1_pose_rejection_threshold: 5.0 + odom1_twist_rejection_threshold: 5.0 + + imu0: /imu + imu0_config: [false, false, false, + false, false, true, + false, false, false, + false, false, true, + false, false, false] + imu0_nodelay: false + imu0_differential: false + imu0_relative: true + imu0_queue_size: 5 + imu0_pose_rejection_threshold: 1.57 # Note the difference in parameter names + imu0_twist_rejection_threshold: 1.57 # + imu0_linear_acceleration_rejection_threshold: 5.0 # + imu0_remove_gravitational_acceleration: false + + use_control: true + stamped_control: true + control_timeout: 0.2 + control_config: [true, false, false, false, false, true] + acceleration_limits: [1.3, 0.0, 0.0, 0.0, 0.0, 3.4] + deceleration_limits: [1.3, 0.0, 0.0, 0.0, 0.0, 4.5] + acceleration_gains: [0.8, 0.0, 0.0, 0.0, 0.0, 0.9] + deceleration_gains: [1.0, 0.0, 0.0, 0.0, 0.0, 1.0] + + process_noise_covariance: [0.05, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, + 0.0, 0.05, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.06, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.03, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0, 0.03, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0, 0.0, 0.06, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.025, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.025, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.04, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.01, 0.0, 0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.01, 0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.02, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.01, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.01, 0.0, + 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.015] + + initial_estimate_covariance: [1e-9, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, + 0.0, 1e-9, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 1e-9, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 1e-9, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0, 1e-9, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0, 0.0, 1e-9, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1e-9, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1e-9, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1e-9, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1e-9, 0.0, 0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1e-9, 0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1e-9, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1e-9, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1e-9, 0.0, + 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1e-9] diff --git a/movensys_navigation_nav2_config/launch/base.launch.py b/movensys_navigation_nav2_config/launch/base.launch.py index bc07cb0..feb2f7a 100644 --- a/movensys_navigation_nav2_config/launch/base.launch.py +++ b/movensys_navigation_nav2_config/launch/base.launch.py @@ -19,10 +19,13 @@ def generate_launch_description(): xacro_file = os.path.join(description_share, 'urdf', navigation_model, 'movensys_navigation.xacro') - ekf_config_file = os.path.join(nav2_config_share, 'config', navigation_model, 'ekf.yaml') + config_dir = os.path.join(nav2_config_share, 'config', navigation_model) + ekf_config_file = os.path.join(config_dir, 'ekf.yaml') + ekf_cuvslam_config_file = os.path.join(config_dir, 'ekf_cuvslam.yaml') rviz_config = os.path.join(nav2_config_share, 'rviz', 'navigation.rviz') use_sim_time = ParameterValue(LaunchConfiguration('use_sim_time'), value_type=bool) + use_cuvslam = LaunchConfiguration('use_cuvslam') robot_state_publisher = Node( package='robot_state_publisher', executable='robot_state_publisher', @@ -36,9 +39,24 @@ def generate_launch_description(): start_robot_localization = Node( package='robot_localization', executable='ekf_node', name='ekf_filter_node', output='screen', + condition=UnlessCondition(use_cuvslam), parameters=[ekf_config_file, {'use_sim_time': use_sim_time}], remappings=[('odometry/filtered', 'odom'), ('cmd_vel', 'cmd_vel_safe')]) + start_robot_localization_cuvslam = Node( + package='robot_localization', executable='ekf_node', + name='ekf_filter_node', output='screen', + condition=IfCondition(use_cuvslam), + parameters=[ekf_cuvslam_config_file, {'use_sim_time': use_sim_time}], + remappings=[('odometry/filtered', 'odom'), ('cmd_vel', 'cmd_vel_safe')]) + + # cuVSLAM (Isaac ROS Visual SLAM) + RealSense driver. + start_visual_slam = IncludeLaunchDescription( + PythonLaunchDescriptionSource( + os.path.join(nav2_config_share, 'launch', 'visual_slam.launch.py')), + condition=IfCondition(use_cuvslam), + launch_arguments={'use_sim_time': LaunchConfiguration('use_sim_time')}.items()) + rviz = Node( package='rviz2', executable='rviz2', name='rviz2', arguments=['-d', rviz_config], @@ -64,8 +82,17 @@ def generate_launch_description(): description='Publish /robot_description here. Set false when a backend ' 'launch (Gazebo sim or wmx_r2_control) already publishes it.', ), + DeclareLaunchArgument( + 'use_cuvslam', + default_value='false', + description='Fuse Isaac ROS Visual SLAM (cuVSLAM) into the EKF. When true, ' + 'the EKF uses ekf_cuvslam.yaml and the RealSense + cuVSLAM stack ' + 'is launched (requires an isaac-ros_* image).', + ), robot_state_publisher, start_robot_localization, + start_robot_localization_cuvslam, + start_visual_slam, rviz, start_perception, ]) diff --git a/movensys_navigation_nav2_config/launch/mapping.launch.py b/movensys_navigation_nav2_config/launch/mapping.launch.py index cdc8e2c..e7bde92 100644 --- a/movensys_navigation_nav2_config/launch/mapping.launch.py +++ b/movensys_navigation_nav2_config/launch/mapping.launch.py @@ -21,6 +21,7 @@ def generate_launch_description(): launch_arguments={ 'use_sim_time': use_sim_time, 'rsp': LaunchConfiguration('rsp'), + 'use_cuvslam': LaunchConfiguration('use_cuvslam'), }.items()) start_slam_toolbox = IncludeLaunchDescription( @@ -43,6 +44,10 @@ def generate_launch_description(): description='Publish /robot_description via base.launch.py. Set false when a ' 'backend launch (Gazebo sim or wmx_r2_control) already publishes it.', ), + DeclareLaunchArgument( + 'use_cuvslam', default_value='false', + description='Fuse Isaac ROS Visual SLAM (cuVSLAM) into the EKF (see base.launch.py).', + ), start_base, start_slam_toolbox, ]) diff --git a/movensys_navigation_nav2_config/launch/navigation.launch.py b/movensys_navigation_nav2_config/launch/navigation.launch.py index 7e602d8..259efae 100644 --- a/movensys_navigation_nav2_config/launch/navigation.launch.py +++ b/movensys_navigation_nav2_config/launch/navigation.launch.py @@ -45,6 +45,7 @@ def generate_launch_description(): launch_arguments={ 'use_sim_time': LaunchConfiguration('use_sim_time'), 'rsp': LaunchConfiguration('rsp'), + 'use_cuvslam': LaunchConfiguration('use_cuvslam'), }.items()) # --- localization (map_server + amcl) --- @@ -110,6 +111,9 @@ def generate_launch_description(): 'rsp', default_value='true', description='Publish /robot_description via base.launch.py. Set false when a ' 'backend launch (Gazebo sim or wmx_r2_control) already publishes it.'), + DeclareLaunchArgument( + 'use_cuvslam', default_value='false', + description='Fuse Isaac ROS Visual SLAM (cuVSLAM) into the EKF (see base.launch.py).'), start_base, map_server, amcl, diff --git a/movensys_navigation_nav2_config/package.xml b/movensys_navigation_nav2_config/package.xml index 702aa96..048ff7f 100644 --- a/movensys_navigation_nav2_config/package.xml +++ b/movensys_navigation_nav2_config/package.xml @@ -35,6 +35,11 @@ slam_toolbox + + isaac_ros_visual_slam + realsense2_camera + rclcpp_components + navigation2 nav2_bringup From 47d99aa1815d0ccb9f29f3e726b0ef9999b264d0 Mon Sep 17 00:00:00 2001 From: mfikih Date: Fri, 24 Jul 2026 15:30:27 +0900 Subject: [PATCH 02/19] cuvslam yaml --- .../config/diffbot/visual_slam.yaml | 50 +++++++++++ .../launch/visual_slam.launch.py | 82 +++++++++++++++++++ 2 files changed, 132 insertions(+) create mode 100644 movensys_navigation_nav2_config/config/diffbot/visual_slam.yaml create mode 100644 movensys_navigation_nav2_config/launch/visual_slam.launch.py diff --git a/movensys_navigation_nav2_config/config/diffbot/visual_slam.yaml b/movensys_navigation_nav2_config/config/diffbot/visual_slam.yaml new file mode 100644 index 0000000..3e88408 --- /dev/null +++ b/movensys_navigation_nav2_config/config/diffbot/visual_slam.yaml @@ -0,0 +1,50 @@ +### Isaac ROS Visual SLAM (cuVSLAM) config ### +# Stereo-inertial visual odometry from a RealSense D435i (infra1/infra2 + IMU). +# The node publishes /visual_slam/tracking/odometry, which the EKF fuses as an +# extra odometry source (see ekf_cuvslam.yaml). TF publishing is disabled here +# because robot_localization's EKF owns the odom -> base_link transform. +visual_slam_node: + ros__parameters: + # --- frames --- + # base_frame chains to the camera optical frames via: + # base_link -> camera_link (URDF/robot_state_publisher) + # camera_link -> camera_*_optical_frame (realsense2_camera driver) + base_frame: base_link + odom_frame: odom + map_frame: map + camera_optical_frames: [camera_front_color_optical_frame, camera_front_color_optical_frame] + imu_frame: camera_gyro_optical_frame + + # --- cameras --- + num_cameras: 2 + # RealSense infra streams are already rectified/undistorted. + rectified_images: true + enable_image_denoising: false + image_jitter_threshold_ms: 34.0 + + # --- inertial fusion (D435i IMU) --- + enable_imu_fusion: true + # Noise characteristics for the D435i BMI055 (Isaac ROS reference values). + gyro_noise_density: 0.000244 + gyro_random_walk: 0.000019393 + accel_noise_density: 0.001862 + accel_random_walk: 0.003 + calibration_frequency: 200.0 + + # --- odometry vs. full SLAM --- + # false = pure visual(-inertial) odometry (VO), the mode used to feed the + # EKF. Set true to enable landmark mapping + loop closure if you + # later want cuVSLAM to also correct map -> odom drift. + enable_localization_n_mapping: false + + # --- TF ownership --- + # The EKF publishes odom -> base_link, so keep both off here. + publish_odom_to_base_tf: false + publish_map_to_odom_tf: false + invert_odom_to_base_tf: false + + # --- visualization (off by default; enable for debugging in RViz) --- + enable_slam_visualization: false + enable_landmarks_view: false + enable_observations_view: false + verbosity: 0 diff --git a/movensys_navigation_nav2_config/launch/visual_slam.launch.py b/movensys_navigation_nav2_config/launch/visual_slam.launch.py new file mode 100644 index 0000000..472c035 --- /dev/null +++ b/movensys_navigation_nav2_config/launch/visual_slam.launch.py @@ -0,0 +1,82 @@ +import os + +from ament_index_python.packages import get_package_share_directory +from launch import LaunchDescription +from launch.actions import DeclareLaunchArgument +from launch.conditions import IfCondition +from launch.substitutions import LaunchConfiguration +from launch_ros.actions import ComposableNodeContainer, Node +from launch_ros.descriptions import ComposableNode + + +def generate_launch_description(): + navigation_model = os.environ.get('NAVIGATION_MODEL', 'diffbot') + nav2_config_share = get_package_share_directory('movensys_navigation_nav2_config') + vslam_params = os.path.join( + nav2_config_share, 'config', navigation_model, 'visual_slam.yaml') + + use_sim_time = LaunchConfiguration('use_sim_time') + launch_realsense = LaunchConfiguration('launch_realsense') + + realsense_node = Node( + package='realsense2_camera', + executable='realsense2_camera_node', + namespace='camera', + name='camera', + output='screen', + condition=IfCondition(launch_realsense), + parameters=[{ + 'enable_infra1': True, + 'enable_infra2': True, + 'enable_color': False, + 'enable_depth': False, + 'depth_module.emitter_enabled': 0, + 'depth_module.profile': '640x360x90', + 'enable_gyro': True, + 'enable_accel': True, + 'gyro_fps': 200, + 'accel_fps': 200, + 'unite_imu_method': 2, # 2 = linear interpolation -> /camera/imu + 'enable_sync': True, + }], + ) + + # --- cuVSLAM (Isaac ROS Visual SLAM) --- + visual_slam_node = ComposableNode( + name='visual_slam_node', + package='isaac_ros_visual_slam', + plugin='nvidia::isaac_ros::visual_slam::VisualSlamNode', + parameters=[vslam_params, {'use_sim_time': use_sim_time}], + remappings=[ + ('visual_slam/image_0', '/camera/infra1/image_rect_raw'), + ('visual_slam/camera_info_0', '/camera/infra1/camera_info'), + ('visual_slam/image_1', '/camera/infra2/image_rect_raw'), + ('visual_slam/camera_info_1', '/camera/infra2/camera_info'), + ('visual_slam/imu', '/camera/imu'), + ], + ) + + visual_slam_container = ComposableNodeContainer( + name='visual_slam_container', + namespace='', + package='rclcpp_components', + executable='component_container_mt', + composable_node_descriptions=[visual_slam_node], + output='screen', + ) + + return LaunchDescription([ + DeclareLaunchArgument( + 'use_sim_time', + default_value='false', + description='Use simulation (Gazebo/Isaac) clock if true', + ), + DeclareLaunchArgument( + 'launch_realsense', + default_value='true', + description='Start the realsense2_camera driver here. Set false to feed ' + 'cuVSLAM from another stereo source (e.g. Isaac Sim).', + ), + realsense_node, + visual_slam_container, + ]) From 5c11f0d14416e990d9e533c863d879c28cbcfd96 Mon Sep 17 00:00:00 2001 From: mfikih Date: Wed, 29 Jul 2026 13:28:20 +0900 Subject: [PATCH 03/19] move cuvslam to perception --- README.md | 5 ----- movensys_navigation_nav2_config/launch/visual_slam.launch.py | 4 ++-- movensys_navigation_nav2_config/package.xml | 1 + movensys_navigation_perception/CMakeLists.txt | 1 + .../config/diffbot/cuvslam.yaml | 0 5 files changed, 4 insertions(+), 7 deletions(-) rename movensys_navigation_nav2_config/config/diffbot/visual_slam.yaml => movensys_navigation_perception/config/diffbot/cuvslam.yaml (100%) diff --git a/README.md b/README.md index 4dc6bd4..da06b89 100644 --- a/README.md +++ b/README.md @@ -59,11 +59,6 @@ prefix selects the scenario; the trailing letter selects the execution mode. Host-setup guides (`doc/1_setup.md`, `doc/2_docker.md`) are also provided. -An optional add-on, [`doc/6_cuvslam.md`](doc/6_cuvslam.md), fuses NVIDIA -**cuVSLAM** (Isaac ROS Visual SLAM) visual-inertial odometry from a RealSense -D435i into the EKF — enabled with `use_cuvslam:=true` on the base / mapping / -navigation launches (requires an `isaac-ros_*` image and an NVIDIA GPU). - ## Requirements - Ubuntu 22.04 or 24.04 diff --git a/movensys_navigation_nav2_config/launch/visual_slam.launch.py b/movensys_navigation_nav2_config/launch/visual_slam.launch.py index 472c035..54b364f 100644 --- a/movensys_navigation_nav2_config/launch/visual_slam.launch.py +++ b/movensys_navigation_nav2_config/launch/visual_slam.launch.py @@ -11,9 +11,9 @@ def generate_launch_description(): navigation_model = os.environ.get('NAVIGATION_MODEL', 'diffbot') - nav2_config_share = get_package_share_directory('movensys_navigation_nav2_config') + perception_share = get_package_share_directory('movensys_navigation_perception') vslam_params = os.path.join( - nav2_config_share, 'config', navigation_model, 'visual_slam.yaml') + perception_share, 'config', navigation_model, 'cuvslam.yaml') use_sim_time = LaunchConfiguration('use_sim_time') launch_realsense = LaunchConfiguration('launch_realsense') diff --git a/movensys_navigation_nav2_config/package.xml b/movensys_navigation_nav2_config/package.xml index 048ff7f..dcab388 100644 --- a/movensys_navigation_nav2_config/package.xml +++ b/movensys_navigation_nav2_config/package.xml @@ -36,6 +36,7 @@ slam_toolbox + movensys_navigation_perception isaac_ros_visual_slam realsense2_camera rclcpp_components diff --git a/movensys_navigation_perception/CMakeLists.txt b/movensys_navigation_perception/CMakeLists.txt index e1a0d8b..3e8c2cb 100644 --- a/movensys_navigation_perception/CMakeLists.txt +++ b/movensys_navigation_perception/CMakeLists.txt @@ -26,6 +26,7 @@ if(BUILD_TESTING) endif() install(DIRECTORY + config launch DESTINATION share/${PROJECT_NAME} ) diff --git a/movensys_navigation_nav2_config/config/diffbot/visual_slam.yaml b/movensys_navigation_perception/config/diffbot/cuvslam.yaml similarity index 100% rename from movensys_navigation_nav2_config/config/diffbot/visual_slam.yaml rename to movensys_navigation_perception/config/diffbot/cuvslam.yaml From 7cd1548377ac52e71fcb25809afd77b7c3cc6566 Mon Sep 17 00:00:00 2001 From: mfikih Date: Wed, 29 Jul 2026 13:31:11 +0900 Subject: [PATCH 04/19] move launch file to perception --- .../__pycache__/base.launch.cpython-312.pyc | Bin 3277 -> 0 bytes .../launch/base.launch.py | 2 +- movensys_navigation_nav2_config/package.xml | 4 ---- .../diffbot_perception.launch.cpython-312.pyc | Bin 2222 -> 0 bytes .../launch/visual_slam.launch.py | 0 movensys_navigation_perception/package.xml | 7 ++++++- 6 files changed, 7 insertions(+), 6 deletions(-) delete mode 100644 movensys_navigation_nav2_config/launch/__pycache__/base.launch.cpython-312.pyc delete mode 100644 movensys_navigation_perception/launch/__pycache__/diffbot_perception.launch.cpython-312.pyc rename {movensys_navigation_nav2_config => movensys_navigation_perception}/launch/visual_slam.launch.py (100%) diff --git a/movensys_navigation_nav2_config/launch/__pycache__/base.launch.cpython-312.pyc b/movensys_navigation_nav2_config/launch/__pycache__/base.launch.cpython-312.pyc deleted file mode 100644 index f5d6c0f6d99cbd23621e6d499809bbb722709a51..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3277 zcmbVO&2JmW72hS7Tz*O7mrQ+9D@(G(!jT%;MQqn@<4UO`f5?hut1XdYvEmG=mG^^~ zUCI(c8#?qK&`AlJB0i>&4m$SIzaW?L!KyhRPw9(qSd6a%Ik@ zIVGY-%Tbjt^Y%ER#MF2>t|rO}dmL4gYO0*FXCAnpp;fk)p;19{ z-IR5$6vBhcu%Zx2XYMwtHB_jXcxXkdC=KAUf4L;NQeDzDAX5!^;EAR{!|)kopYgRl zb4%CW*==2Kpb8{=@=Lm^N*cg9M}{n}%C!cPY@1ljt?B?0Mg40Ml2m9yv>_=CSaE}H zcYUM{lmGc;(jGFVKez3jjn842?MPtYl7I!FBUko0WAdH^2p_Qy{hSSOIiDK}a3el9 z9Iznf>FV{{$sX-dtuTnTn7=cC|3~PE`a-_v+z04kL9E4q_z~yohp&EO9;V9}zJdX!?%&L-riWbbNlhi!&ULY!{yKJV;;!W>ZWeu302>L znz3hynzSR=?2;5g4>H~_Kx7xiie1LI_&yDFNJ`(v92`|_7-|lRJ?6Z_o3HO-u7NdmOVo6t-Pj;KbE=*BHcMWqlLB1eHU4nGi^ zQWWzp{Ne=Mg_VXWZ7L9RbS;kR4YS@bah%xif@h-c0i1!ejygrJNQ&IF(CVJZG~rBP!l9!lU##P1A>!S-saREK}W(fbyq~XVdt!gbfqLn3W5^Y6TDn7 z1lgP~WpGG0Fb}mI8Ij8_OfFbNks5P#i6jcQt;-ssFo!6<)AZ35L>>zaqW1}+4+un2 z2gPYa?*&9b8qxcx)Q8i(loeHS%nHr~oOiBpoCy?{%S!hu#}f*09G7vzPGFieZu&TN z<1mu+Y~6~r(;1BrlkgBJ2xOAb(BcTDBBJPu6TMvw>a`I3e*TMJv(JnL163Bh@kc#3 zeO?e=0uC-X#xHD21`L1#dD&=?ybqx0%m)z(EfGtoHOBYk;@)RY3&V%agXZCjgBRAN zYyT>>3(FRle>-%=y85I&v|(|Br$M@~XkA%v7arR(Bj560^WUbvPIY2KU(H#wpAZe! zwFlPp>Uo$QUSrAPZj{O94+{r{!?A-gtGIA-!MeWEDPAW6+28KpeS2Z(uy#;8R1Oqt z>gvgs_34`R=*#wnzwSRgCF^DnW)CkPT(%~DeR9dVaj%`dzkly-Zt~T|-<)Xei=VxE zwDBtUr~UhH$AnIL*1CGH(>MLy#%Xr^Rq^AKnRfA7JA3^>s<4Q1)|n|86(Nq{dHU|Ig?KDXG}W6pOZ6XN`q*Tba<3NsAh_?2H>t( zw;!1EF4h`$NuoRvv#SgDJ4rGxRp^7#u&d23L!5DEdkL? zG0wYkMq|@3WwYUIV%NHj0$Eo90T|x|iV5BZ6nTj4?$b7y%7%j_G@<{=pk?aNA4v0a z>?T2nh5~ke;%~_ab*&mqrkId3*X8H|t_YHI7HFNI`bL%xT^_sbP9=*x( HwwnI~u-%V4 diff --git a/movensys_navigation_nav2_config/launch/base.launch.py b/movensys_navigation_nav2_config/launch/base.launch.py index feb2f7a..5f5387e 100644 --- a/movensys_navigation_nav2_config/launch/base.launch.py +++ b/movensys_navigation_nav2_config/launch/base.launch.py @@ -53,7 +53,7 @@ def generate_launch_description(): # cuVSLAM (Isaac ROS Visual SLAM) + RealSense driver. start_visual_slam = IncludeLaunchDescription( PythonLaunchDescriptionSource( - os.path.join(nav2_config_share, 'launch', 'visual_slam.launch.py')), + os.path.join(perception_share, 'launch', 'visual_slam.launch.py')), condition=IfCondition(use_cuvslam), launch_arguments={'use_sim_time': LaunchConfiguration('use_sim_time')}.items()) diff --git a/movensys_navigation_nav2_config/package.xml b/movensys_navigation_nav2_config/package.xml index dcab388..eccbb85 100644 --- a/movensys_navigation_nav2_config/package.xml +++ b/movensys_navigation_nav2_config/package.xml @@ -35,11 +35,7 @@ slam_toolbox - movensys_navigation_perception - isaac_ros_visual_slam - realsense2_camera - rclcpp_components navigation2 diff --git a/movensys_navigation_perception/launch/__pycache__/diffbot_perception.launch.cpython-312.pyc b/movensys_navigation_perception/launch/__pycache__/diffbot_perception.launch.cpython-312.pyc deleted file mode 100644 index 1c49f5655df8c43232a5102ce74f063248e3b1d6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2222 zcmeHI&2Jk;6rc63zhdvkNu007PMpLkbwBJR6hsjqXe;1QA|ZN!TvpSav9s-dF*8n^ zs-OyS;E2Sbt`w=cAc4w(KY$}QE|q$*29PQt4!td;r(VjNb=-yui8B(r@^60g_RX7_ z-+MFu$uvh0JU{;M`sI)F2>qry!zXn>_KyR(g$N>=hc;E4@-#oSnbH*3J>54p4dBM- zXfwT|HPR2&z>S6`$1dP*;B1|z++l7c+%N#6u@MsL9K=qVBA^bx{R~Wb3khxbk!U1E zbYhUSi%5oKztTvK{(07cMs-)5tIMo zJ9Wr+n#{n6*<_|83C<;0NwAvWJXrvr8B!yQyQ#0Wj`rQs-OOO_PoCf3@^kyE!^r>g z{d{I+6?>Dc8N4pJelV-;32c! z=(@RfX1%%g@+-~tGtIR%ncWJxc;0^cv@E)TpsbA@h!S1Tt~Qfbnu&XtM0ON1!PLQ# zS!YWv*^{FO#HInhiYsvgA|DyNvo2#2{E;X~E)Im%}L>^e1o> zd9H)ixwPGIV4Uo7YDb{73(;Yu69#R!^Y+7eSU@8sM|~H3L4<(2!lhgmeSFO(;EV%@ zHZn3BVdo0&P&q=cQKu`^mZcGZ?lKd0Mbs6tK>e-ks}dSNdZ;)Fn^3f5}DiC z8szWqxmlNESGOqj1a<6SZFSXl{jSUbB)Ps`Y!SNMg1~Q`dvDc6B}*;3z(E{POeN=O z=MwIcMw-=NUu;pql7eLgD*z3HsY^o|J{DUt%P?_qz?r&I8am4~Q-kZ*k_dhW%3k-gY~Q(ob#nGn*3Jp~(f=@{%jFMcj7#QYa36X%4>CvTtJ44%Dn@ucEY$g1yMjHeZ! zK~`J0CA7UPIQ(9*q|jUqXxZes$r`71hzp<&j6` zTs3pgn0@prsxJPo#6XEsxnElDPgMKnG}Od{%JF_>=?`5q>#?qbWQBYwbMxItQ>a+& z=jZR$Ui$vpz1*Aox>h`^#Yjt^)%KylP$R=mKqE7QDohTC96u;Y7V;)`)ZN09la$ou yw}`c11Um)rIQN<#lCDSJU@t;f{TcH~fLPZw?PpZ@9o2tD%lnykH0`XG4Eqbp5opN( diff --git a/movensys_navigation_nav2_config/launch/visual_slam.launch.py b/movensys_navigation_perception/launch/visual_slam.launch.py similarity index 100% rename from movensys_navigation_nav2_config/launch/visual_slam.launch.py rename to movensys_navigation_perception/launch/visual_slam.launch.py diff --git a/movensys_navigation_perception/package.xml b/movensys_navigation_perception/package.xml index 170963d..43f80ad 100644 --- a/movensys_navigation_perception/package.xml +++ b/movensys_navigation_perception/package.xml @@ -11,7 +11,12 @@ ament_cmake ros2launch - + + + isaac_ros_visual_slam + realsense2_camera + rclcpp_components + ament_lint_auto ament_lint_common From 5ab55bb24bc07efabbb3d2984b6906a65e1e618c Mon Sep 17 00:00:00 2001 From: mfikih Date: Wed, 29 Jul 2026 13:32:51 +0900 Subject: [PATCH 05/19] change cuvslam launch file name --- movensys_navigation_nav2_config/launch/base.launch.py | 2 +- .../launch/{visual_slam.launch.py => cuvslam.launch.py} | 0 movensys_navigation_perception/package.xml | 1 - 3 files changed, 1 insertion(+), 2 deletions(-) rename movensys_navigation_perception/launch/{visual_slam.launch.py => cuvslam.launch.py} (100%) diff --git a/movensys_navigation_nav2_config/launch/base.launch.py b/movensys_navigation_nav2_config/launch/base.launch.py index 5f5387e..0db65e8 100644 --- a/movensys_navigation_nav2_config/launch/base.launch.py +++ b/movensys_navigation_nav2_config/launch/base.launch.py @@ -53,7 +53,7 @@ def generate_launch_description(): # cuVSLAM (Isaac ROS Visual SLAM) + RealSense driver. start_visual_slam = IncludeLaunchDescription( PythonLaunchDescriptionSource( - os.path.join(perception_share, 'launch', 'visual_slam.launch.py')), + os.path.join(perception_share, 'launch', 'cuvslam.launch.py')), condition=IfCondition(use_cuvslam), launch_arguments={'use_sim_time': LaunchConfiguration('use_sim_time')}.items()) diff --git a/movensys_navigation_perception/launch/visual_slam.launch.py b/movensys_navigation_perception/launch/cuvslam.launch.py similarity index 100% rename from movensys_navigation_perception/launch/visual_slam.launch.py rename to movensys_navigation_perception/launch/cuvslam.launch.py diff --git a/movensys_navigation_perception/package.xml b/movensys_navigation_perception/package.xml index 43f80ad..75b2f56 100644 --- a/movensys_navigation_perception/package.xml +++ b/movensys_navigation_perception/package.xml @@ -12,7 +12,6 @@ ros2launch - isaac_ros_visual_slam realsense2_camera rclcpp_components From 70cb9bf026129041edf92b554675d4b98a0f70bd Mon Sep 17 00:00:00 2001 From: mfikih Date: Wed, 29 Jul 2026 15:29:27 +0900 Subject: [PATCH 06/19] repair cuVslam --- .../urdf/diffbot/perception.xacro | 2 +- .../config/diffbot/cuvslam.yaml | 22 +++-- .../config/diffbot/realsense_front.yaml | 30 +++++++ .../launch/camera_front.launch.py | 82 +++++++++++++++++++ .../launch/cuvslam.launch.py | 50 +++-------- 5 files changed, 139 insertions(+), 47 deletions(-) create mode 100644 movensys_navigation_perception/config/diffbot/realsense_front.yaml create mode 100644 movensys_navigation_perception/launch/camera_front.launch.py diff --git a/movensys_navigation_description/urdf/diffbot/perception.xacro b/movensys_navigation_description/urdf/diffbot/perception.xacro index a35cb23..ceadf4d 100644 --- a/movensys_navigation_description/urdf/diffbot/perception.xacro +++ b/movensys_navigation_description/urdf/diffbot/perception.xacro @@ -140,7 +140,7 @@ - + diff --git a/movensys_navigation_perception/config/diffbot/cuvslam.yaml b/movensys_navigation_perception/config/diffbot/cuvslam.yaml index 3e88408..80ea08b 100644 --- a/movensys_navigation_perception/config/diffbot/cuvslam.yaml +++ b/movensys_navigation_perception/config/diffbot/cuvslam.yaml @@ -1,5 +1,5 @@ ### Isaac ROS Visual SLAM (cuVSLAM) config ### -# Stereo-inertial visual odometry from a RealSense D435i (infra1/infra2 + IMU). +# Stereo-inertial visual odometry from a RealSense D455 (infra1/infra2 + IMU). # The node publishes /visual_slam/tracking/odometry, which the EKF fuses as an # extra odometry source (see ekf_cuvslam.yaml). TF publishing is disabled here # because robot_localization's EKF owns the odom -> base_link transform. @@ -7,13 +7,19 @@ visual_slam_node: ros__parameters: # --- frames --- # base_frame chains to the camera optical frames via: - # base_link -> camera_link (URDF/robot_state_publisher) - # camera_link -> camera_*_optical_frame (realsense2_camera driver) + # base_link -> camera_front_link (URDF/robot_state_publisher) + # camera_front_link -> camera_front_*_optical_frame (realsense2_camera) base_frame: base_link odom_frame: odom map_frame: map - camera_optical_frames: [camera_front_color_optical_frame, camera_front_color_optical_frame] - imu_frame: camera_gyro_optical_frame + # One D455 = two imagers. Order must match the image_N remaps in + # cuvslam.launch.py: image_0 -> infra1 (left), image_1 -> infra2 (right). + # These names come from the driver's node name (camera_front); the driver + # fixes the suffixes, so infra1/infra2 rather than left/right. + camera_optical_frames: [camera_front_infra1_optical_frame, + camera_front_infra2_optical_frame] + + imu_frame: camera_front_gyro_optical_frame # --- cameras --- num_cameras: 2 @@ -22,9 +28,9 @@ visual_slam_node: enable_image_denoising: false image_jitter_threshold_ms: 34.0 - # --- inertial fusion (D435i IMU) --- - enable_imu_fusion: true - # Noise characteristics for the D435i BMI055 (Isaac ROS reference values). + # --- inertial fusion (D455 IMU) --- + enable_imu_fusion: false + # Noise characteristics for the BMI055 (Isaac ROS reference values). gyro_noise_density: 0.000244 gyro_random_walk: 0.000019393 accel_noise_density: 0.001862 diff --git a/movensys_navigation_perception/config/diffbot/realsense_front.yaml b/movensys_navigation_perception/config/diffbot/realsense_front.yaml new file mode 100644 index 0000000..aa8f7f5 --- /dev/null +++ b/movensys_navigation_perception/config/diffbot/realsense_front.yaml @@ -0,0 +1,30 @@ +/**: + ros__parameters: + device_type: '' + serial_no: '333422302722' + usb_port_id: '' + + enable_infra1: true + enable_infra2: true + enable_color: false + enable_depth: false + + depth_module: + emitter_enabled: 0 + profile: '640x360x90' + + enable_gyro: true + enable_accel: true + gyro_fps: 200 + accel_fps: 200 + unite_imu_method: 2 + + enable_sync: true + + camera_resolution: + width: 640 + height: 480 + camera_name: 'camera_front' + focal_length: + f_x: 380.0 + f_y: 380.0 diff --git a/movensys_navigation_perception/launch/camera_front.launch.py b/movensys_navigation_perception/launch/camera_front.launch.py new file mode 100644 index 0000000..853d031 --- /dev/null +++ b/movensys_navigation_perception/launch/camera_front.launch.py @@ -0,0 +1,82 @@ +import os + +from ament_index_python.packages import get_package_share_directory +from launch import LaunchDescription +from launch.actions import DeclareLaunchArgument +from launch.conditions import IfCondition, UnlessCondition +from launch.substitutions import LaunchConfiguration +from launch_ros.actions import Node + + +def generate_launch_description() -> LaunchDescription: + use_sim_time_arg = DeclareLaunchArgument( + "use_sim_time", default_value="false", + description="Use simulation clock (/clock)" + ) + + pkg_share = get_package_share_directory('movensys_navigation_perception') + navigation_model = os.environ.get('NAVIGATION_MODEL', 'diffbot') + realsense_config = os.path.join(pkg_share, 'config', navigation_model, + 'realsense_front.yaml') + + camera_front_node = Node( + package='realsense2_camera', + executable='realsense2_camera_node', + name='realsense2_camera', + namespace='camera_front', + parameters=[realsense_config], + output='screen', + condition=UnlessCondition(LaunchConfiguration('use_sim_time')), + remappings=[ + ('realsense2_camera/infra1/image_rect_raw', '/image_front_infra1/rgb'), + ('realsense2_camera/infra1/camera_info', '/image_front_infra1/camera_info'), + ('realsense2_camera/infra2/image_rect_raw', '/image_front_infra2/rgb'), + ('realsense2_camera/infra2/camera_info', '/image_front_infra2/camera_info'), + ], + ) + + # Both run at once under sim, so each needs its own node name. + start_camera_front_left_transform_simulation = Node( + package="tf2_ros", + executable="static_transform_publisher", + name="camera_front_infra1_tf", + output="log", + condition=IfCondition(LaunchConfiguration("use_sim_time")), + parameters=[{"use_sim_time": True}], + arguments=[ + "--frame-id", "base_link", + "--child-frame-id", "camera_front_infra1_optical_frame", + "--x", "0.4", + "--y", "0.0", + "--z", "0.17", + "--roll", "-1.5707963", + "--pitch", "0.0", + "--yaw", "-1.5707963", + ], + ) + + start_camera_front_right_transform_simulation = Node( + package="tf2_ros", + executable="static_transform_publisher", + name="camera_front_infra2_tf", + output="log", + condition=IfCondition(LaunchConfiguration("use_sim_time")), + parameters=[{"use_sim_time": True}], + arguments=[ + "--frame-id", "base_link", + "--child-frame-id", "camera_front_infra2_optical_frame", + "--x", "0.4", + "--y", "-0.095", + "--z", "0.17", + "--roll", "-1.5707963", + "--pitch", "0.0", + "--yaw", "-1.5707963", + ], + ) + + return LaunchDescription([ + use_sim_time_arg, + camera_front_node, + start_camera_front_left_transform_simulation, + start_camera_front_right_transform_simulation, + ]) diff --git a/movensys_navigation_perception/launch/cuvslam.launch.py b/movensys_navigation_perception/launch/cuvslam.launch.py index 54b364f..fc9b62b 100644 --- a/movensys_navigation_perception/launch/cuvslam.launch.py +++ b/movensys_navigation_perception/launch/cuvslam.launch.py @@ -2,10 +2,10 @@ from ament_index_python.packages import get_package_share_directory from launch import LaunchDescription -from launch.actions import DeclareLaunchArgument -from launch.conditions import IfCondition +from launch.actions import DeclareLaunchArgument, IncludeLaunchDescription +from launch.launch_description_sources import PythonLaunchDescriptionSource from launch.substitutions import LaunchConfiguration -from launch_ros.actions import ComposableNodeContainer, Node +from launch_ros.actions import ComposableNodeContainer from launch_ros.descriptions import ComposableNode @@ -16,43 +16,23 @@ def generate_launch_description(): perception_share, 'config', navigation_model, 'cuvslam.yaml') use_sim_time = LaunchConfiguration('use_sim_time') - launch_realsense = LaunchConfiguration('launch_realsense') - realsense_node = Node( - package='realsense2_camera', - executable='realsense2_camera_node', - namespace='camera', - name='camera', - output='screen', - condition=IfCondition(launch_realsense), - parameters=[{ - 'enable_infra1': True, - 'enable_infra2': True, - 'enable_color': False, - 'enable_depth': False, - 'depth_module.emitter_enabled': 0, - 'depth_module.profile': '640x360x90', - 'enable_gyro': True, - 'enable_accel': True, - 'gyro_fps': 200, - 'accel_fps': 200, - 'unite_imu_method': 2, # 2 = linear interpolation -> /camera/imu - 'enable_sync': True, - }], + camera_front = IncludeLaunchDescription( + PythonLaunchDescriptionSource( + os.path.join(perception_share, 'launch', 'camera_front.launch.py')), + launch_arguments={'use_sim_time': use_sim_time}.items(), ) - # --- cuVSLAM (Isaac ROS Visual SLAM) --- visual_slam_node = ComposableNode( name='visual_slam_node', package='isaac_ros_visual_slam', plugin='nvidia::isaac_ros::visual_slam::VisualSlamNode', parameters=[vslam_params, {'use_sim_time': use_sim_time}], remappings=[ - ('visual_slam/image_0', '/camera/infra1/image_rect_raw'), - ('visual_slam/camera_info_0', '/camera/infra1/camera_info'), - ('visual_slam/image_1', '/camera/infra2/image_rect_raw'), - ('visual_slam/camera_info_1', '/camera/infra2/camera_info'), - ('visual_slam/imu', '/camera/imu'), + ('visual_slam/image_0', '/image_front_infra1/rgb'), + ('visual_slam/camera_info_0', '/image_front_infra1/camera_info'), + ('visual_slam/image_1', '/image_front_infra2/rgb'), + ('visual_slam/camera_info_1', '/image_front_infra2/camera_info'), ], ) @@ -71,12 +51,6 @@ def generate_launch_description(): default_value='false', description='Use simulation (Gazebo/Isaac) clock if true', ), - DeclareLaunchArgument( - 'launch_realsense', - default_value='true', - description='Start the realsense2_camera driver here. Set false to feed ' - 'cuVSLAM from another stereo source (e.g. Isaac Sim).', - ), - realsense_node, + camera_front, visual_slam_container, ]) From 5cb06dc36b3991d0424e189e6aad5a7aa2362f94 Mon Sep 17 00:00:00 2001 From: mfikih Date: Wed, 29 Jul 2026 15:35:58 +0900 Subject: [PATCH 07/19] add camera real transform --- .../launch/camera_front.launch.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/movensys_navigation_perception/launch/camera_front.launch.py b/movensys_navigation_perception/launch/camera_front.launch.py index 853d031..7cda310 100644 --- a/movensys_navigation_perception/launch/camera_front.launch.py +++ b/movensys_navigation_perception/launch/camera_front.launch.py @@ -74,9 +74,28 @@ def generate_launch_description() -> LaunchDescription: ], ) + start_camera_front_transform_real = Node( + package="tf2_ros", + executable="static_transform_publisher", + output="log", + condition=UnlessCondition(LaunchConfiguration("use_sim_time")), + parameters=[{"use_sim_time": False}], + arguments=[ + "--frame-id", "base_link", + "--child-frame-id", "camera_front_link", + "--x", "0.4", + "--y", "0.0", + "--z", "0.17", + "--roll", "-1.5707963", + "--pitch", "0.0", + "--yaw", "-1.5707963", + ], + ) + return LaunchDescription([ use_sim_time_arg, camera_front_node, start_camera_front_left_transform_simulation, start_camera_front_right_transform_simulation, + start_camera_front_transform_real ]) From 1e57cfaf980e77fc952fd2ca4824814c1c50df89 Mon Sep 17 00:00:00 2001 From: mfikih Date: Wed, 29 Jul 2026 15:40:45 +0900 Subject: [PATCH 08/19] add gazebo infra camera --- .../gazebo_navigation_simulation.launch.py | 11 +++++ .../urdf/diffbot/perception.gazebo | 44 +++++++++++++++++++ 2 files changed, 55 insertions(+) diff --git a/movensys_navigation_description/launch/gazebo_navigation_simulation.launch.py b/movensys_navigation_description/launch/gazebo_navigation_simulation.launch.py index effea18..f2430ee 100644 --- a/movensys_navigation_description/launch/gazebo_navigation_simulation.launch.py +++ b/movensys_navigation_description/launch/gazebo_navigation_simulation.launch.py @@ -19,6 +19,9 @@ def generate_launch_description(): clock_msg = {'humble': 'ignition.msgs.Clock', 'jazzy': 'gz.msgs.Clock'}[ros_distro] imu_msg = {'humble': 'ignition.msgs.IMU', 'jazzy': 'gz.msgs.IMU'}[ros_distro] lidar_msg = {'humble': 'ignition.msgs.LaserScan', 'jazzy': 'gz.msgs.LaserScan'}[ros_distro] + image_msg = {'humble': 'ignition.msgs.Image', 'jazzy': 'gz.msgs.Image'}[ros_distro] + camera_info_msg = {'humble': 'ignition.msgs.CameraInfo', + 'jazzy': 'gz.msgs.CameraInfo'}[ros_distro] world_file = {'humble': 'arena_ign.world', 'jazzy': 'arena_gz.world'}[ros_distro] @@ -69,6 +72,14 @@ def generate_launch_description(): f'/imu@sensor_msgs/msg/Imu[{imu_msg}', f'/lidar_front_left_scan@sensor_msgs/msg/LaserScan[{lidar_msg}', f'/lidar_rear_right_scan@sensor_msgs/msg/LaserScan[{lidar_msg}', + f'/image_front_infra1/rgb@sensor_msgs/msg/Image[{image_msg}', + f'/image_front_infra1/rgb/camera_info@sensor_msgs/msg/CameraInfo[{camera_info_msg}', + f'/image_front_infra2/rgb@sensor_msgs/msg/Image[{image_msg}', + f'/image_front_infra2/rgb/camera_info@sensor_msgs/msg/CameraInfo[{camera_info_msg}', + ], + remappings=[ + ('/image_front_infra1/rgb/camera_info', '/image_front_infra1/camera_info'), + ('/image_front_infra2/rgb/camera_info', '/image_front_infra2/camera_info'), ], output='screen' ) diff --git a/movensys_navigation_description/urdf/diffbot/perception.gazebo b/movensys_navigation_description/urdf/diffbot/perception.gazebo index e6c8637..17730fa 100644 --- a/movensys_navigation_description/urdf/diffbot/perception.gazebo +++ b/movensys_navigation_description/urdf/diffbot/perception.gazebo @@ -85,6 +85,50 @@ + + + 0 0 0 0 0 0 + true + false + 30 + /image_front_infra1/rgb + camera_front_infra1_optical_frame + + 1.518 + + 640 + 360 + L8 + + + 0.1 + 30.0 + + + + + + 0 -0.095 0 0 0 0 + true + false + 30 + /image_front_infra2/rgb + camera_front_infra2_optical_frame + + 1.518 + + 640 + 360 + L8 + + + 0.1 + 30.0 + + + + + From 265542a98a80fe9d1d865cf611cca02c786959d6 Mon Sep 17 00:00:00 2001 From: mfikih Date: Wed, 29 Jul 2026 16:18:50 +0900 Subject: [PATCH 09/19] repair transform issue --- .../urdf/diffbot/movensys_navigation.urdf | 27 +++++ .../urdf/diffbot/perception.gazebo | 30 ++++++ .../launch/camera_front.launch.py | 101 ------------------ .../launch/cuvslam.launch.py | 10 +- .../launch/diffbot_perception.launch.py | 24 ++++- 5 files changed, 81 insertions(+), 111 deletions(-) delete mode 100644 movensys_navigation_perception/launch/camera_front.launch.py diff --git a/movensys_navigation_description/urdf/diffbot/movensys_navigation.urdf b/movensys_navigation_description/urdf/diffbot/movensys_navigation.urdf index 0989fe8..2c7b4ae 100644 --- a/movensys_navigation_description/urdf/diffbot/movensys_navigation.urdf +++ b/movensys_navigation_description/urdf/diffbot/movensys_navigation.urdf @@ -111,6 +111,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/movensys_navigation_description/urdf/diffbot/perception.gazebo b/movensys_navigation_description/urdf/diffbot/perception.gazebo index 17730fa..0f81241 100644 --- a/movensys_navigation_description/urdf/diffbot/perception.gazebo +++ b/movensys_navigation_description/urdf/diffbot/perception.gazebo @@ -85,6 +85,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 0 0 0 0 0 diff --git a/movensys_navigation_perception/launch/camera_front.launch.py b/movensys_navigation_perception/launch/camera_front.launch.py deleted file mode 100644 index 7cda310..0000000 --- a/movensys_navigation_perception/launch/camera_front.launch.py +++ /dev/null @@ -1,101 +0,0 @@ -import os - -from ament_index_python.packages import get_package_share_directory -from launch import LaunchDescription -from launch.actions import DeclareLaunchArgument -from launch.conditions import IfCondition, UnlessCondition -from launch.substitutions import LaunchConfiguration -from launch_ros.actions import Node - - -def generate_launch_description() -> LaunchDescription: - use_sim_time_arg = DeclareLaunchArgument( - "use_sim_time", default_value="false", - description="Use simulation clock (/clock)" - ) - - pkg_share = get_package_share_directory('movensys_navigation_perception') - navigation_model = os.environ.get('NAVIGATION_MODEL', 'diffbot') - realsense_config = os.path.join(pkg_share, 'config', navigation_model, - 'realsense_front.yaml') - - camera_front_node = Node( - package='realsense2_camera', - executable='realsense2_camera_node', - name='realsense2_camera', - namespace='camera_front', - parameters=[realsense_config], - output='screen', - condition=UnlessCondition(LaunchConfiguration('use_sim_time')), - remappings=[ - ('realsense2_camera/infra1/image_rect_raw', '/image_front_infra1/rgb'), - ('realsense2_camera/infra1/camera_info', '/image_front_infra1/camera_info'), - ('realsense2_camera/infra2/image_rect_raw', '/image_front_infra2/rgb'), - ('realsense2_camera/infra2/camera_info', '/image_front_infra2/camera_info'), - ], - ) - - # Both run at once under sim, so each needs its own node name. - start_camera_front_left_transform_simulation = Node( - package="tf2_ros", - executable="static_transform_publisher", - name="camera_front_infra1_tf", - output="log", - condition=IfCondition(LaunchConfiguration("use_sim_time")), - parameters=[{"use_sim_time": True}], - arguments=[ - "--frame-id", "base_link", - "--child-frame-id", "camera_front_infra1_optical_frame", - "--x", "0.4", - "--y", "0.0", - "--z", "0.17", - "--roll", "-1.5707963", - "--pitch", "0.0", - "--yaw", "-1.5707963", - ], - ) - - start_camera_front_right_transform_simulation = Node( - package="tf2_ros", - executable="static_transform_publisher", - name="camera_front_infra2_tf", - output="log", - condition=IfCondition(LaunchConfiguration("use_sim_time")), - parameters=[{"use_sim_time": True}], - arguments=[ - "--frame-id", "base_link", - "--child-frame-id", "camera_front_infra2_optical_frame", - "--x", "0.4", - "--y", "-0.095", - "--z", "0.17", - "--roll", "-1.5707963", - "--pitch", "0.0", - "--yaw", "-1.5707963", - ], - ) - - start_camera_front_transform_real = Node( - package="tf2_ros", - executable="static_transform_publisher", - output="log", - condition=UnlessCondition(LaunchConfiguration("use_sim_time")), - parameters=[{"use_sim_time": False}], - arguments=[ - "--frame-id", "base_link", - "--child-frame-id", "camera_front_link", - "--x", "0.4", - "--y", "0.0", - "--z", "0.17", - "--roll", "-1.5707963", - "--pitch", "0.0", - "--yaw", "-1.5707963", - ], - ) - - return LaunchDescription([ - use_sim_time_arg, - camera_front_node, - start_camera_front_left_transform_simulation, - start_camera_front_right_transform_simulation, - start_camera_front_transform_real - ]) diff --git a/movensys_navigation_perception/launch/cuvslam.launch.py b/movensys_navigation_perception/launch/cuvslam.launch.py index fc9b62b..66d42fd 100644 --- a/movensys_navigation_perception/launch/cuvslam.launch.py +++ b/movensys_navigation_perception/launch/cuvslam.launch.py @@ -2,8 +2,7 @@ from ament_index_python.packages import get_package_share_directory from launch import LaunchDescription -from launch.actions import DeclareLaunchArgument, IncludeLaunchDescription -from launch.launch_description_sources import PythonLaunchDescriptionSource +from launch.actions import DeclareLaunchArgument from launch.substitutions import LaunchConfiguration from launch_ros.actions import ComposableNodeContainer from launch_ros.descriptions import ComposableNode @@ -17,12 +16,6 @@ def generate_launch_description(): use_sim_time = LaunchConfiguration('use_sim_time') - camera_front = IncludeLaunchDescription( - PythonLaunchDescriptionSource( - os.path.join(perception_share, 'launch', 'camera_front.launch.py')), - launch_arguments={'use_sim_time': use_sim_time}.items(), - ) - visual_slam_node = ComposableNode( name='visual_slam_node', package='isaac_ros_visual_slam', @@ -51,6 +44,5 @@ def generate_launch_description(): default_value='false', description='Use simulation (Gazebo/Isaac) clock if true', ), - camera_front, visual_slam_container, ]) diff --git a/movensys_navigation_perception/launch/diffbot_perception.launch.py b/movensys_navigation_perception/launch/diffbot_perception.launch.py index 93288b4..311aade 100644 --- a/movensys_navigation_perception/launch/diffbot_perception.launch.py +++ b/movensys_navigation_perception/launch/diffbot_perception.launch.py @@ -1,10 +1,32 @@ import math +import os +from ament_index_python.packages import get_package_share_directory from launch import LaunchDescription from launch_ros.actions import Node def generate_launch_description(): + pkg_share = get_package_share_directory('movensys_navigation_perception') + navigation_model = os.environ.get('NAVIGATION_MODEL', 'diffbot') + realsense_config = os.path.join(pkg_share, 'config', navigation_model, + 'realsense_front.yaml') + + camera_front_node = Node( + package='realsense2_camera', + executable='realsense2_camera_node', + name='realsense2_camera', + namespace='camera_front', + parameters=[realsense_config], + output='screen', + remappings=[ + ('realsense2_camera/infra1/image_rect_raw', '/image_front_infra1/rgb'), + ('realsense2_camera/infra1/camera_info', '/image_front_infra1/camera_info'), + ('realsense2_camera/infra2/image_rect_raw', '/image_front_infra2/rgb'), + ('realsense2_camera/infra2/camera_info', '/image_front_infra2/camera_info'), + ], + ) + lidar_front_left_node = Node( package='sick_safetyscanners2', executable='sick_safetyscanners2_node', @@ -75,4 +97,4 @@ def generate_launch_description(): ) return LaunchDescription( - [lidar_front_left_node, lidar_rear_right_node, imu_node]) + [camera_front_node, lidar_front_left_node, lidar_rear_right_node, imu_node]) From 4f0f3527765a617165dadc5b1e7be503e28e3201 Mon Sep 17 00:00:00 2001 From: mfikih Date: Thu, 30 Jul 2026 13:11:07 +0900 Subject: [PATCH 10/19] repair camera tf transform --- .../urdf/diffbot/movensys_navigation.urdf | 17 +++++++++++ .../urdf/diffbot/perception.gazebo | 29 ------------------- .../urdf/diffbot/perception.xacro | 19 ++++++++++++ .../launch/base.launch.py | 5 +++- 4 files changed, 40 insertions(+), 30 deletions(-) diff --git a/movensys_navigation_description/urdf/diffbot/movensys_navigation.urdf b/movensys_navigation_description/urdf/diffbot/movensys_navigation.urdf index 2c7b4ae..cfc5e3f 100644 --- a/movensys_navigation_description/urdf/diffbot/movensys_navigation.urdf +++ b/movensys_navigation_description/urdf/diffbot/movensys_navigation.urdf @@ -138,6 +138,23 @@ + + + + + + + + + + + + + + + + + diff --git a/movensys_navigation_description/urdf/diffbot/perception.gazebo b/movensys_navigation_description/urdf/diffbot/perception.gazebo index 0f81241..09d2959 100644 --- a/movensys_navigation_description/urdf/diffbot/perception.gazebo +++ b/movensys_navigation_description/urdf/diffbot/perception.gazebo @@ -85,35 +85,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/movensys_navigation_description/urdf/diffbot/perception.xacro b/movensys_navigation_description/urdf/diffbot/perception.xacro index ceadf4d..d9a56df 100644 --- a/movensys_navigation_description/urdf/diffbot/perception.xacro +++ b/movensys_navigation_description/urdf/diffbot/perception.xacro @@ -163,4 +163,23 @@ + + + + + + + + + + + + + + + + + + + diff --git a/movensys_navigation_nav2_config/launch/base.launch.py b/movensys_navigation_nav2_config/launch/base.launch.py index 0db65e8..5061d4a 100644 --- a/movensys_navigation_nav2_config/launch/base.launch.py +++ b/movensys_navigation_nav2_config/launch/base.launch.py @@ -33,7 +33,10 @@ def generate_launch_description(): condition=IfCondition(LaunchConfiguration('rsp')), parameters=[{ 'use_sim_time': use_sim_time, - 'robot_description': Command(['xacro ', xacro_file, ' robot_name:=amr']), + 'robot_description': Command([ + 'xacro ', xacro_file, ' robot_name:=amr', + ' urdf_camera_optical_tf:=', LaunchConfiguration('use_sim_time'), + ]), }]) start_robot_localization = Node( From c35093bb369147563ad2370658be860d10255955 Mon Sep 17 00:00:00 2001 From: mfikih Date: Wed, 5 Aug 2026 08:55:27 +0900 Subject: [PATCH 11/19] repai cuvslam rosdep --- .github/workflows/movensys-navigation.yml | 3 ++- .github/workflows/test-nav2.yml | 3 ++- .github/workflows/test-perception.yml | 3 ++- .github/workflows/unit-test.yml | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/movensys-navigation.yml b/.github/workflows/movensys-navigation.yml index 83624ea..f006936 100644 --- a/.github/workflows/movensys-navigation.yml +++ b/.github/workflows/movensys-navigation.yml @@ -43,7 +43,8 @@ jobs: rosdep update cd ~/movensys_ws rosdep install --from-paths src --ignore-src -y \ - --rosdistro ${{ matrix.ros_distro }} + --rosdistro ${{ matrix.ros_distro }} \ + --skip-keys isaac_ros_visual_slam - name: Build run: | diff --git a/.github/workflows/test-nav2.yml b/.github/workflows/test-nav2.yml index e427429..99c6345 100644 --- a/.github/workflows/test-nav2.yml +++ b/.github/workflows/test-nav2.yml @@ -45,7 +45,8 @@ jobs: rosdep update cd ~/movensys_ws rosdep install --from-paths src --ignore-src -y \ - --rosdistro ${{ matrix.ros_distro }} + --rosdistro ${{ matrix.ros_distro }} \ + --skip-keys isaac_ros_visual_slam - name: Build run: | diff --git a/.github/workflows/test-perception.yml b/.github/workflows/test-perception.yml index 286848a..3ddf9f3 100644 --- a/.github/workflows/test-perception.yml +++ b/.github/workflows/test-perception.yml @@ -43,7 +43,8 @@ jobs: rosdep update cd ~/movensys_ws rosdep install --from-paths src/movensys-navigation/movensys_navigation_perception \ - --ignore-src -y --rosdistro ${{ matrix.ros_distro }} + --ignore-src -y --rosdistro ${{ matrix.ros_distro }} \ + --skip-keys isaac_ros_visual_slam - name: Build run: | diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index 60008f7..42814ce 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -45,7 +45,8 @@ jobs: rosdep update cd ~/movensys_ws rosdep install --from-paths src --ignore-src -y \ - --rosdistro ${{ matrix.ros_distro }} + --rosdistro ${{ matrix.ros_distro }} \ + --skip-keys isaac_ros_visual_slam - name: colcon build run: | From 028c56b3d0832876570d77fa6cad0317b3ff9998 Mon Sep 17 00:00:00 2001 From: mfikih Date: Wed, 5 Aug 2026 09:11:33 +0900 Subject: [PATCH 12/19] repair unit test --- .github/workflows/unit-test.yml | 2 + .../launch/diffbot_perception.launch.py | 80 +++++++++---------- 2 files changed, 42 insertions(+), 40 deletions(-) diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index 42814ce..369ecf0 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -55,6 +55,7 @@ jobs: colcon build --symlink-install \ --packages-select \ movensys_navigation_description \ + movensys_navigation_perception \ movensys_navigation_nav2_config - name: colcon test @@ -64,6 +65,7 @@ jobs: source install/setup.bash colcon test --packages-select \ movensys_navigation_description \ + movensys_navigation_perception \ movensys_navigation_nav2_config \ --event-handlers console_cohesion+ colcon test-result --verbose diff --git a/movensys_navigation_perception/launch/diffbot_perception.launch.py b/movensys_navigation_perception/launch/diffbot_perception.launch.py index 311aade..f0d7840 100644 --- a/movensys_navigation_perception/launch/diffbot_perception.launch.py +++ b/movensys_navigation_perception/launch/diffbot_perception.launch.py @@ -34,25 +34,25 @@ def generate_launch_description(): output='screen', emulate_tty=True, parameters=[ - {"frame_id": "scan", - "sensor_ip": "192.168.29.11", - "host_ip": "192.168.29.44", - "interface_ip": "0.0.0.0", - "host_udp_port": 0, - "channel": 0, - "channel_enabled": True, - "skip": 0, - "angle_start": math.radians(-130), - "angle_end": math.radians(130), - "time_offset": 0.0, - "general_system_state": True, - "derived_settings": True, - "measurement_data": True, - "intrusion_data": True, - "application_io_data": True, - "use_persistent_config": False, - "min_intensities": 0.0, - "max_distance": 30} + {'frame_id': 'scan', + 'sensor_ip': '192.168.29.11', + 'host_ip': '192.168.29.44', + 'interface_ip': '0.0.0.0', + 'host_udp_port': 0, + 'channel': 0, + 'channel_enabled': True, + 'skip': 0, + 'angle_start': math.radians(-130), + 'angle_end': math.radians(130), + 'time_offset': 0.0, + 'general_system_state': True, + 'derived_settings': True, + 'measurement_data': True, + 'intrusion_data': True, + 'application_io_data': True, + 'use_persistent_config': False, + 'min_intensities': 0.0, + 'max_distance': 30} ], ) @@ -63,25 +63,25 @@ def generate_launch_description(): output='screen', emulate_tty=True, parameters=[ - {"frame_id": "scan", - "sensor_ip": "192.168.29.12", - "host_ip": "192.168.29.44", - "interface_ip": "0.0.0.0", - "host_udp_port": 0, - "channel": 0, - "channel_enabled": True, - "skip": 0, - "angle_start": math.radians(-130), - "angle_end": math.radians(130), - "time_offset": 0.0, - "general_system_state": True, - "derived_settings": True, - "measurement_data": True, - "intrusion_data": True, - "application_io_data": True, - "use_persistent_config": False, - "min_intensities": 0.0, - "max_distance": 30} + {'frame_id': 'scan', + 'sensor_ip': '192.168.29.12', + 'host_ip': '192.168.29.44', + 'interface_ip': '0.0.0.0', + 'host_udp_port': 0, + 'channel': 0, + 'channel_enabled': True, + 'skip': 0, + 'angle_start': math.radians(-130), + 'angle_end': math.radians(130), + 'time_offset': 0.0, + 'general_system_state': True, + 'derived_settings': True, + 'measurement_data': True, + 'intrusion_data': True, + 'application_io_data': True, + 'use_persistent_config': False, + 'min_intensities': 0.0, + 'max_distance': 30} ], ) @@ -91,8 +91,8 @@ def generate_launch_description(): name='imu_node', output='screen', parameters=[ - {"serial_port": "/dev/ttyACM0", - "serial_baud": 921600} + {'serial_port': '/dev/ttyACM0', + 'serial_baud': 921600} ], ) From 35e328f34de695d7588e2d308c3796b9a0e3fdb1 Mon Sep 17 00:00:00 2001 From: mfikih Date: Wed, 5 Aug 2026 09:18:59 +0900 Subject: [PATCH 13/19] add lint test on perception --- .github/workflows/lint.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index af270ac..8161242 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -47,14 +47,16 @@ jobs: ament_flake8 --config ament_flake8.ini \ movensys_navigation_description/launch \ movensys_navigation_nav2_config/launch \ - movensys_navigation_nav2_config/movensys_navigation_nav2_config + movensys_navigation_nav2_config/movensys_navigation_nav2_config \ + movensys_navigation_perception/launch - name: ament_xmllint (package.xml) run: | source /opt/ros/${{ matrix.ros_distro }}/setup.bash ament_xmllint \ movensys_navigation_description/package.xml \ - movensys_navigation_nav2_config/package.xml + movensys_navigation_nav2_config/package.xml \ + movensys_navigation_perception/package.xml - name: cppcheck (warnings only, never fails) run: | From cb156af740f89c10a2b005e33b37a93b2aa9b2c5 Mon Sep 17 00:00:00 2001 From: mfikih Date: Wed, 5 Aug 2026 09:55:16 +0900 Subject: [PATCH 14/19] faster ci process --- .github/workflows/unit-test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index 369ecf0..d6cb79b 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -46,6 +46,7 @@ jobs: cd ~/movensys_ws rosdep install --from-paths src --ignore-src -y \ --rosdistro ${{ matrix.ros_distro }} \ + -t buildtool -t build -t buildtool_export -t build_export -t test \ --skip-keys isaac_ros_visual_slam - name: colcon build From 9f67ae27098548542c2e8eb013d281ef602df236 Mon Sep 17 00:00:00 2001 From: mfikih Date: Wed, 5 Aug 2026 10:15:13 +0900 Subject: [PATCH 15/19] delete ros2 distro for faster ci --- .github/workflows/movensys-navigation.yml | 7 +++++-- .github/workflows/test-nav2.yml | 5 +++-- .github/workflows/test-perception.yml | 5 +++-- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/workflows/movensys-navigation.yml b/.github/workflows/movensys-navigation.yml index f006936..6295bfd 100644 --- a/.github/workflows/movensys-navigation.yml +++ b/.github/workflows/movensys-navigation.yml @@ -25,8 +25,6 @@ jobs: - name: Setup ROS ${{ matrix.ros_distro }} uses: ros-tooling/setup-ros@v0.7 - with: - required-ros-distributions: ${{ matrix.ros_distro }} - name: Setup workspace run: | @@ -36,14 +34,19 @@ jobs: - name: Install dependencies run: | sudo apt-get update + sudo apt-get install -y --no-install-recommends \ + ros-${{ matrix.ros_distro }}-ros-base # GH ubuntu-22.04 runners pin LLVM's libunwind, blocking the stock # libunwind-dev that libgoogle-glog-dev (via slam-toolbox) needs. sudo apt-get install -y libunwind-dev sudo rosdep init || true rosdep update cd ~/movensys_ws + # This job only compiles (BUILD_TESTING=OFF), so runtime deps such as + # navigation2, ros_gz_sim and rviz2 are not needed. rosdep install --from-paths src --ignore-src -y \ --rosdistro ${{ matrix.ros_distro }} \ + -t buildtool -t build -t buildtool_export -t build_export \ --skip-keys isaac_ros_visual_slam - name: Build diff --git a/.github/workflows/test-nav2.yml b/.github/workflows/test-nav2.yml index 99c6345..4f3c4e3 100644 --- a/.github/workflows/test-nav2.yml +++ b/.github/workflows/test-nav2.yml @@ -27,8 +27,6 @@ jobs: - name: Setup ROS ${{ matrix.ros_distro }} uses: ros-tooling/setup-ros@v0.7 - with: - required-ros-distributions: ${{ matrix.ros_distro }} - name: Setup workspace run: | @@ -38,6 +36,8 @@ jobs: - name: Install dependencies run: | sudo apt-get update + sudo apt-get install -y --no-install-recommends \ + ros-${{ matrix.ros_distro }}-ros-base # GH ubuntu-22.04 runners pin LLVM's libunwind, blocking the stock # libunwind-dev that libgoogle-glog-dev (via slam-toolbox) needs. sudo apt-get install -y libunwind-dev @@ -46,6 +46,7 @@ jobs: cd ~/movensys_ws rosdep install --from-paths src --ignore-src -y \ --rosdistro ${{ matrix.ros_distro }} \ + -t buildtool -t build -t buildtool_export -t build_export -t test \ --skip-keys isaac_ros_visual_slam - name: Build diff --git a/.github/workflows/test-perception.yml b/.github/workflows/test-perception.yml index 3ddf9f3..057d2b2 100644 --- a/.github/workflows/test-perception.yml +++ b/.github/workflows/test-perception.yml @@ -25,8 +25,6 @@ jobs: - name: Setup ROS ${{ matrix.ros_distro }} uses: ros-tooling/setup-ros@v0.7 - with: - required-ros-distributions: ${{ matrix.ros_distro }} - name: Setup workspace run: | @@ -36,6 +34,8 @@ jobs: - name: Install dependencies run: | sudo apt-get update + sudo apt-get install -y --no-install-recommends \ + ros-${{ matrix.ros_distro }}-ros-base # GH ubuntu-22.04 runners pin LLVM's libunwind, blocking the stock # libunwind-dev that libgoogle-glog-dev (via slam-toolbox) needs. sudo apt-get install -y libunwind-dev @@ -44,6 +44,7 @@ jobs: cd ~/movensys_ws rosdep install --from-paths src/movensys-navigation/movensys_navigation_perception \ --ignore-src -y --rosdistro ${{ matrix.ros_distro }} \ + -t buildtool -t build -t buildtool_export -t build_export -t test \ --skip-keys isaac_ros_visual_slam - name: Build From 3f4dcc44083b5a27d0d43f72f960921622a0c8af Mon Sep 17 00:00:00 2001 From: mfikih Date: Wed, 5 Aug 2026 10:29:20 +0900 Subject: [PATCH 16/19] ignore ros gazebo for ci --- movensys_navigation_nav2_config/package.xml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/movensys_navigation_nav2_config/package.xml b/movensys_navigation_nav2_config/package.xml index eccbb85..2d8552f 100644 --- a/movensys_navigation_nav2_config/package.xml +++ b/movensys_navigation_nav2_config/package.xml @@ -11,8 +11,9 @@ urdf xacro - ros_gz_sim - ros2_control + + ros_gz_sim + ros2_control rclcpp sensor_msgs From 00eddf87248d85c4a6a8c8abc477366683728af6 Mon Sep 17 00:00:00 2001 From: mfikih Date: Wed, 5 Aug 2026 10:35:06 +0900 Subject: [PATCH 17/19] repair ros distro --- .github/workflows/movensys-navigation.yml | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/.github/workflows/movensys-navigation.yml b/.github/workflows/movensys-navigation.yml index 6295bfd..1634987 100644 --- a/.github/workflows/movensys-navigation.yml +++ b/.github/workflows/movensys-navigation.yml @@ -16,6 +16,8 @@ jobs: os: ubuntu-22.04 runs-on: ${{ matrix.os }} + + container: ros:${{ matrix.ros_distro }}-ros-base env: NAVIGATION_MODEL: diffbot @@ -23,9 +25,6 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - name: Setup ROS ${{ matrix.ros_distro }} - uses: ros-tooling/setup-ros@v0.7 - - name: Setup workspace run: | mkdir -p ~/movensys_ws/src @@ -33,14 +32,8 @@ jobs: - name: Install dependencies run: | - sudo apt-get update - sudo apt-get install -y --no-install-recommends \ - ros-${{ matrix.ros_distro }}-ros-base - # GH ubuntu-22.04 runners pin LLVM's libunwind, blocking the stock - # libunwind-dev that libgoogle-glog-dev (via slam-toolbox) needs. - sudo apt-get install -y libunwind-dev - sudo rosdep init || true - rosdep update + apt-get update + rosdep update --rosdistro ${{ matrix.ros_distro }} cd ~/movensys_ws # This job only compiles (BUILD_TESTING=OFF), so runtime deps such as # navigation2, ros_gz_sim and rviz2 are not needed. From 58f43f4ff788721a06a1c5a7cd2e67d36fadb7fd Mon Sep 17 00:00:00 2001 From: mfikih Date: Wed, 5 Aug 2026 10:43:02 +0900 Subject: [PATCH 18/19] reapair build and test --- .github/workflows/movensys-navigation.yml | 5 +++++ .github/workflows/test-description.yml | 19 ++++++++----------- .github/workflows/test-nav2.yml | 19 ++++++++----------- .github/workflows/test-perception.yml | 19 ++++++++----------- .github/workflows/unit-test.yml | 14 +++----------- 5 files changed, 32 insertions(+), 44 deletions(-) diff --git a/.github/workflows/movensys-navigation.yml b/.github/workflows/movensys-navigation.yml index 1634987..e080a60 100644 --- a/.github/workflows/movensys-navigation.yml +++ b/.github/workflows/movensys-navigation.yml @@ -4,6 +4,11 @@ on: pull_request: branches: [main, devel] +# Container jobs default to sh, which has no `source`. +defaults: + run: + shell: bash + jobs: build-and-test: strategy: diff --git a/.github/workflows/test-description.yml b/.github/workflows/test-description.yml index 5b591c0..c0e248f 100644 --- a/.github/workflows/test-description.yml +++ b/.github/workflows/test-description.yml @@ -6,6 +6,11 @@ on: paths: - 'movensys_navigation_description/**' +# Container jobs default to sh, which has no `source`. +defaults: + run: + shell: bash + jobs: test: strategy: @@ -18,16 +23,12 @@ jobs: os: ubuntu-22.04 runs-on: ${{ matrix.os }} + container: ros:${{ matrix.ros_distro }}-ros-base steps: - name: Checkout uses: actions/checkout@v4 - - name: Setup ROS ${{ matrix.ros_distro }} - uses: ros-tooling/setup-ros@v0.7 - with: - required-ros-distributions: ${{ matrix.ros_distro }} - - name: Setup workspace run: | mkdir -p ~/movensys_ws/src @@ -35,12 +36,8 @@ jobs: - name: Install dependencies run: | - sudo apt-get update - # GH ubuntu-22.04 runners pin LLVM's libunwind, blocking the stock - # libunwind-dev that libgoogle-glog-dev (via slam-toolbox) needs. - sudo apt-get install -y libunwind-dev - sudo rosdep init || true - rosdep update + apt-get update + rosdep update --rosdistro ${{ matrix.ros_distro }} cd ~/movensys_ws rosdep install --from-paths src/movensys-navigation/movensys_navigation_description \ --ignore-src -y --rosdistro ${{ matrix.ros_distro }} diff --git a/.github/workflows/test-nav2.yml b/.github/workflows/test-nav2.yml index 4f3c4e3..49ab5d6 100644 --- a/.github/workflows/test-nav2.yml +++ b/.github/workflows/test-nav2.yml @@ -6,6 +6,11 @@ on: paths: - 'movensys_navigation_nav2_config/**' +# Container jobs default to sh, which has no `source`. +defaults: + run: + shell: bash + jobs: test: strategy: @@ -18,6 +23,7 @@ jobs: os: ubuntu-22.04 runs-on: ${{ matrix.os }} + container: ros:${{ matrix.ros_distro }}-ros-base env: NAVIGATION_MODEL: diffbot @@ -25,9 +31,6 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - name: Setup ROS ${{ matrix.ros_distro }} - uses: ros-tooling/setup-ros@v0.7 - - name: Setup workspace run: | mkdir -p ~/movensys_ws/src @@ -35,14 +38,8 @@ jobs: - name: Install dependencies run: | - sudo apt-get update - sudo apt-get install -y --no-install-recommends \ - ros-${{ matrix.ros_distro }}-ros-base - # GH ubuntu-22.04 runners pin LLVM's libunwind, blocking the stock - # libunwind-dev that libgoogle-glog-dev (via slam-toolbox) needs. - sudo apt-get install -y libunwind-dev - sudo rosdep init || true - rosdep update + apt-get update + rosdep update --rosdistro ${{ matrix.ros_distro }} cd ~/movensys_ws rosdep install --from-paths src --ignore-src -y \ --rosdistro ${{ matrix.ros_distro }} \ diff --git a/.github/workflows/test-perception.yml b/.github/workflows/test-perception.yml index 057d2b2..fc9f887 100644 --- a/.github/workflows/test-perception.yml +++ b/.github/workflows/test-perception.yml @@ -6,6 +6,11 @@ on: paths: - 'movensys_navigation_perception/**' +# Container jobs default to sh, which has no `source`. +defaults: + run: + shell: bash + jobs: test: strategy: @@ -18,14 +23,12 @@ jobs: os: ubuntu-22.04 runs-on: ${{ matrix.os }} + container: ros:${{ matrix.ros_distro }}-ros-base steps: - name: Checkout uses: actions/checkout@v4 - - name: Setup ROS ${{ matrix.ros_distro }} - uses: ros-tooling/setup-ros@v0.7 - - name: Setup workspace run: | mkdir -p ~/movensys_ws/src @@ -33,14 +36,8 @@ jobs: - name: Install dependencies run: | - sudo apt-get update - sudo apt-get install -y --no-install-recommends \ - ros-${{ matrix.ros_distro }}-ros-base - # GH ubuntu-22.04 runners pin LLVM's libunwind, blocking the stock - # libunwind-dev that libgoogle-glog-dev (via slam-toolbox) needs. - sudo apt-get install -y libunwind-dev - sudo rosdep init || true - rosdep update + apt-get update + rosdep update --rosdistro ${{ matrix.ros_distro }} cd ~/movensys_ws rosdep install --from-paths src/movensys-navigation/movensys_navigation_perception \ --ignore-src -y --rosdistro ${{ matrix.ros_distro }} \ diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index d6cb79b..bad6054 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -12,6 +12,7 @@ jobs: test: name: colcon test (${{ matrix.ros_distro }}) runs-on: ${{ matrix.os }} + container: ros:${{ matrix.ros_distro }}-ros-base strategy: fail-fast: false matrix: @@ -25,11 +26,6 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - name: Setup ROS ${{ matrix.ros_distro }} - uses: ros-tooling/setup-ros@v0.7 - with: - required-ros-distributions: ${{ matrix.ros_distro }} - - name: Setup workspace run: | mkdir -p ~/movensys_ws/src @@ -37,12 +33,8 @@ jobs: - name: rosdep install run: | - sudo apt-get update - # GH ubuntu-22.04 runners pin LLVM's libunwind, blocking the stock - # libunwind-dev that libgoogle-glog-dev (via slam-toolbox) needs. - sudo apt-get install -y libunwind-dev - sudo rosdep init || true - rosdep update + apt-get update + rosdep update --rosdistro ${{ matrix.ros_distro }} cd ~/movensys_ws rosdep install --from-paths src --ignore-src -y \ --rosdistro ${{ matrix.ros_distro }} \ From 46d5a58ada683f22e7006eecb23604058497e974 Mon Sep 17 00:00:00 2001 From: mfikih Date: Wed, 5 Aug 2026 10:47:14 +0900 Subject: [PATCH 19/19] revert back --- .github/workflows/movensys-navigation.yml | 20 +++++++++++--------- .github/workflows/test-description.yml | 19 +++++++++++-------- .github/workflows/test-nav2.yml | 19 +++++++++++-------- .github/workflows/test-perception.yml | 19 +++++++++++-------- .github/workflows/unit-test.yml | 14 +++++++++++--- 5 files changed, 55 insertions(+), 36 deletions(-) diff --git a/.github/workflows/movensys-navigation.yml b/.github/workflows/movensys-navigation.yml index e080a60..6295bfd 100644 --- a/.github/workflows/movensys-navigation.yml +++ b/.github/workflows/movensys-navigation.yml @@ -4,11 +4,6 @@ on: pull_request: branches: [main, devel] -# Container jobs default to sh, which has no `source`. -defaults: - run: - shell: bash - jobs: build-and-test: strategy: @@ -21,8 +16,6 @@ jobs: os: ubuntu-22.04 runs-on: ${{ matrix.os }} - - container: ros:${{ matrix.ros_distro }}-ros-base env: NAVIGATION_MODEL: diffbot @@ -30,6 +23,9 @@ jobs: - name: Checkout uses: actions/checkout@v4 + - name: Setup ROS ${{ matrix.ros_distro }} + uses: ros-tooling/setup-ros@v0.7 + - name: Setup workspace run: | mkdir -p ~/movensys_ws/src @@ -37,8 +33,14 @@ jobs: - name: Install dependencies run: | - apt-get update - rosdep update --rosdistro ${{ matrix.ros_distro }} + sudo apt-get update + sudo apt-get install -y --no-install-recommends \ + ros-${{ matrix.ros_distro }}-ros-base + # GH ubuntu-22.04 runners pin LLVM's libunwind, blocking the stock + # libunwind-dev that libgoogle-glog-dev (via slam-toolbox) needs. + sudo apt-get install -y libunwind-dev + sudo rosdep init || true + rosdep update cd ~/movensys_ws # This job only compiles (BUILD_TESTING=OFF), so runtime deps such as # navigation2, ros_gz_sim and rviz2 are not needed. diff --git a/.github/workflows/test-description.yml b/.github/workflows/test-description.yml index c0e248f..5b591c0 100644 --- a/.github/workflows/test-description.yml +++ b/.github/workflows/test-description.yml @@ -6,11 +6,6 @@ on: paths: - 'movensys_navigation_description/**' -# Container jobs default to sh, which has no `source`. -defaults: - run: - shell: bash - jobs: test: strategy: @@ -23,12 +18,16 @@ jobs: os: ubuntu-22.04 runs-on: ${{ matrix.os }} - container: ros:${{ matrix.ros_distro }}-ros-base steps: - name: Checkout uses: actions/checkout@v4 + - name: Setup ROS ${{ matrix.ros_distro }} + uses: ros-tooling/setup-ros@v0.7 + with: + required-ros-distributions: ${{ matrix.ros_distro }} + - name: Setup workspace run: | mkdir -p ~/movensys_ws/src @@ -36,8 +35,12 @@ jobs: - name: Install dependencies run: | - apt-get update - rosdep update --rosdistro ${{ matrix.ros_distro }} + sudo apt-get update + # GH ubuntu-22.04 runners pin LLVM's libunwind, blocking the stock + # libunwind-dev that libgoogle-glog-dev (via slam-toolbox) needs. + sudo apt-get install -y libunwind-dev + sudo rosdep init || true + rosdep update cd ~/movensys_ws rosdep install --from-paths src/movensys-navigation/movensys_navigation_description \ --ignore-src -y --rosdistro ${{ matrix.ros_distro }} diff --git a/.github/workflows/test-nav2.yml b/.github/workflows/test-nav2.yml index 49ab5d6..4f3c4e3 100644 --- a/.github/workflows/test-nav2.yml +++ b/.github/workflows/test-nav2.yml @@ -6,11 +6,6 @@ on: paths: - 'movensys_navigation_nav2_config/**' -# Container jobs default to sh, which has no `source`. -defaults: - run: - shell: bash - jobs: test: strategy: @@ -23,7 +18,6 @@ jobs: os: ubuntu-22.04 runs-on: ${{ matrix.os }} - container: ros:${{ matrix.ros_distro }}-ros-base env: NAVIGATION_MODEL: diffbot @@ -31,6 +25,9 @@ jobs: - name: Checkout uses: actions/checkout@v4 + - name: Setup ROS ${{ matrix.ros_distro }} + uses: ros-tooling/setup-ros@v0.7 + - name: Setup workspace run: | mkdir -p ~/movensys_ws/src @@ -38,8 +35,14 @@ jobs: - name: Install dependencies run: | - apt-get update - rosdep update --rosdistro ${{ matrix.ros_distro }} + sudo apt-get update + sudo apt-get install -y --no-install-recommends \ + ros-${{ matrix.ros_distro }}-ros-base + # GH ubuntu-22.04 runners pin LLVM's libunwind, blocking the stock + # libunwind-dev that libgoogle-glog-dev (via slam-toolbox) needs. + sudo apt-get install -y libunwind-dev + sudo rosdep init || true + rosdep update cd ~/movensys_ws rosdep install --from-paths src --ignore-src -y \ --rosdistro ${{ matrix.ros_distro }} \ diff --git a/.github/workflows/test-perception.yml b/.github/workflows/test-perception.yml index fc9f887..057d2b2 100644 --- a/.github/workflows/test-perception.yml +++ b/.github/workflows/test-perception.yml @@ -6,11 +6,6 @@ on: paths: - 'movensys_navigation_perception/**' -# Container jobs default to sh, which has no `source`. -defaults: - run: - shell: bash - jobs: test: strategy: @@ -23,12 +18,14 @@ jobs: os: ubuntu-22.04 runs-on: ${{ matrix.os }} - container: ros:${{ matrix.ros_distro }}-ros-base steps: - name: Checkout uses: actions/checkout@v4 + - name: Setup ROS ${{ matrix.ros_distro }} + uses: ros-tooling/setup-ros@v0.7 + - name: Setup workspace run: | mkdir -p ~/movensys_ws/src @@ -36,8 +33,14 @@ jobs: - name: Install dependencies run: | - apt-get update - rosdep update --rosdistro ${{ matrix.ros_distro }} + sudo apt-get update + sudo apt-get install -y --no-install-recommends \ + ros-${{ matrix.ros_distro }}-ros-base + # GH ubuntu-22.04 runners pin LLVM's libunwind, blocking the stock + # libunwind-dev that libgoogle-glog-dev (via slam-toolbox) needs. + sudo apt-get install -y libunwind-dev + sudo rosdep init || true + rosdep update cd ~/movensys_ws rosdep install --from-paths src/movensys-navigation/movensys_navigation_perception \ --ignore-src -y --rosdistro ${{ matrix.ros_distro }} \ diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index bad6054..d6cb79b 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -12,7 +12,6 @@ jobs: test: name: colcon test (${{ matrix.ros_distro }}) runs-on: ${{ matrix.os }} - container: ros:${{ matrix.ros_distro }}-ros-base strategy: fail-fast: false matrix: @@ -26,6 +25,11 @@ jobs: - name: Checkout uses: actions/checkout@v4 + - name: Setup ROS ${{ matrix.ros_distro }} + uses: ros-tooling/setup-ros@v0.7 + with: + required-ros-distributions: ${{ matrix.ros_distro }} + - name: Setup workspace run: | mkdir -p ~/movensys_ws/src @@ -33,8 +37,12 @@ jobs: - name: rosdep install run: | - apt-get update - rosdep update --rosdistro ${{ matrix.ros_distro }} + sudo apt-get update + # GH ubuntu-22.04 runners pin LLVM's libunwind, blocking the stock + # libunwind-dev that libgoogle-glog-dev (via slam-toolbox) needs. + sudo apt-get install -y libunwind-dev + sudo rosdep init || true + rosdep update cd ~/movensys_ws rosdep install --from-paths src --ignore-src -y \ --rosdistro ${{ matrix.ros_distro }} \