Skip to content

Commit

Permalink
Address code cov loss due to unclean shutdown (issue ros-navigation#3271
Browse files Browse the repository at this point in the history
) (ros-navigation#3377)

* Ensure that we break bonds in lifecycle node/manager prior to rcl_shutdown.

Partial fix for Issue ros-navigation#3271

Signed-off-by: mbryan <matthew.bryan@dell.com>

* Add unit tests for lifecycle_node rcl shutdown cb.

For Issue ros-navigation#3271.

Signed-off-by: mbryan <matthew.bryan@dell.com>

* Ensure planner_server shuts down cleanly on SIGINT.

Needed to ensure code coverage flushes. See Issue ros-navigation#3271.

Signed-off-by: mbryan <matthew.bryan@dell.com>

* Ensure costmap_2d_cloud does not seg fault on SIGINT.

One of several clean shutdown issues being address via Issue ros-navigation#3271.

Signed-off-by: mbryan <matthew.bryan@dell.com>

* Fix flake8 issues in some test files

Signed-off-by: mbryan <matthew.bryan@dell.com>

---------

Signed-off-by: mbryan <matthew.bryan@dell.com>
Co-authored-by: mbryan <matthew.bryan@dell.com>
  • Loading branch information
mmattb and mbryan authored Feb 1, 2023
1 parent f384243 commit 3253414
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions nav2_bringup/launch/localization_launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def generate_launch_description():
load_nodes = GroupAction(
condition=IfCondition(PythonExpression(['not ', use_composition])),
actions=[
SetParameter("use_sim_time", use_sim_time),
SetParameter('use_sim_time', use_sim_time),
Node(
condition=LaunchConfigurationEquals('map', ''),
package='nav2_map_server',
Expand Down Expand Up @@ -165,7 +165,7 @@ def generate_launch_description():
load_composable_nodes = GroupAction(
condition=IfCondition(use_composition),
actions=[
SetParameter("use_sim_time", use_sim_time),
SetParameter('use_sim_time', use_sim_time),
LoadComposableNodes(
target_container=container_name_full,
condition=LaunchConfigurationEquals('map', ''),
Expand Down
4 changes: 2 additions & 2 deletions nav2_bringup/launch/navigation_launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def generate_launch_description():
load_nodes = GroupAction(
condition=IfCondition(PythonExpression(['not ', use_composition])),
actions=[
SetParameter("use_sim_time", use_sim_time),
SetParameter('use_sim_time', use_sim_time),
Node(
package='nav2_controller',
executable='controller_server',
Expand Down Expand Up @@ -193,7 +193,7 @@ def generate_launch_description():
load_composable_nodes = GroupAction(
condition=IfCondition(use_composition),
actions=[
SetParameter("use_sim_time", use_sim_time),
SetParameter('use_sim_time', use_sim_time),
LoadComposableNodes(
target_container=container_name_full,
composable_node_descriptions=[
Expand Down
4 changes: 2 additions & 2 deletions nav2_bringup/launch/slam_launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from ament_index_python.packages import get_package_share_directory

from launch import LaunchDescription
from launch.actions import DeclareLaunchArgument, IncludeLaunchDescription, GroupAction
from launch.actions import DeclareLaunchArgument, GroupAction, IncludeLaunchDescription
from launch.conditions import IfCondition, UnlessCondition
from launch.launch_description_sources import PythonLaunchDescriptionSource
from launch.substitutions import LaunchConfiguration
Expand Down Expand Up @@ -81,7 +81,7 @@ def generate_launch_description():

start_map_server = GroupAction(
actions=[
SetParameter("use_sim_time", use_sim_time),
SetParameter('use_sim_time', use_sim_time),
Node(
package='nav2_map_server',
executable='map_saver_server',
Expand Down

0 comments on commit 3253414

Please sign in to comment.