Open ledvinap opened 9 years ago
https://github.com/PR2/pr2_mechanism/blob/hydro-devel/pr2_controller_manager/src/controller_manager.cpp#L228 and later
this idiom is used:
while (ros::ok() && free_controllers_list == used_by_realtime_){ if (!ros::ok()) return false; usleep(200); }
IMO this does not make sense - the ros:ok() test should be done after the while loop, not inside
Also at https://github.com/PR2/pr2_mechanism/blob/hydro-devel/pr2_controller_manager/src/controller_manager.cpp#L345 pub_mech_stats_ is locked, but unlock may be skipped by if (!ros::ok()) return false; (but that is probably OK)
pub_mech_stats_
if (!ros::ok()) return false;
https://github.com/PR2/pr2_mechanism/blob/hydro-devel/pr2_controller_manager/src/controller_manager.cpp#L228 and later
this idiom is used:
IMO this does not make sense - the ros:ok() test should be done after the while loop, not inside
Also at https://github.com/PR2/pr2_mechanism/blob/hydro-devel/pr2_controller_manager/src/controller_manager.cpp#L345
pub_mech_stats_
is locked, but unlock may be skipped byif (!ros::ok()) return false;
(but that is probably OK)