Go to the documentation of this file.
41 namespace robot_state_interface
57 ros::param::param<std::string>(
"robot_ip_address", ip, default_ip);
58 ros::param::param<int>(
"~port", port, default_port);
63 ROS_ERROR(
"No valid robot IP address found. Please set ROS 'robot_ip_address' param");
68 ROS_ERROR(
"No valid robot IP port found. Please set ROS '~port' param");
72 char* ip_addr = strdup(ip.c_str());
73 ROS_INFO(
"Robot state connecting to IP address: '%s:%d'", ip_addr, port);
82 std::vector<std::string> joint_names;
83 if (!
getJointNames(
"controller_joint_names",
"robot_description", joint_names))
85 ROS_ERROR(
"Failed to initialize joint_names. Aborting");
89 return init(connection, joint_names);
TcpClient default_tcp_connection_
RobotStatusRelayHandler default_robot_status_handler_
void add_handler(MessageHandler *handler, bool allow_replace=true)
Add a new handler.
bool getJointNames(const std::string joint_list_param, const std::string urdf_param, std::vector< std::string > &joint_names)
RobotStateInterface()
Default constructor.
bool init(std::string default_ip="", int default_port=StandardSocketPorts::STATE)
Initialize robot connection using default method.
bool init(char *buff, int port_num)
bool init(industrial::smpl_msg_connection::SmplMsgConnection *connection)
Class initializer.
virtual bool makeConnect()=0
bool init(industrial::smpl_msg_connection::SmplMsgConnection *connection)
std::vector< std::string > joint_names_
JointRelayHandler default_joint_handler_
SmplMsgConnection * connection_
void run()
Begin processing messages and publishing topics.
bool init(industrial::smpl_msg_connection::SmplMsgConnection *connection, std::vector< std::string > &joint_names)
Class initializer.