Skip to content

Commit

Permalink
Add the documentation of what takes precedence and some pre-comitting…
Browse files Browse the repository at this point in the history
… changes
  • Loading branch information
saikishor committed Apr 27, 2024
1 parent e088464 commit 4e69835
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
10 changes: 4 additions & 6 deletions controller_manager/controller_manager/spawner.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,8 @@ def main(args=None):
parser.add_argument(
"--fallback_controllers",
help="Fallback controllers list are activated as a fallback strategy when the"
" spawned controllers fails",
" spawned controllers fails. When the argument is provided, it takes precedence over"
" the fallback_controllers list in the param file",
default=None,
nargs="+",
)
Expand Down Expand Up @@ -324,9 +325,6 @@ def main(args=None):
parameter.name = prefixed_controller_name + ".fallback_controllers"
parameter.value = get_parameter_value(string_value=str(fallback_controllers))

#parameter.value.type = ParameterType.PARAMETER_STRING_ARRAY
#parameter.value.string_array_value = fallback_controllers

response = call_set_parameters(
node=node, node_name=controller_manager_name, parameters=[parameter]
)
Expand All @@ -336,7 +334,7 @@ def main(args=None):
node.get_logger().info(
bcolors.OKCYAN
+ 'Setting fallback_controllers to ["'
+ ','.join(fallback_controllers)
+ ",".join(fallback_controllers)
+ '"] for '
+ bcolors.BOLD
+ prefixed_controller_name
Expand All @@ -346,7 +344,7 @@ def main(args=None):
node.get_logger().fatal(
bcolors.FAIL
+ 'Could not set fallback_controllers to ["'
+ ','.join(fallback_controllers)
+ ",".join(fallback_controllers)
+ '"] for '
+ bcolors.BOLD
+ prefixed_controller_name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ ctrl_2:
ctrl_3:
ros__parameters:
joint_names: ["joint3"]
fallback_controllers: ["ctrl_9"]
fallback_controllers: ["ctrl_9"]

0 comments on commit 4e69835

Please sign in to comment.