Go to the documentation of this file.00001
00006 #include <ros/ros.h>
00007
00008 #include <nlj_dummy/nj_dummy.h>
00009 #include <nlj_dummy/lj_dummy.h>
00010
00011 #include <lama_interfaces/AddInterface.h>
00012
00013 int main(int argc, char **argv)
00014 {
00015 ros::init(argc, argv, "dummy_jockey");
00016 ros::NodeHandle n;
00017
00018
00019 ros::ServiceClient client = n.serviceClient<lama_interfaces::AddInterface>("interface_factory");
00020 client.waitForExistence();
00021 lama_interfaces::AddInterface srv;
00022 srv.request.interface_name = "dummy_descriptor";
00023 srv.request.interface_type = lama_interfaces::AddInterfaceRequest::SERIALIZED;
00024 srv.request.get_service_message = "nlj_dummy/GetDummyDescriptor";
00025 srv.request.set_service_message = "nlj_dummy/SetDummyDescriptor";
00026 if (!client.call(srv))
00027 {
00028 ROS_ERROR("Failed to create the Lama interface %s", srv.request.interface_name.c_str());
00029 return 1;
00030 }
00031
00032
00033 LJDummy loc_jockey("localizing_jockey", srv.request.interface_name, srv.response.set_service_name);
00034 NJDummy nav_jockey("navigating_jockey", srv.response.get_service_name);
00035
00036 ROS_DEBUG("dummy_jockey started");
00037 ros::spin();
00038 return 0;
00039 }
00040