Public Member Functions | Protected Attributes
industrial_robot_client::robot_state_interface::RobotStateInterface Class Reference

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

#include <robot_state_interface.h>

List of all members.

Public Member Functions

void add_handler (MessageHandler *handler, bool allow_replace=true)
 Add a new handler.
SmplMsgConnectionget_connection ()
 get current robot-connection instance.
std::vector< std::string > get_joint_names ()
MessageManagerget_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

SmplMsgConnectionconnection_
JointRelayHandler default_joint_handler_
RobotStatusRelayHandler default_robot_status_handler_
TcpClient default_tcp_connection_
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 66 of file robot_state_interface.h.


Constructor & Destructor Documentation

Default constructor.

Definition at line 44 of file robot_state_interface.cpp.


Member Function Documentation

void industrial_robot_client::robot_state_interface::RobotStateInterface::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 147 of file robot_state_interface.h.

get current robot-connection instance.

Returns:
current robot connection object

Definition at line 120 of file robot_state_interface.h.

Definition at line 135 of file robot_state_interface.h.

get active message-manager object

Returns:
current 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.

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 51 of file robot_state_interface.cpp.

Initialize robot connection using specified method.

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

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.

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 92 of file robot_state_interface.cpp.

Begin processing messages and publishing topics.

Definition at line 114 of file robot_state_interface.cpp.


Member Data Documentation

Definition at line 157 of file robot_state_interface.h.

Definition at line 154 of file robot_state_interface.h.

Definition at line 155 of file robot_state_interface.h.

Definition at line 153 of file robot_state_interface.h.

Definition at line 159 of file robot_state_interface.h.

Definition at line 158 of file robot_state_interface.h.


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


industrial_robot_client
Author(s): Jeremy Zoss
autogenerated on Sat Jun 8 2019 20:43:29