32 #ifndef CONTROLLER_INTERFACE_CONTROLLER_H 33 #define CONTROLLER_INTERFACE_CONTROLLER_H 105 ROS_ERROR(
"Cannot initialize this controller because it failed to be constructed");
110 T* hw = robot_hw->
get<T>();
113 ROS_ERROR(
"This controller requires a hardware interface of type '%s'." 114 " Make sure this is registered in the hardware_interface::RobotHW class.",
121 if (!
init(hw, controller_nh) || !
init(hw, root_nh, controller_nh))
123 ROS_ERROR(
"Failed to initialize the controller");
127 claimed_resources.assign(1, iface_res);
138 return hardware_interface::internal::demangledTypeName<T>();
virtual bool initRequest(hardware_interface::RobotHW *robot_hw, ros::NodeHandle &root_nh, ros::NodeHandle &controller_nh, ClaimedResources &claimed_resources)
Initialize the controller from a RobotHW pointer.
virtual bool init(T *, ros::NodeHandle &, ros::NodeHandle &)
The init function is called to initialize the controller from a non-realtime thread with a pointer to...
std::vector< hardware_interface::InterfaceResources > ClaimedResources
std::string getHardwareInterfaceType() const
Get the name of this controller's hardware interface type.
Abstract Controller Interface.
virtual bool init(T *, ros::NodeHandle &)
The init function is called to initialize the controller from a non-realtime thread with a pointer to...
Controller with a specific hardware interface
enum controller_interface::ControllerBase::@0 state_
The current execution state of the controller.
Controller< T > & operator=(const Controller< T > &c)