Skip to content

Commit

Permalink
Add on_exit flag.
Browse files Browse the repository at this point in the history
  • Loading branch information
maxpolzin committed Nov 29, 2023
1 parent 0d2b93f commit a6238ed
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions ros_as5048b/launch/ros_as5048b.launch.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from launch import LaunchDescription
from launch.actions import DeclareLaunchArgument
from launch.actions import DeclareLaunchArgument, Shutdown
from launch.substitutions import LaunchConfiguration
from launch_ros.actions import Node

Expand All @@ -21,7 +21,8 @@ def generate_launch_description():
parameters=[
{'i2c_device': LaunchConfiguration('i2c_device')},
{'i2c_address': LaunchConfiguration('i2c_address')},
]
],
on_exit=Shutdown()
)

turn_counter_node = Node(
Expand All @@ -31,7 +32,8 @@ def generate_launch_description():
parameters=[
{'file_path': LaunchConfiguration('turn_count_file')},
{'encoder_topic': LaunchConfiguration('encoder_topic')},
]
],
on_exit=Shutdown()
)

nodes = [
Expand Down

0 comments on commit a6238ed

Please sign in to comment.