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

Dynamically load controllers #23

Conversation

@velveteenrobot
Copy link
Contributor

@velveteenrobot velveteenrobot commented Jun 22, 2016

When a requested controller is not in the list of default controllers, the controller manager will check for the controller on the parameter server. The controller loader now also catches pluginlib exceptions from trying to load a bad controller instead of crashing the controller manager.

trying_to_load_bad_controller

@@ -254,7 +254,7 @@ void ControllerManager::execute(const robot_controllers_msgs::QueryControllerSta
robot_controllers_msgs::ControllerState state = goal->updates[i];

// Make sure controller exists
bool exists = false;
bool in_default_controllers = false;

This comment has been minimized.

@mikeferguson

mikeferguson Jun 22, 2016
Contributor

we can probably leave this as "exists" or "in_controller_list" -- technically, once you load your new controller, the "controllers_" list actually consists not just of the default controllers, but also of everything you have loaded since startup

{
controller_ = plugin_loader_.createInstance(controller_type);
controller_->init(nh, manager);
}catch( pluginlib::LibraryLoadException e)

This comment has been minimized.

@mikeferguson

mikeferguson Jun 22, 2016
Contributor

we follow the ROS style guide -- "catch (pluginlib::LibraryLoadException e)" should be on it's own line and should have spacing as noted in this comment

@velveteenrobot
Copy link
Contributor Author

@velveteenrobot velveteenrobot commented Jun 23, 2016

Okay probably better now. I hope.

@mikeferguson mikeferguson merged commit 358174e into fetchrobotics:indigo-devel Jun 24, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.