@@ -82,7 +82,7 @@ struct ControllerPeerInfo
82
82
// interfaces, add it as individual group
83
83
predecessor_group.insert (p->name );
84
84
mutually_exclusive_predecessor_groups.push_back (predecessor_group);
85
- RCLCPP_INFO (
85
+ RCLCPP_DEBUG (
86
86
rclcpp::get_logger (" controller_manager" ),
87
87
" Adding predecessor: '%s' as individual group, as all its command interfaces are in "
88
88
" the current controller's reference interfaces." ,
@@ -165,7 +165,7 @@ struct ControllerPeerInfo
165
165
}
166
166
};
167
167
168
- RCLCPP_INFO (
168
+ RCLCPP_DEBUG (
169
169
rclcpp::get_logger (" controller_manager" ),
170
170
" Generating combinations of predecessors for controller: %s (%s)" ,
171
171
predecessor->name .c_str (), name.c_str ());
@@ -174,10 +174,10 @@ struct ControllerPeerInfo
174
174
for (const auto & combination : combinations)
175
175
{
176
176
std::unordered_set<std::string> group (combination.begin (), combination.end ());
177
- RCLCPP_INFO (
177
+ RCLCPP_DEBUG (
178
178
rclcpp::get_logger (" controller_manager" ),
179
179
fmt::format (
180
- " Adding predecessor group: {} with size: {}" , fmt::join (combination, " , " ),
180
+ " Adding predecessor group: [{}] with size: {}" , fmt::join (combination, " , " ),
181
181
combination.size ())
182
182
.c_str ());
183
183
if (!group.empty ())
@@ -220,7 +220,7 @@ struct ControllerPeerInfo
220
220
// interfaces, add it as individual group
221
221
successor_group.insert (s->name );
222
222
mutually_exclusive_successor_groups.push_back (successor_group);
223
- RCLCPP_INFO (
223
+ RCLCPP_DEBUG (
224
224
rclcpp::get_logger (" controller_manager" ),
225
225
" Adding successor: '%s' as individual group, as all its command interfaces are in the "
226
226
" current controller's reference interfaces." ,
@@ -294,26 +294,26 @@ struct ControllerPeerInfo
294
294
current_combination.pop_back ();
295
295
}
296
296
};
297
- RCLCPP_INFO (
297
+ RCLCPP_DEBUG (
298
298
rclcpp::get_logger (" controller_manager" ),
299
299
" Generating combinations of successors for controller: %s" , name.c_str ());
300
300
generate_combinations (0 );
301
301
// Add the combinations to the mutually exclusive successor groups
302
302
for (const auto & combination : combinations)
303
303
{
304
304
std::unordered_set<std::string> group (combination.begin (), combination.end ());
305
- RCLCPP_INFO (
305
+ RCLCPP_DEBUG (
306
306
rclcpp::get_logger (" controller_manager" ),
307
307
fmt::format (
308
- " Adding successor group: {} with size: {}" , fmt::join (combination, " , " ),
308
+ " Adding successor group: [{}] with size: {}" , fmt::join (combination, " , " ),
309
309
combination.size ())
310
310
.c_str ());
311
311
if (!group.empty ())
312
312
{
313
313
mutually_exclusive_successor_groups.push_back (group);
314
314
}
315
315
}
316
- RCLCPP_INFO (
316
+ RCLCPP_DEBUG (
317
317
rclcpp::get_logger (" controller_manager" ),
318
318
" Mutually exclusive successor groups for controller: '%s' are: %zu" , name.c_str (),
319
319
mutually_exclusive_successor_groups.size ());
@@ -334,7 +334,7 @@ struct ControllerPeerInfo
334
334
{
335
335
if (ros2_control::has_item (controllers_to_activate, predecessor->name ))
336
336
{
337
- RCLCPP_INFO (
337
+ RCLCPP_DEBUG (
338
338
rclcpp::get_logger (" controller_manager" ),
339
339
" The predecessor: '%s' is already in the active list." , predecessor->name .c_str ());
340
340
ros2_control::add_item (predecessor_in_active_list, predecessor->name );
@@ -354,19 +354,19 @@ struct ControllerPeerInfo
354
354
}
355
355
});
356
356
357
- RCLCPP_INFO (
357
+ RCLCPP_DEBUG (
358
358
rclcpp::get_logger (" controller_manager" ),
359
359
" The predecessor command interfaces of the predecessor: '%s' are: %zu" , name.c_str (),
360
360
predecessor_command_interfaces_set.size ());
361
- RCLCPP_INFO (
361
+ RCLCPP_DEBUG (
362
362
rclcpp::get_logger (" controller_manager" ),
363
363
" The reference interfaces of the controller: '%s' are: %zu" , name.c_str (),
364
364
reference_interfaces.size ());
365
365
if (
366
366
!predecessor_in_active_list.empty () &&
367
367
(predecessor_command_interfaces_set.size () != reference_interfaces.size ()))
368
368
{
369
- RCLCPP_INFO (
369
+ RCLCPP_DEBUG (
370
370
rclcpp::get_logger (" controller_manager" ),
371
371
" The predecessor command interfaces of the predecessor: '%s' are not equal to the "
372
372
" reference interfaces of the controller: '%s' : %zu != %zu" ,
@@ -405,21 +405,21 @@ struct ControllerPeerInfo
405
405
// check if all the successors reference interfaces are in the current controller's command
406
406
// interfaces If they are, add them to the list of controllers to activate
407
407
408
- RCLCPP_INFO (
408
+ RCLCPP_DEBUG (
409
409
rclcpp::get_logger (" controller_manager" ),
410
410
" The command interfaces of the predecessor: '%s' are: %zu" , name.c_str (),
411
411
command_interfaces_set.size ());
412
412
for (const auto & command_itf : command_interfaces_set)
413
413
{
414
- RCLCPP_INFO (
414
+ RCLCPP_DEBUG (
415
415
rclcpp::get_logger (" controller_manager" ),
416
416
" The command interfaces of the predecessor: '%s' are: %s" , name.c_str (),
417
417
command_itf.c_str ());
418
418
}
419
419
420
420
for (const auto & reference_itf : successor->reference_interfaces )
421
421
{
422
- RCLCPP_INFO (
422
+ RCLCPP_DEBUG (
423
423
rclcpp::get_logger (" controller_manager" ),
424
424
" The reference interfaces of the successor: '%s' are: %s" , successor->name .c_str (),
425
425
reference_itf.c_str ());
@@ -437,7 +437,7 @@ struct ControllerPeerInfo
437
437
all_successor_interfaces_match = true ;
438
438
}
439
439
});
440
- RCLCPP_INFO (
440
+ RCLCPP_DEBUG (
441
441
rclcpp::get_logger (" controller_manager" ),
442
442
" The reference interfaces of the successor: '%s' are within the command interfaces of the "
443
443
" predecessor: '%s' : %s" ,
@@ -450,7 +450,7 @@ struct ControllerPeerInfo
450
450
}
451
451
else
452
452
{
453
- RCLCPP_INFO (
453
+ RCLCPP_WARN (
454
454
rclcpp::get_logger (" controller_manager" ),
455
455
" Controller %s has a successor %s who has more reference interfaces that use different "
456
456
" controllers. This is not supported now." ,
@@ -466,7 +466,7 @@ struct ControllerPeerInfo
466
466
{
467
467
if (ros2_control::has_item (controllers_to_deactivate, predecessor->name ))
468
468
{
469
- RCLCPP_INFO (
469
+ RCLCPP_DEBUG (
470
470
rclcpp::get_logger (" controller_manager" ),
471
471
" The predecessor: '%s' is already in the deactivation list." , predecessor->name .c_str ());
472
472
continue ;
@@ -489,12 +489,12 @@ struct ControllerPeerInfo
489
489
{
490
490
if (ros2_control::has_item (controllers_to_deactivate, successor->name ))
491
491
{
492
- RCLCPP_INFO (
492
+ RCLCPP_DEBUG (
493
493
rclcpp::get_logger (" controller_manager" ),
494
494
" The successor: '%s' is already in the deactivation list." , successor->name .c_str ());
495
495
continue ;
496
496
}
497
- RCLCPP_INFO (
497
+ RCLCPP_DEBUG (
498
498
rclcpp::get_logger (" controller_manager" ),
499
499
fmt::format (
500
500
" The controllers to deactivate list is {}" , fmt::join (controllers_to_deactivate, " , " ))
@@ -506,7 +506,7 @@ struct ControllerPeerInfo
506
506
[&successor](const std::unordered_set<std::string> & group)
507
507
{ return group.find (successor->name ) != group.end () && group.size () == 1 ; }))
508
508
{
509
- RCLCPP_INFO (
509
+ RCLCPP_DEBUG (
510
510
rclcpp::get_logger (" controller_manager" ),
511
511
" The successor: '%s' is in a mutually exclusive group, skipping further deactivation." ,
512
512
successor->name .c_str ());
@@ -516,18 +516,11 @@ struct ControllerPeerInfo
516
516
if (successor->command_interfaces .empty ())
517
517
{
518
518
ros2_control::add_item (controllers_to_deactivate, successor->name );
519
- RCLCPP_INFO (
519
+ RCLCPP_DEBUG (
520
520
rclcpp::get_logger (" controller_manager" ),
521
521
" Adding successor: '%s' to the deactivation list, as it has no command interfaces." ,
522
522
successor->name .c_str ());
523
523
}
524
- else
525
- {
526
- RCLCPP_INFO (
527
- rclcpp::get_logger (" controller_manager" ),
528
- " Controller %s has a successor %s who has command interfaces. This is not supported now." ,
529
- name.c_str (), successor->name .c_str ());
530
- }
531
524
successor->get_controllers_to_deactivate (controllers_to_deactivate);
532
525
}
533
526
}
@@ -596,7 +589,7 @@ class ControllerChainDependencyGraph
596
589
597
590
std::vector<std::string> get_dependencies_to_activate (const std::string & controller_name)
598
591
{
599
- RCLCPP_INFO (
592
+ RCLCPP_DEBUG (
600
593
rclcpp::get_logger (" controller_manager" ),
601
594
" +++++++++++++++++++++++++++++++ Getting dependencies to ACTIVATE "
602
595
" +++++++++++++++++++++++++++++++" );
@@ -613,7 +606,7 @@ class ControllerChainDependencyGraph
613
606
614
607
std::vector<std::string> get_dependencies_to_deactivate (const std::string & controller_name)
615
608
{
616
- RCLCPP_INFO (
609
+ RCLCPP_DEBUG (
617
610
rclcpp::get_logger (" controller_manager" ),
618
611
" +++++++++++++++++++++++++++++++ Getting dependencies to DEACTIVATE "
619
612
" +++++++++++++++++++++++++++++++" );
0 commit comments