Public Member Functions | Private Member Functions | Private Attributes | List of all members
robot_controllers::CartesianTwistController Class Reference

#include <cartesian_twist.h>

Inheritance diagram for robot_controllers::CartesianTwistController:
Inheritance graph
[legend]

Public Member Functions

 CartesianTwistController ()
 
void command (const geometry_msgs::TwistStamped::ConstPtr &goal)
 Controller command. More...
 
virtual std::vector< std::string > getClaimedNames ()
 Get the names of joints/controllers which this controller exclusively claims. More...
 
virtual std::vector< std::string > getCommandedNames ()
 Get the names of joints/controllers which this controller commands. More...
 
virtual std::string getType ()
 Get the type of this controller. More...
 
virtual int init (ros::NodeHandle &nh, ControllerManager *manager)
 Initialize the controller and any required data structures. More...
 
virtual bool reset ()
 Cleanly reset the controller to it's initial state. Some controllers may choose to stop themselves. This is mainly used in the case of the the robot exiting some fault condition. More...
 
virtual bool start ()
 Attempt to start the controller. This should be called only by the ControllerManager instance. More...
 
virtual bool stop (bool force)
 Attempt to stop the controller. This should be called only by the ControllerManager instance. More...
 
virtual void update (const ros::Time &now, const ros::Duration &dt)
 This is the update loop for the controller. More...
 
virtual ~CartesianTwistController ()
 
- Public Member Functions inherited from robot_controllers::Controller
 Controller ()
 
std::string getName ()
 
virtual ~Controller ()
 
- Public Member Functions inherited from robot_controllers::Handle
 Handle ()
 
virtual ~Handle ()
 

Private Member Functions

KDL::Frame getPose ()
 

Private Attributes

ros::Subscriber command_sub_
 
bool enabled_
 
ros::Publisher feedback_pub_
 
boost::shared_ptr< KDL::ChainFkSolverPos_recursivefksolver_
 
bool initialized_
 
bool is_active_
 
std::vector< JointHandlePtrjoints_
 
KDL::Chain kdl_chain_
 
ros::Time last_command_time_
 
KDL::JntArray last_tgt_jnt_vel_
 
ControllerManagermanager_
 
boost::mutex mutex_
 
boost::shared_ptr< KDL::ChainIkSolverVel_wdlssolver_
 
KDL::JntArray tgt_jnt_pos_
 
KDL::JntArray tgt_jnt_vel_
 
KDL::Twist twist_command_
 
std::string twist_command_frame_
 

Detailed Description

Definition at line 71 of file cartesian_twist.h.

Constructor & Destructor Documentation

robot_controllers::CartesianTwistController::CartesianTwistController ( )

Definition at line 54 of file cartesian_twist.cpp.

virtual robot_controllers::CartesianTwistController::~CartesianTwistController ( )
inlinevirtual

Definition at line 75 of file cartesian_twist.h.

Member Function Documentation

void robot_controllers::CartesianTwistController::command ( const geometry_msgs::TwistStamped::ConstPtr &  goal)

Controller command.

Definition at line 300 of file cartesian_twist.cpp.

std::vector< std::string > robot_controllers::CartesianTwistController::getClaimedNames ( )
virtual

Get the names of joints/controllers which this controller exclusively claims.

Implements robot_controllers::Controller.

Definition at line 360 of file cartesian_twist.cpp.

std::vector< std::string > robot_controllers::CartesianTwistController::getCommandedNames ( )
virtual

Get the names of joints/controllers which this controller commands.

Implements robot_controllers::Controller.

Definition at line 348 of file cartesian_twist.cpp.

KDL::Frame robot_controllers::CartesianTwistController::getPose ( )
private
virtual std::string robot_controllers::CartesianTwistController::getType ( )
inlinevirtual

Get the type of this controller.

Reimplemented from robot_controllers::Controller.

Definition at line 118 of file cartesian_twist.h.

int robot_controllers::CartesianTwistController::init ( ros::NodeHandle nh,
ControllerManager manager 
)
virtual

Initialize the controller and any required data structures.

Parameters
nhNode handle for this controller.
managerThe controller manager instance, this is needed for the controller to get information about joints, etc.
Returns
0 if succesfully configured, negative values are error codes.

Reimplemented from robot_controllers::Controller.

Definition at line 60 of file cartesian_twist.cpp.

bool robot_controllers::CartesianTwistController::reset ( )
virtual

Cleanly reset the controller to it's initial state. Some controllers may choose to stop themselves. This is mainly used in the case of the the robot exiting some fault condition.

Returns
True if successfully reset, false otherwise.

Implements robot_controllers::Controller.

Definition at line 158 of file cartesian_twist.cpp.

bool robot_controllers::CartesianTwistController::start ( )
virtual

Attempt to start the controller. This should be called only by the ControllerManager instance.

Returns
True if successfully started, false otherwise.

Implements robot_controllers::Controller.

Definition at line 133 of file cartesian_twist.cpp.

bool robot_controllers::CartesianTwistController::stop ( bool  force)
virtual

Attempt to stop the controller. This should be called only by the ControllerManager instance.

Parameters
forceShould we force the controller to stop? Some controllers may wish to continue running until they absolutely have to stop.
Returns
True if successfully stopped, false otherwise.

Implements robot_controllers::Controller.

Definition at line 152 of file cartesian_twist.cpp.

void robot_controllers::CartesianTwistController::update ( const ros::Time now,
const ros::Duration dt 
)
virtual

This is the update loop for the controller.

Parameters
timeThe system time.
dtThe timestep since last call to update.

Implements robot_controllers::Controller.

Definition at line 164 of file cartesian_twist.cpp.

Member Data Documentation

ros::Subscriber robot_controllers::CartesianTwistController::command_sub_
private

Definition at line 148 of file cartesian_twist.h.

bool robot_controllers::CartesianTwistController::enabled_
private

Definition at line 138 of file cartesian_twist.h.

ros::Publisher robot_controllers::CartesianTwistController::feedback_pub_
private

Definition at line 147 of file cartesian_twist.h.

boost::shared_ptr<KDL::ChainFkSolverPos_recursive> robot_controllers::CartesianTwistController::fksolver_
private

Definition at line 142 of file cartesian_twist.h.

bool robot_controllers::CartesianTwistController::initialized_
private

Definition at line 135 of file cartesian_twist.h.

bool robot_controllers::CartesianTwistController::is_active_
private

Definition at line 156 of file cartesian_twist.h.

std::vector<JointHandlePtr> robot_controllers::CartesianTwistController::joints_
private

Definition at line 150 of file cartesian_twist.h.

KDL::Chain robot_controllers::CartesianTwistController::kdl_chain_
private

Definition at line 140 of file cartesian_twist.h.

ros::Time robot_controllers::CartesianTwistController::last_command_time_
private

Definition at line 155 of file cartesian_twist.h.

KDL::JntArray robot_controllers::CartesianTwistController::last_tgt_jnt_vel_
private

Definition at line 145 of file cartesian_twist.h.

ControllerManager* robot_controllers::CartesianTwistController::manager_
private

Definition at line 136 of file cartesian_twist.h.

boost::mutex robot_controllers::CartesianTwistController::mutex_
private

Definition at line 152 of file cartesian_twist.h.

boost::shared_ptr<KDL::ChainIkSolverVel_wdls> robot_controllers::CartesianTwistController::solver_
private

Definition at line 141 of file cartesian_twist.h.

KDL::JntArray robot_controllers::CartesianTwistController::tgt_jnt_pos_
private

Definition at line 143 of file cartesian_twist.h.

KDL::JntArray robot_controllers::CartesianTwistController::tgt_jnt_vel_
private

Definition at line 144 of file cartesian_twist.h.

KDL::Twist robot_controllers::CartesianTwistController::twist_command_
private

Definition at line 153 of file cartesian_twist.h.

std::string robot_controllers::CartesianTwistController::twist_command_frame_
private

Definition at line 154 of file cartesian_twist.h.


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


robot_controllers
Author(s): Michael Ferguson
autogenerated on Sun Sep 27 2020 03:22:39