Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suspicious use of ros::Ok() #328

Open
ledvinap opened this issue Jul 5, 2015 · 1 comment
Open

Suspicious use of ros::Ok() #328

ledvinap opened this issue Jul 5, 2015 · 1 comment

Comments

@ledvinap
Copy link

ledvinap commented Jul 5, 2015

No description provided.

@ledvinap
Copy link
Author

ledvinap commented Jul 5, 2015

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant