Skip to content

Commit

Permalink
Also handle "stopped" arg
Browse files Browse the repository at this point in the history
Co-authored-by: Sai Kishor Kothakota <sai.kishor@pal-robotics.com>
  • Loading branch information
bmagyar and saikishor authored Nov 3, 2023
1 parent b61600f commit 7da8e89
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions controller_manager/controller_manager/spawner.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ def main(args=None):
+ bcolors.ENDC
)

if not args.inactive and args.activate_as_group:
if not args.stopped and not args.inactive and args.activate_as_group:
ret = switch_controllers(
node, controller_manager_name, [], controller_names, True, True, 5.0
)
Expand All @@ -325,6 +325,8 @@ def main(args=None):
+ "Configured and activated all the parsed controllers list!"
+ bcolors.ENDC
)
if args.stopped:
node.get_logger().warn('"--stopped" flag is deprecated use "--inactive" instead')

if not args.unload_on_kill:
return 0
Expand All @@ -334,7 +336,7 @@ def main(args=None):
while True:
time.sleep(1)
except KeyboardInterrupt:
if not args.inactive:
if not args.stopped and not args.inactive:
node.get_logger().info("Interrupt captured, deactivating and unloading controller")
# TODO(saikishor) we might have an issue in future, if any of these controllers is in chained mode
ret = switch_controllers(
Expand Down

0 comments on commit 7da8e89

Please sign in to comment.