Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes
controller::SrController Class Reference

#include <sr_controller.hpp>

Inheritance diagram for controller::SrController:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual void getGains (double &p, double &i, double &d, double &i_max, double &i_min)
std::string getJointName ()
virtual bool init (ros_ethercat_model::RobotState *robot, ros::NodeHandle &n)=0
virtual bool resetGains (std_srvs::Empty::Request &req, std_srvs::Empty::Response &resp)
 SrController ()
virtual void starting (const ros::Time &time)
virtual void update (const ros::Time &time, const ros::Duration &period)=0
 Issues commands to the joint. Should be called at regular intervals.
virtual ~SrController ()

Public Attributes

double command_
bool has_j2
ros_ethercat_model::JointStatejoint_state_
ros_ethercat_model::JointStatejoint_state_2

Protected Member Functions

void after_init ()
 call this function at the end of the init function in the inheriting classes.
virtual double clamp_command (double cmd)
void get_joints_states_1_2 ()
void get_min_max (urdf::Model model, std::string joint_name)
bool is_joint_0 ()
void maxForceFactorCB (const std_msgs::Float64ConstPtr &msg)
virtual void setCommandCB (const std_msgs::Float64ConstPtr &msg)
 set the command from a topic

Protected Attributes

boost::scoped_ptr
< realtime_tools::RealtimePublisher
< control_msgs::JointControllerState > > 
controller_state_publisher_
boost::scoped_ptr
< sr_friction_compensation::SrFrictionCompensator
friction_compensator
int friction_deadband
 the deadband for the friction compensation algorithm
sr_deadband::HysteresisDeadband
< double > 
hysteresis_deadband
 We're using an hysteresis deadband.
bool initialized_
std::string joint_name_
int loop_count_
double max_
double max_force_demand
 clamps the force demand to this value
double max_force_factor_
double min_
 Min and max range of the joint, used to clamp the command.
ros::NodeHandle n_tilde_
ros::NodeHandle node_
ros_ethercat_model::RobotStaterobot_
ros::ServiceServer serve_reset_gains_
ros::ServiceServer serve_set_gains_
ros::Subscriber sub_command_
ros::Subscriber sub_max_force_factor_

Detailed Description

Definition at line 54 of file sr_controller.hpp.


Constructor & Destructor Documentation

Definition at line 39 of file sr_controller.cpp.

Definition at line 56 of file sr_controller.cpp.


Member Function Documentation

call this function at the end of the init function in the inheriting classes.

Definition at line 82 of file sr_controller.cpp.

double controller::SrController::clamp_command ( double  cmd) [protected, virtual]

Clamps the command to the correct range (between min and max).

Parameters:
cmdthe command we want to clamp
Returns:
the clamped command

Definition at line 117 of file sr_controller.cpp.

Definition at line 70 of file sr_controller.cpp.

void controller::SrController::get_min_max ( urdf::Model  model,
std::string  joint_name 
) [protected]

Reads the min and max from the robot model for the current joint.

Parameters:
modelthe urdf description of the robot
joint_namethe name of the joint

Definition at line 93 of file sr_controller.cpp.

virtual void controller::SrController::getGains ( double &  p,
double &  i,
double &  d,
double &  i_max,
double &  i_min 
) [inline, virtual]

Definition at line 88 of file sr_controller.cpp.

virtual bool controller::SrController::init ( ros_ethercat_model::RobotState robot,
ros::NodeHandle n 
) [pure virtual]

Definition at line 61 of file sr_controller.cpp.

void controller::SrController::maxForceFactorCB ( const std_msgs::Float64ConstPtr &  msg) [protected]

Callback function for the max force factor topic

Parameters:
msgthe message receiver over the topic

Definition at line 128 of file sr_controller.cpp.

virtual bool controller::SrController::resetGains ( std_srvs::Empty::Request &  req,
std_srvs::Empty::Response &  resp 
) [inline, virtual]
virtual void controller::SrController::setCommandCB ( const std_msgs::Float64ConstPtr &  msg) [inline, protected, virtual]
virtual void controller::SrController::starting ( const ros::Time time) [inline, virtual]
virtual void controller::SrController::update ( const ros::Time time,
const ros::Duration period 
) [pure virtual]

Member Data Documentation

Last commanded position.

Definition at line 78 of file sr_controller.hpp.

boost::scoped_ptr<realtime_tools::RealtimePublisher<control_msgs::JointControllerState> > controller::SrController::controller_state_publisher_ [protected]

Definition at line 121 of file sr_controller.hpp.

the deadband for the friction compensation algorithm

Definition at line 132 of file sr_controller.hpp.

true if this is a joint 0.

Definition at line 77 of file sr_controller.hpp.

Definition at line 113 of file sr_controller.hpp.

Definition at line 117 of file sr_controller.hpp.

Joint we're controlling.

Definition at line 75 of file sr_controller.hpp.

2ndJoint we're controlling if joint 0.

Definition at line 76 of file sr_controller.hpp.

Definition at line 112 of file sr_controller.hpp.

double controller::SrController::max_ [protected]

Definition at line 110 of file sr_controller.hpp.

clamps the force demand to this value

Definition at line 130 of file sr_controller.hpp.

Definition at line 140 of file sr_controller.hpp.

double controller::SrController::min_ [protected]

Min and max range of the joint, used to clamp the command.

Definition at line 110 of file sr_controller.hpp.

Definition at line 116 of file sr_controller.hpp.

Definition at line 116 of file sr_controller.hpp.

Pointer to robot structure.

Definition at line 114 of file sr_controller.hpp.

Definition at line 127 of file sr_controller.hpp.

Reimplemented in controller::SrhMixedPositionVelocityJointController.

Definition at line 126 of file sr_controller.hpp.

Reimplemented in controller::SrhJointMuscleValveController.

Definition at line 125 of file sr_controller.hpp.

Definition at line 141 of file sr_controller.hpp.


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


sr_mechanism_controllers
Author(s): Ugo Cupcic
autogenerated on Fri Aug 21 2015 12:26:14