alignment.cpp
Go to the documentation of this file.
1 /************************************************
2 Alignment file code
3 This file which check alignment between
4 CAO and Num represents one node of the entire
5 demonstrator
6 ************************************************/
7 
8 // ROS headers
9 #include <ros/ros.h>
10 #include <ros/service.h>
11 #include <fanuc_grinding_alignment/AlignmentService.h> // Description of the Service we will use
12 
14 
21 bool align(fanuc_grinding_alignment::AlignmentService::Request &req,
22  fanuc_grinding_alignment::AlignmentService::Response &res)
23 {
24  // Get parameters from the message and print them
25  ROS_WARN_STREAM(std::endl << req);
26 
27  res.ReturnStatus = false;
28  res.ReturnMessage = "Alignment not implemented yet!";
29  return true;
30 }
31 
32 int main(int argc, char **argv)
33 {
34  ros::init(argc, argv, "alignment");
35  node.reset(new ros::NodeHandle);
36 
37  // Create service server and wait for incoming requests
38  ros::ServiceServer service = node->advertiseService("alignment_service", align);
39  ros::AsyncSpinner spinner(1);
40  spinner.start();
41 
42  while (node->ok())
43  {
44  sleep(1);
45  }
46  spinner.stop();
47  return 0;
48 }
bool align(fanuc_grinding_alignment::AlignmentService::Request &req, fanuc_grinding_alignment::AlignmentService::Response &res)
Definition: alignment.cpp:21
int main(int argc, char **argv)
Definition: alignment.cpp:32
ROSCPP_DECL void init(int &argc, char **argv, const std::string &name, uint32_t options=0)
#define ROS_WARN_STREAM(args)
boost::shared_ptr< ros::NodeHandle > node
Definition: alignment.cpp:13


alignment
Author(s): Kévin Bolloré, Victor Lamoine - Institut Maupertuis
autogenerated on Thu Dec 19 2019 03:38:12