Hardware interface for a robot. More...
#include <sim_hw_interface.h>
Public Member Functions | |
virtual void | enforceLimits (ros::Duration &period) |
virtual void | init () |
Initialize the robot hardware interface. | |
virtual void | read (ros::Duration &elapsed_time) |
Read the state from the robot hardware. | |
SimHWInterface (ros::NodeHandle &nh, urdf::Model *urdf_model=NULL) | |
Constructor. | |
virtual void | write (ros::Duration &elapsed_time) |
Write the command to the robot hardware. | |
Protected Member Functions | |
virtual void | positionControlSimulation (ros::Duration &elapsed_time, const std::size_t joint_id) |
Basic model of system for position control. | |
Protected Attributes | |
std::vector< double > | joint_position_prev_ |
std::string | name_ |
double | p_error_ |
double | v_error_ |
Hardware interface for a robot.
Definition at line 49 of file sim_hw_interface.h.
ros_control_boilerplate::SimHWInterface::SimHWInterface | ( | ros::NodeHandle & | nh, |
urdf::Model * | urdf_model = NULL |
||
) |
Constructor.
nh | - Node handle for topics. |
Definition at line 44 of file sim_hw_interface.cpp.
void ros_control_boilerplate::SimHWInterface::enforceLimits | ( | ros::Duration & | period | ) | [virtual] |
Enforce limits for all values before writing
Implements ros_control_boilerplate::GenericHWInterface.
Definition at line 112 of file sim_hw_interface.cpp.
void ros_control_boilerplate::SimHWInterface::init | ( | ) | [virtual] |
Initialize the robot hardware interface.
Reimplemented from ros_control_boilerplate::GenericHWInterface.
Definition at line 50 of file sim_hw_interface.cpp.
void ros_control_boilerplate::SimHWInterface::positionControlSimulation | ( | ros::Duration & | elapsed_time, |
const std::size_t | joint_id | ||
) | [protected, virtual] |
Basic model of system for position control.
Definition at line 118 of file sim_hw_interface.cpp.
void ros_control_boilerplate::SimHWInterface::read | ( | ros::Duration & | elapsed_time | ) | [virtual] |
Read the state from the robot hardware.
Implements ros_control_boilerplate::GenericHWInterface.
Definition at line 61 of file sim_hw_interface.cpp.
void ros_control_boilerplate::SimHWInterface::write | ( | ros::Duration & | elapsed_time | ) | [virtual] |
Write the command to the robot hardware.
Implements ros_control_boilerplate::GenericHWInterface.
Definition at line 66 of file sim_hw_interface.cpp.
std::vector<double> ros_control_boilerplate::SimHWInterface::joint_position_prev_ [protected] |
Definition at line 83 of file sim_hw_interface.h.
std::string ros_control_boilerplate::SimHWInterface::name_ [protected] |
Reimplemented from ros_control_boilerplate::GenericHWInterface.
Definition at line 76 of file sim_hw_interface.h.
double ros_control_boilerplate::SimHWInterface::p_error_ [protected] |
Definition at line 79 of file sim_hw_interface.h.
double ros_control_boilerplate::SimHWInterface::v_error_ [protected] |
Definition at line 80 of file sim_hw_interface.h.