21 #include <sensor_msgs/JointState.h> 25 #include <canopen_chain_node/GetObject.h> 42 : joint_names_( getNodeNames(nh) )
55 canopen_chain_node::GetObject srv;
56 srv.request.node = joint_name;
58 srv.request.cached =
false;
60 ROS_INFO_STREAM(
"Call \"get firmware\" service for \"" << joint_name <<
"\"");
66 if (!srv.response.success)
73 return srv.response.value;
94 std::vector<std::string> node_names;
95 for (
auto rpci = rpc.
begin(); rpci != rpc.
end(); ++rpci)
97 auto node_name = rpci->first.c_str();
98 node_names.push_back(node_name);
ServiceClient serviceClient(const std::string &service_name, bool persistent=false, const M_string &header_values=M_string())
const std::vector< std::string > joint_names_
static std::vector< std::string > getNodeNames(const ros::NodeHandle &nh)
bool call(MReq &req, MRes &res)
static void waitForService(const std::string service_name, const double retry_timeout=DEFAULT_RETRY_TIMEOUT, const double msg_output_period=DEFAULT_MSG_OUTPUT_PERIOD)
SystemInfo(ros::NodeHandle &nh)
FirmwareCont getFirmwareVersions()
static const std::string CANOPEN_NODES_PARAMETER_NAME
static const std::string JOINT_STATE_TOPIC
static const std::string GET_FIRMWARE_VERION_OBJECT
static constexpr std::size_t FIRMWARE_STRING_LENGTH
#define ROS_INFO_STREAM(args)
bool getParam(const std::string &key, std::string &s) const
static const std::string CANOPEN_GETOBJECT_SERVICE_NAME
std::string getFirmwareVersionOfJoint(const std::string &joint_name)
Exception thrown by the SystemInfo class in case of an error.
ros::ServiceClient canopen_srv_get_client_
std::map< std::string, std::string > FirmwareCont