Skip to content

Commit a676d3c

Browse files
[CLI] Fix wrong output of controller states for load_controller command (#947)
1 parent 3a09fb3 commit a676d3c

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

ros2controlcli/doc/userdoc.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ load_controller
157157
-h, --help show this help message and exit
158158
--spin-time SPIN_TIME
159159
Spin time in seconds to wait for discovery (only applies when not using an already running daemon)
160-
--set_state {configured,active}
160+
--set_state {inactive,active}
161161
Set the state of the loaded controller
162162
-c CONTROLLER_MANAGER, --controller-manager CONTROLLER_MANAGER
163163
Name of the controller manager ROS node

ros2controlcli/ros2controlcli/verb/load_controller.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def add_arguments(self, parser, cli_name):
3030
arg.completer = ControllerNameCompleter()
3131
arg = parser.add_argument(
3232
"--set-state",
33-
choices=["configured", "active"],
33+
choices=["inactive", "active"],
3434
help="Set the state of the loaded controller",
3535
)
3636
add_controller_mgr_parsers(parser)
@@ -64,6 +64,6 @@ def main(self, *, args):
6464

6565
print(
6666
f"Successfully loaded controller {args.controller_name} into "
67-
f'state { "inactive" if args.set_state == "configure" else "active" }'
67+
f'state { "inactive" if args.set_state == "inactive" else "active" }'
6868
)
6969
return 0

ros2controlcli/ros2controlcli/verb/set_controller_state.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def main(self, *, args):
7474
if not response.ok:
7575
return "Error configuring controller, check controller_manager logs"
7676

77-
print(f"successfully configured {args.controller_name}")
77+
print(f"Successfully configured {args.controller_name}")
7878
return 0
7979

8080
elif matched_controller.state == "active":
@@ -84,7 +84,7 @@ def main(self, *, args):
8484
if not response.ok:
8585
return "Error stopping controller, check controller_manager logs"
8686

87-
print(f"successfully deactivated {args.controller_name}")
87+
print(f"Successfully deactivated {args.controller_name}")
8888
return 0
8989

9090
else:
@@ -109,5 +109,5 @@ def main(self, *, args):
109109
if not response.ok:
110110
return "Error activating controller, check controller_manager logs"
111111

112-
print(f"successfully activated {args.controller_name}")
112+
print(f"Successfully activated {args.controller_name}")
113113
return 0

0 commit comments

Comments
 (0)