Generic template that reads state-data from a robot controller and publishes matching messages to various ROS topics. More...
#include <robot_state_interface.h>
Public Member Functions | |
void | add_handler (MessageHandler *handler, bool allow_replace=true) |
Add a new handler. | |
SmplMsgConnection * | get_connection () |
get current robot-connection instance. | |
std::vector< std::string > | get_joint_names () |
MessageManager * | get_manager () |
get active message-manager object | |
bool | init (std::string default_ip="", int default_port=StandardSocketPorts::STATE) |
Initialize robot connection using default method. | |
bool | init (SmplMsgConnection *connection) |
Initialize robot connection using specified method. | |
bool | init (SmplMsgConnection *connection, std::vector< std::string > &joint_names) |
Initialize robot connection using specified method and joint-names. | |
RobotStateInterface () | |
Default constructor. | |
void | run () |
Begin processing messages and publishing topics. | |
Protected Attributes | |
SmplMsgConnection * | connection_ |
JointRelayHandler | default_joint_handler_ |
RobotStatusRelayHandler | default_robot_status_handler_ |
TcpClient | default_tcp_connection_ |
std::vector< std::string > | joint_names_ |
MessageManager | manager_ |
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 66 of file robot_state_interface.h.
Default constructor.
Definition at line 44 of file robot_state_interface.cpp.
void industrial_robot_client::robot_state_interface::RobotStateInterface::add_handler | ( | MessageHandler * | handler, |
bool | allow_replace = true |
||
) | [inline] |
Add a new handler.
new | message-handler for a specific msg-type (ALREADY INITIALIZED). |
replace | existing handler (of same msg-type), if exists |
Definition at line 147 of file robot_state_interface.h.
SmplMsgConnection* industrial_robot_client::robot_state_interface::RobotStateInterface::get_connection | ( | ) | [inline] |
get current robot-connection instance.
Definition at line 120 of file robot_state_interface.h.
std::vector<std::string> industrial_robot_client::robot_state_interface::RobotStateInterface::get_joint_names | ( | ) | [inline] |
Definition at line 135 of file robot_state_interface.h.
MessageManager* industrial_robot_client::robot_state_interface::RobotStateInterface::get_manager | ( | ) | [inline] |
get active message-manager object
Definition at line 130 of file robot_state_interface.h.
bool industrial_robot_client::robot_state_interface::RobotStateInterface::init | ( | std::string | default_ip = "" , |
int | default_port = StandardSocketPorts::STATE |
||
) |
Initialize robot connection using default method.
default_ip | default IP address to use for robot connection [OPTIONAL]
|
default_port | default port to use for robot connection [OPTIONAL]
|
Definition at line 51 of file robot_state_interface.cpp.
bool industrial_robot_client::robot_state_interface::RobotStateInterface::init | ( | SmplMsgConnection * | connection | ) |
Initialize robot connection using specified method.
connection | new robot-connection instance (ALREADY INITIALIZED). |
Definition at line 80 of file robot_state_interface.cpp.
bool industrial_robot_client::robot_state_interface::RobotStateInterface::init | ( | SmplMsgConnection * | connection, |
std::vector< std::string > & | joint_names | ||
) |
Initialize robot connection using specified method and joint-names.
connection | new robot-connection instance (ALREADY INITIALIZED). |
joint_names | list of joint-names for ROS topic
|
Definition at line 92 of file robot_state_interface.cpp.
Begin processing messages and publishing topics.
Definition at line 114 of file robot_state_interface.cpp.
SmplMsgConnection* industrial_robot_client::robot_state_interface::RobotStateInterface::connection_ [protected] |
Definition at line 157 of file robot_state_interface.h.
JointRelayHandler industrial_robot_client::robot_state_interface::RobotStateInterface::default_joint_handler_ [protected] |
Definition at line 154 of file robot_state_interface.h.
RobotStatusRelayHandler industrial_robot_client::robot_state_interface::RobotStateInterface::default_robot_status_handler_ [protected] |
Definition at line 155 of file robot_state_interface.h.
TcpClient industrial_robot_client::robot_state_interface::RobotStateInterface::default_tcp_connection_ [protected] |
Definition at line 153 of file robot_state_interface.h.
std::vector<std::string> industrial_robot_client::robot_state_interface::RobotStateInterface::joint_names_ [protected] |
Definition at line 159 of file robot_state_interface.h.
MessageManager industrial_robot_client::robot_state_interface::RobotStateInterface::manager_ [protected] |
Definition at line 158 of file robot_state_interface.h.