Public Member Functions | Protected Attributes | List of all members
fsrobo_r_driver::robot_state_interface::FSRoboRRobotStateInterface Class Reference

Generic template that reads state-data from a robot controller and publishes matching messages to various ROS topics. More...

#include <fsrobo_r_robot_state_interface.h>

Public Member Functions

void add_handler (MessageHandler *handler, bool allow_replace=true)
 Add a new handler. More...
 
 FSRoboRRobotStateInterface ()
 Default constructor. More...
 
SmplMsgConnectionget_connection ()
 get current robot-connection instance. More...
 
std::vector< std::string > get_joint_names ()
 
MessageManagerget_manager ()
 get active message-manager object More...
 
bool init (std::string default_ip="", int default_port=StandardSocketPorts::STATE)
 Initialize robot connection using default method. More...
 
bool init (SmplMsgConnection *connection)
 Initialize robot connection using specified method. More...
 
bool init (SmplMsgConnection *connection, std::vector< std::string > &joint_names)
 Initialize robot connection using specified method and joint-names. More...
 
void run ()
 Begin processing messages and publishing topics. More...
 

Protected Attributes

SmplMsgConnectionconnection_
 
IOStateRelayHandler default_io_state_handler_
 
JointRelayHandler default_joint_handler_
 
RobotStatusRelayHandler default_robot_status_handler_
 
TcpClient default_tcp_connection_
 
WrenchRelayHandler default_wrench_handler_
 
std::vector< std::string > joint_names_
 
MessageManager manager_
 

Detailed Description

Generic template that reads state-data from a robot controller and publishes matching messages to various ROS topics.

Users should replace the default class members to implement robot-specific behavior.

Definition at line 65 of file fsrobo_r_robot_state_interface.h.

Constructor & Destructor Documentation

fsrobo_r_driver::robot_state_interface::FSRoboRRobotStateInterface::FSRoboRRobotStateInterface ( )

Default constructor.

Definition at line 41 of file fsrobo_r_robot_state_interface.cpp.

Member Function Documentation

void fsrobo_r_driver::robot_state_interface::FSRoboRRobotStateInterface::add_handler ( MessageHandler handler,
bool  allow_replace = true 
)
inline

Add a new handler.

Parameters
newmessage-handler for a specific msg-type (ALREADY INITIALIZED).
replaceexisting handler (of same msg-type), if exists

Definition at line 145 of file fsrobo_r_robot_state_interface.h.

SmplMsgConnection* fsrobo_r_driver::robot_state_interface::FSRoboRRobotStateInterface::get_connection ( )
inline

get current robot-connection instance.

Returns
current robot connection object

Definition at line 118 of file fsrobo_r_robot_state_interface.h.

std::vector<std::string> fsrobo_r_driver::robot_state_interface::FSRoboRRobotStateInterface::get_joint_names ( )
inline

Definition at line 133 of file fsrobo_r_robot_state_interface.h.

MessageManager* fsrobo_r_driver::robot_state_interface::FSRoboRRobotStateInterface::get_manager ( )
inline

get active message-manager object

Returns
current message-manager object

Definition at line 128 of file fsrobo_r_robot_state_interface.h.

bool fsrobo_r_driver::robot_state_interface::FSRoboRRobotStateInterface::init ( std::string  default_ip = "",
int  default_port = StandardSocketPorts::STATE 
)

Initialize robot connection using default method.

Parameters
default_ipdefault IP address to use for robot connection [OPTIONAL]
  • this value will be used if ROS param "robot_ip_address" cannot be read
default_portdefault port to use for robot connection [OPTIONAL]
  • this value will be used if ROS param "~port" cannot be read
Returns
true on success, false otherwise

Definition at line 50 of file fsrobo_r_robot_state_interface.cpp.

bool fsrobo_r_driver::robot_state_interface::FSRoboRRobotStateInterface::init ( SmplMsgConnection connection)

Initialize robot connection using specified method.

Parameters
connectionnew robot-connection instance (ALREADY INITIALIZED).
Returns
true on success, false otherwise

Definition at line 79 of file fsrobo_r_robot_state_interface.cpp.

bool fsrobo_r_driver::robot_state_interface::FSRoboRRobotStateInterface::init ( SmplMsgConnection connection,
std::vector< std::string > &  joint_names 
)

Initialize robot connection using specified method and joint-names.

Parameters
connectionnew robot-connection instance (ALREADY INITIALIZED).
joint_nameslist of joint-names for ROS topic
  • Count and order should match data sent to robot connection.
  • Use blank-name to skip (not publish) a joint-position
Returns
true on success, false otherwise

Definition at line 91 of file fsrobo_r_robot_state_interface.cpp.

void fsrobo_r_driver::robot_state_interface::FSRoboRRobotStateInterface::run ( )

Begin processing messages and publishing topics.

Definition at line 121 of file fsrobo_r_robot_state_interface.cpp.

Member Data Documentation

SmplMsgConnection* fsrobo_r_driver::robot_state_interface::FSRoboRRobotStateInterface::connection_
protected

Definition at line 157 of file fsrobo_r_robot_state_interface.h.

IOStateRelayHandler fsrobo_r_driver::robot_state_interface::FSRoboRRobotStateInterface::default_io_state_handler_
protected

Definition at line 154 of file fsrobo_r_robot_state_interface.h.

JointRelayHandler fsrobo_r_driver::robot_state_interface::FSRoboRRobotStateInterface::default_joint_handler_
protected

Definition at line 152 of file fsrobo_r_robot_state_interface.h.

RobotStatusRelayHandler fsrobo_r_driver::robot_state_interface::FSRoboRRobotStateInterface::default_robot_status_handler_
protected

Definition at line 153 of file fsrobo_r_robot_state_interface.h.

TcpClient fsrobo_r_driver::robot_state_interface::FSRoboRRobotStateInterface::default_tcp_connection_
protected

Definition at line 151 of file fsrobo_r_robot_state_interface.h.

WrenchRelayHandler fsrobo_r_driver::robot_state_interface::FSRoboRRobotStateInterface::default_wrench_handler_
protected

Definition at line 155 of file fsrobo_r_robot_state_interface.h.

std::vector<std::string> fsrobo_r_driver::robot_state_interface::FSRoboRRobotStateInterface::joint_names_
protected

Definition at line 159 of file fsrobo_r_robot_state_interface.h.

MessageManager fsrobo_r_driver::robot_state_interface::FSRoboRRobotStateInterface::manager_
protected

Definition at line 158 of file fsrobo_r_robot_state_interface.h.


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


fsrobo_r_driver
Author(s): F-ROSROBO
autogenerated on Sun Feb 9 2020 03:58:29