Public Member Functions
controller::SrhExampleController Class Reference

#include <srh_example_controller.hpp>

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

List of all members.

Public Member Functions

bool init (ros_ethercat_model::RobotState *robot, ros::NodeHandle &n)
bool init (ros_ethercat_model::RobotState *robot, const std::string &joint_name)
 SrhExampleController ()
virtual void starting (const ros::Time &time)
virtual void update (const ros::Time &time, const ros::Duration &period)
virtual ~SrhExampleController ()

Detailed Description

Definition at line 35 of file srh_example_controller.hpp.


Constructor & Destructor Documentation

The controller manager will instanciate one instance of this class per controlled joint.

Definition at line 40 of file srh_example_controller.cpp.

Destructor.

Definition at line 47 of file srh_example_controller.cpp.


Member Function Documentation

The first init is used to read which joint is being controlled from the parameter server.

Parameters:
robotA pointer to the robot state, passed to the 2nd init function.
nThe ROS nodehandle, to be able to access the parameter server.
Returns:
True if the 2nd init function succeeds.

Implements controller::SrController.

Definition at line 53 of file srh_example_controller.cpp.

This init funciton is called by the previous init function. It finishes to initalise the different necessary variables.

Parameters:
robotA pointer to the robot state (used to get the joint_state)
joint_nameThe name of the joint which is controlled.
Returns:
true if initialized.

Definition at line 78 of file srh_example_controller.cpp.

void controller::SrhExampleController::starting ( const ros::Time time) [virtual]

This method is called when the controller is started. The command is then to be the current position (or effort / velocity / ... depending on what you're controlling), so that the first command won't move the joint.

Reimplemented from controller::SrController.

Definition at line 131 of file srh_example_controller.cpp.

void controller::SrhExampleController::update ( const ros::Time time,
const ros::Duration period 
) [virtual]

Issues commands to the joint. This method is called at the specified rate by the main loop.

Implements controller::SrController.

Definition at line 140 of file srh_example_controller.cpp.


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