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 (pr2_mechanism_model::RobotState *robot, ros::NodeHandle &n)
bool init (pr2_mechanism_model::RobotState *robot, const std::string &joint_name)
 SrhExampleController ()
virtual void starting ()
virtual void update ()
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.

Reimplemented from controller::SrController.

Definition at line 53 of file srh_example_controller.cpp.

bool controller::SrhExampleController::init ( pr2_mechanism_model::RobotState robot,
const std::string &  joint_name 
)

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.

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 132 of file srh_example_controller.cpp.

void controller::SrhExampleController::update ( void  ) [virtual]

Issues commands to the joint. This method is called at 1kHz by the main loop.

Reimplemented from controller::SrController.

Definition at line 141 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 28 2015 13:09:56