38 namespace robot_state_interface
56 ros::param::param<std::string>(
"robot_ip_address", ip, default_ip);
57 ros::param::param<int>(
"~port", port, default_port);
62 ROS_ERROR(
"No valid robot IP address found. Please set ROS 'robot_ip_address' param");
67 ROS_ERROR(
"No valid robot IP port found. Please set ROS '~port' param");
71 char* ip_addr = strdup(ip.c_str());
72 ROS_INFO(
"Robot state connecting to IP address: '%s:%d'", ip_addr, port);
81 std::vector<std::string> joint_names;
82 if (!
getJointNames(
"controller_joint_names",
"robot_description", joint_names))
84 ROS_ERROR(
"Failed to initialize joint_names. Aborting");
88 return init(connection, joint_names);
bool init(industrial::smpl_msg_connection::SmplMsgConnection *connection, std::vector< std::string > &joint_names)
bool init(char *buff, int port_num)
bool getJointNames(const std::string joint_list_param, const std::string urdf_param, std::vector< std::string > &joint_names)
JointRelayHandler default_joint_handler_
IOStateRelayHandler default_io_state_handler_
WrenchRelayHandler default_wrench_handler_
bool init(industrial::smpl_msg_connection::SmplMsgConnection *connection)
Class initializer.
bool init(industrial::smpl_msg_connection::SmplMsgConnection *connection)
Class initializer.
RobotStatusRelayHandler default_robot_status_handler_
void run()
Begin processing messages and publishing topics.
bool init(industrial::smpl_msg_connection::SmplMsgConnection *connection)
void add_handler(MessageHandler *handler, bool allow_replace=true)
Add a new handler.
FSRoboRRobotStateInterface()
Default constructor.
bool init(std::string default_ip="", int default_port=StandardSocketPorts::STATE)
Initialize robot connection using default method.
TcpClient default_tcp_connection_
SmplMsgConnection * connection_
bool init(industrial::smpl_msg_connection::SmplMsgConnection *connection)
std::vector< std::string > joint_names_
virtual bool makeConnect()=0