|
19 | 19 | from controller_manager import ( |
20 | 20 | list_hardware_components, |
21 | 21 | set_hardware_component_state, |
22 | | - bcolors, |
23 | 22 | ) |
24 | | -from controller_manager.controller_manager_services import ServiceNotFoundError |
| 23 | +from controller_manager.controller_manager_services import ServiceNotFoundError, bcolors |
25 | 24 |
|
26 | 25 | from lifecycle_msgs.msg import State |
27 | 26 | import rclpy |
@@ -93,7 +92,11 @@ def configure_component(node, controller_manager_name, component_to_configure): |
93 | 92 | inactive_state.id = State.PRIMARY_STATE_INACTIVE |
94 | 93 | inactive_state.label = "inactive" |
95 | 94 | handle_set_component_state_service_call( |
96 | | - node, controller_manager_name, component_to_configure, inactive_state, "configured" |
| 95 | + node, |
| 96 | + controller_manager_name, |
| 97 | + component_to_configure, |
| 98 | + inactive_state, |
| 99 | + "configured", |
97 | 100 | ) |
98 | 101 |
|
99 | 102 |
|
@@ -154,7 +157,10 @@ def main(args=None): |
154 | 157 | try: |
155 | 158 | for hardware_component in hardware_components: |
156 | 159 | if not is_hardware_component_loaded( |
157 | | - node, controller_manager_name, hardware_component, controller_manager_timeout |
| 160 | + node, |
| 161 | + controller_manager_name, |
| 162 | + hardware_component, |
| 163 | + controller_manager_timeout, |
158 | 164 | ): |
159 | 165 | node.get_logger().warning( |
160 | 166 | f"{bcolors.WARNING}Hardware Component is not loaded - state can not be changed.{bcolors.ENDC}" |
|
0 commit comments