21 #include <sensor_msgs/JointState.h> 25 #include <canopen_chain_node/GetObject.h> 53 canopen_chain_node::GetObject srv;
54 srv.request.node = joint_name;
56 srv.request.cached =
false;
58 ROS_INFO_STREAM(
"Call \"get firmware\" service for \"" << joint_name <<
"\"");
64 if (!srv.response.success)
71 return srv.response.value;
92 std::vector<std::string> node_names;
93 for (
auto& rpci : rpc)
95 auto node_name = rpci.first.c_str();
96 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 const std::string JOINT_STATE_TOPIC
std::map< std::string, std::string > FirmwareCont
Exception thrown by the SystemInfo class in case of an error.
ros::ServiceClient canopen_srv_get_client_
bool call(MReq &req, MRes &res)
static std::vector< std::string > getNodeNames(const ros::NodeHandle &nh)
SystemInfo(ros::NodeHandle &nh)
static constexpr std::size_t FIRMWARE_STRING_LENGTH
FirmwareCont getFirmwareVersions()
static const std::string CANOPEN_GETOBJECT_SERVICE_NAME
bool getParam(const std::string &key, std::string &s) const
static void waitForService(const std::string service_name, const double retry_timeout=DEFAULT_RETRY_TIMEOUT, const double msg_output_period=DEFAULT_MSG_OUTPUT_PERIOD)
std::string getFirmwareVersionOfJoint(const std::string &joint_name)
#define ROS_INFO_STREAM(args)
static const std::string CANOPEN_NODES_PARAMETER_NAME
static const std::string GET_FIRMWARE_VERSION_OBJECT