main.cpp
Go to the documentation of this file.
1 /*******************************************************************************
2 * Copyright 2018 ROBOTIS CO., LTD.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *******************************************************************************/
16 
17 /* Author: SCH */
18 
19 // include
21 
22 //node main
23 int main(int argc, char **argv)
24 {
25  //init ros
26  ros::init(argc, argv, "op3_localization");
27 
28  //create ros wrapper object
29  robotis_op::OP3Localization op3_localization;
30 
31  //set node loop rate
32  ros::Rate loop_rate(10);
33 
34  //node loop
35  while ( ros::ok() )
36  {
37  op3_localization.process();
38 
39  //execute pending callbacks
40  ros::spinOnce();
41 
42  //relax to fit output rate
43  loop_rate.sleep();
44  }
45 
46  //exit program
47  return 0;
48 }
49 
int main(int argc, char **argv)
Definition: main.cpp:23
ROSCPP_DECL void init(int &argc, char **argv, const std::string &name, uint32_t options=0)
ROSCPP_DECL bool ok()
bool sleep()
ROSCPP_DECL void spinOnce()


op3_localization
Author(s): SCH
autogenerated on Mon Jun 10 2019 14:41:20