Adapter for an effort-controlled hardware interface. Maps position and velocity errors to effort commands through a position PID loop. More...
#include <hardware_interface_adapter.h>
Public Member Functions | |
HardwareInterfaceAdapter () | |
bool | init (std::vector< hardware_interface::JointHandle > &joint_handles, ros::NodeHandle &controller_nh) |
void | starting (const ros::Time &time) |
void | stopping (const ros::Time &time) |
void | updateCommand (const ros::Time &, const ros::Duration &period, const State &, const State &state_error) |
Private Types | |
typedef boost::shared_ptr < control_toolbox::Pid > | PidPtr |
Private Attributes | |
std::vector < hardware_interface::JointHandle > * | joint_handles_ptr_ |
std::vector< PidPtr > | pids_ |
Adapter for an effort-controlled hardware interface. Maps position and velocity errors to effort commands through a position PID loop.
The following is an example configuration of a controller that uses this adapter. Notice the gains
entry:
head_controller: type: "position_controllers/JointTrajectoryController" joints: - head_1_joint - head_2_joint constraints: goal_time: 0.6 stopped_velocity_tolerance: 0.02 head_1_joint: trajectory: 0.05 goal: 0.02 head_2_joint: goal: 0.01 gains: head_1_joint: {p: 200, d: 1, i: 5, i_clamp: 1} head_2_joint: {p: 200, d: 1, i: 5, i_clamp: 1}
Definition at line 133 of file hardware_interface_adapter.h.
typedef boost::shared_ptr<control_toolbox::Pid> HardwareInterfaceAdapter< hardware_interface::EffortJointInterface, State >::PidPtr [private] |
Definition at line 197 of file hardware_interface_adapter.h.
HardwareInterfaceAdapter< hardware_interface::EffortJointInterface, State >::HardwareInterfaceAdapter | ( | ) | [inline] |
Definition at line 136 of file hardware_interface_adapter.h.
bool HardwareInterfaceAdapter< hardware_interface::EffortJointInterface, State >::init | ( | std::vector< hardware_interface::JointHandle > & | joint_handles, |
ros::NodeHandle & | controller_nh | ||
) | [inline] |
Definition at line 138 of file hardware_interface_adapter.h.
void HardwareInterfaceAdapter< hardware_interface::EffortJointInterface, State >::starting | ( | const ros::Time & | time | ) | [inline] |
Definition at line 162 of file hardware_interface_adapter.h.
void HardwareInterfaceAdapter< hardware_interface::EffortJointInterface, State >::stopping | ( | const ros::Time & | time | ) | [inline] |
Definition at line 174 of file hardware_interface_adapter.h.
void HardwareInterfaceAdapter< hardware_interface::EffortJointInterface, State >::updateCommand | ( | const ros::Time & | , |
const ros::Duration & | period, | ||
const State & | , | ||
const State & | state_error | ||
) | [inline] |
Definition at line 176 of file hardware_interface_adapter.h.
std::vector<hardware_interface::JointHandle>* HardwareInterfaceAdapter< hardware_interface::EffortJointInterface, State >::joint_handles_ptr_ [private] |
Definition at line 200 of file hardware_interface_adapter.h.
std::vector<PidPtr> HardwareInterfaceAdapter< hardware_interface::EffortJointInterface, State >::pids_ [private] |
Definition at line 198 of file hardware_interface_adapter.h.