2 #include "hebiros/EntryListSrv.h" 3 #include "hebiros/AddGroupFromNamesSrv.h" 4 #include "hebiros/SizeSrv.h" 9 int main(
int argc,
char **argv) {
12 ros::init(argc, argv,
"example_01_lookup_node");
16 std::string group_name =
"my_group";
20 "/hebiros/entry_list");
24 "/hebiros/add_group_from_names");
28 "/hebiros/"+group_name+
"/size");
30 EntryListSrv entry_list_srv;
31 AddGroupFromNamesSrv add_group_srv;
36 entry_list_client.
call(entry_list_srv);
39 add_group_srv.request.group_name = group_name;
40 add_group_srv.request.names = {
"base",
"shoulder",
"elbow"};
41 add_group_srv.request.families = {
"HEBI"};
44 while(!add_group_client.call(add_group_srv)) {}
47 size_client.call(size_srv);
48 ROS_INFO(
"%s has been created and has size %d", group_name.c_str(), size_srv.response.size);
ServiceClient serviceClient(const std::string &service_name, bool persistent=false, const M_string &header_values=M_string())
int main(int argc, char **argv)
ROSCPP_DECL void init(int &argc, char **argv, const std::string &name, uint32_t options=0)
bool call(MReq &req, MRes &res)
ROSCPP_DECL void spinOnce()