Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
pr2_controller_manager::ControllerManager Class Reference

#include <controller_manager.h>

Inheritance diagram for pr2_controller_manager::ControllerManager:
Inheritance graph
[legend]

Public Member Functions

 ControllerManager (pr2_hardware_interface::HardwareInterface *hw, const ros::NodeHandle &nh=ros::NodeHandle())
 
virtual pr2_controller_interface::ControllergetControllerByName (const std::string &name)
 
bool initXml (TiXmlElement *config)
 
bool loadController (const std::string &name)
 
bool switchController (const std::vector< std::string > &start_controllers, const std::vector< std::string > &stop_controllers, const int strictness)
 
bool unloadController (const std::string &name)
 
void update ()
 
virtual ~ControllerManager ()
 
- Public Member Functions inherited from pr2_controller_interface::ControllerProvider
 ControllerProvider ()
 
bool getControllerByName (const std::string &name, ControllerType *&c)
 
virtual ~ControllerProvider ()
 

Public Attributes

pr2_mechanism_model::Robot model_
 
pr2_mechanism_model::RobotStatestate_
 

Private Member Functions

void getControllerNames (std::vector< std::string > &v)
 
void getControllerSchedule (std::vector< size_t > &schedule)
 
bool listControllersSrv (pr2_mechanism_msgs::ListControllers::Request &req, pr2_mechanism_msgs::ListControllers::Response &resp)
 
bool listControllerTypesSrv (pr2_mechanism_msgs::ListControllerTypes::Request &req, pr2_mechanism_msgs::ListControllerTypes::Response &resp)
 
bool loadControllerSrv (pr2_mechanism_msgs::LoadController::Request &req, pr2_mechanism_msgs::LoadController::Response &resp)
 
void publishJointState ()
 
void publishMechanismStatistics ()
 
bool reloadControllerLibrariesSrv (pr2_mechanism_msgs::ReloadControllerLibraries::Request &req, pr2_mechanism_msgs::ReloadControllerLibraries::Response &resp)
 
bool switchControllerSrv (pr2_mechanism_msgs::SwitchController::Request &req, pr2_mechanism_msgs::SwitchController::Response &resp)
 
bool unloadControllerSrv (pr2_mechanism_msgs::UnloadController::Request &req, pr2_mechanism_msgs::UnloadController::Response &resp)
 

Private Attributes

ros::NodeHandle cm_node_
 
boost::shared_ptr< pluginlib::ClassLoader< pr2_controller_interface::Controller > > controller_loader_
 
ros::NodeHandle controller_node_
 
std::vector< ControllerSpeccontrollers_lists_ [2]
 
boost::mutex controllers_lock_
 
std::vector< size_t > controllers_scheduling_ [2]
 
int current_controllers_list_
 
ros::Time last_published_joint_state_
 
ros::Time last_published_mechanism_stats_
 
bool motors_previously_halted_
 
bool please_switch_
 
Statistics post_update_stats_
 
Statistics pre_update_stats_
 
realtime_tools::RealtimePublisher< sensor_msgs::JointState > pub_joint_state_
 
realtime_tools::RealtimePublisher< pr2_mechanism_msgs::MechanismStatistics > pub_mech_stats_
 
ros::Duration publish_period_joint_state_
 
ros::Duration publish_period_mechanism_stats_
 
boost::mutex services_lock_
 
ros::ServiceServer srv_list_controller_types_
 
ros::ServiceServer srv_list_controllers_
 
ros::ServiceServer srv_load_controller_
 
ros::ServiceServer srv_reload_libraries_
 
ros::ServiceServer srv_switch_controller_
 
ros::ServiceServer srv_unload_controller_
 
std::vector< pr2_controller_interface::Controller * > start_request_
 
std::vector< pr2_controller_interface::Controller * > stop_request_
 
int switch_strictness_
 
Statistics update_stats_
 
int used_by_realtime_
 

Detailed Description

Definition at line 60 of file controller_manager.h.

Constructor & Destructor Documentation

ControllerManager::ControllerManager ( pr2_hardware_interface::HardwareInterface hw,
const ros::NodeHandle nh = ros::NodeHandle() 
)

Definition at line 47 of file controller_manager.cpp.

ControllerManager::~ControllerManager ( )
virtual

Definition at line 63 of file controller_manager.cpp.

Member Function Documentation

pr2_controller_interface::Controller * ControllerManager::getControllerByName ( const std::string &  name)
virtual
void ControllerManager::getControllerNames ( std::vector< std::string > &  v)
private

Definition at line 202 of file controller_manager.cpp.

void ControllerManager::getControllerSchedule ( std::vector< size_t > &  schedule)
private

Definition at line 212 of file controller_manager.cpp.

bool ControllerManager::initXml ( TiXmlElement *  config)

Definition at line 70 of file controller_manager.cpp.

bool ControllerManager::listControllersSrv ( pr2_mechanism_msgs::ListControllers::Request &  req,
pr2_mechanism_msgs::ListControllers::Response &  resp 
)
private

Definition at line 751 of file controller_manager.cpp.

bool ControllerManager::listControllerTypesSrv ( pr2_mechanism_msgs::ListControllerTypes::Request &  req,
pr2_mechanism_msgs::ListControllerTypes::Response &  resp 
)
private

Definition at line 732 of file controller_manager.cpp.

bool ControllerManager::loadController ( const std::string &  name)

Definition at line 219 of file controller_manager.cpp.

bool ControllerManager::loadControllerSrv ( pr2_mechanism_msgs::LoadController::Request &  req,
pr2_mechanism_msgs::LoadController::Response &  resp 
)
private

Definition at line 788 of file controller_manager.cpp.

void ControllerManager::publishJointState ( )
private

Definition at line 553 of file controller_manager.cpp.

void ControllerManager::publishMechanismStatistics ( )
private

Definition at line 589 of file controller_manager.cpp.

bool ControllerManager::reloadControllerLibrariesSrv ( pr2_mechanism_msgs::ReloadControllerLibraries::Request &  req,
pr2_mechanism_msgs::ReloadControllerLibraries::Response &  resp 
)
private

Definition at line 682 of file controller_manager.cpp.

bool ControllerManager::switchController ( const std::vector< std::string > &  start_controllers,
const std::vector< std::string > &  stop_controllers,
const int  strictness 
)

Definition at line 466 of file controller_manager.cpp.

bool ControllerManager::switchControllerSrv ( pr2_mechanism_msgs::SwitchController::Request &  req,
pr2_mechanism_msgs::SwitchController::Response &  resp 
)
private

Definition at line 820 of file controller_manager.cpp.

bool ControllerManager::unloadController ( const std::string &  name)

Definition at line 368 of file controller_manager.cpp.

bool ControllerManager::unloadControllerSrv ( pr2_mechanism_msgs::UnloadController::Request &  req,
pr2_mechanism_msgs::UnloadController::Response &  resp 
)
private

Definition at line 804 of file controller_manager.cpp.

void ControllerManager::update ( void  )

Definition at line 126 of file controller_manager.cpp.

Member Data Documentation

ros::NodeHandle pr2_controller_manager::ControllerManager::cm_node_
private

Definition at line 88 of file controller_manager.h.

boost::shared_ptr<pluginlib::ClassLoader<pr2_controller_interface::Controller> > pr2_controller_manager::ControllerManager::controller_loader_
private

Definition at line 89 of file controller_manager.h.

ros::NodeHandle pr2_controller_manager::ControllerManager::controller_node_
private

Definition at line 88 of file controller_manager.h.

std::vector<ControllerSpec> pr2_controller_manager::ControllerManager::controllers_lists_[2]
private

Definition at line 98 of file controller_manager.h.

boost::mutex pr2_controller_manager::ControllerManager::controllers_lock_
private

Definition at line 97 of file controller_manager.h.

std::vector<size_t> pr2_controller_manager::ControllerManager::controllers_scheduling_[2]
private

Definition at line 99 of file controller_manager.h.

int pr2_controller_manager::ControllerManager::current_controllers_list_
private

Definition at line 100 of file controller_manager.h.

ros::Time pr2_controller_manager::ControllerManager::last_published_joint_state_
private

Definition at line 113 of file controller_manager.h.

ros::Time pr2_controller_manager::ControllerManager::last_published_mechanism_stats_
private

Definition at line 113 of file controller_manager.h.

pr2_mechanism_model::Robot pr2_controller_manager::ControllerManager::model_

Definition at line 81 of file controller_manager.h.

bool pr2_controller_manager::ControllerManager::motors_previously_halted_
private

Definition at line 131 of file controller_manager.h.

bool pr2_controller_manager::ControllerManager::please_switch_
private

Definition at line 93 of file controller_manager.h.

Statistics pr2_controller_manager::ControllerManager::post_update_stats_
private

Definition at line 105 of file controller_manager.h.

Statistics pr2_controller_manager::ControllerManager::pre_update_stats_
private

Definition at line 103 of file controller_manager.h.

realtime_tools::RealtimePublisher<sensor_msgs::JointState> pr2_controller_manager::ControllerManager::pub_joint_state_
private

Definition at line 110 of file controller_manager.h.

realtime_tools::RealtimePublisher<pr2_mechanism_msgs::MechanismStatistics> pr2_controller_manager::ControllerManager::pub_mech_stats_
private

Definition at line 111 of file controller_manager.h.

ros::Duration pr2_controller_manager::ControllerManager::publish_period_joint_state_
private

Definition at line 112 of file controller_manager.h.

ros::Duration pr2_controller_manager::ControllerManager::publish_period_mechanism_stats_
private

Definition at line 112 of file controller_manager.h.

boost::mutex pr2_controller_manager::ControllerManager::services_lock_
private

Definition at line 128 of file controller_manager.h.

ros::ServiceServer pr2_controller_manager::ControllerManager::srv_list_controller_types_
private

Definition at line 129 of file controller_manager.h.

ros::ServiceServer pr2_controller_manager::ControllerManager::srv_list_controllers_
private

Definition at line 129 of file controller_manager.h.

ros::ServiceServer pr2_controller_manager::ControllerManager::srv_load_controller_
private

Definition at line 129 of file controller_manager.h.

ros::ServiceServer pr2_controller_manager::ControllerManager::srv_reload_libraries_
private

Definition at line 130 of file controller_manager.h.

ros::ServiceServer pr2_controller_manager::ControllerManager::srv_switch_controller_
private

Definition at line 130 of file controller_manager.h.

ros::ServiceServer pr2_controller_manager::ControllerManager::srv_unload_controller_
private

Definition at line 130 of file controller_manager.h.

std::vector<pr2_controller_interface::Controller*> pr2_controller_manager::ControllerManager::start_request_
private

Definition at line 92 of file controller_manager.h.

pr2_mechanism_model::RobotState* pr2_controller_manager::ControllerManager::state_

Definition at line 82 of file controller_manager.h.

std::vector<pr2_controller_interface::Controller*> pr2_controller_manager::ControllerManager::stop_request_
private

Definition at line 92 of file controller_manager.h.

int pr2_controller_manager::ControllerManager::switch_strictness_
private

Definition at line 94 of file controller_manager.h.

Statistics pr2_controller_manager::ControllerManager::update_stats_
private

Definition at line 104 of file controller_manager.h.

int pr2_controller_manager::ControllerManager::used_by_realtime_
private

Definition at line 100 of file controller_manager.h.


The documentation for this class was generated from the following files:


pr2_controller_manager
Author(s): Eric Berger berger@willowgarage.com, Stuart Glaser, Wim Meeussen
autogenerated on Fri Jun 7 2019 22:04:28