dmu_node.cpp
Go to the documentation of this file.
1 #include <ros/ros.h>
2 #include <sensor_msgs/Imu.h>
4 #include <DMU11.h>
5 
6 std::shared_ptr<DMU11> imu;
7 
8 int main(int argc, char *argv[])
9 {
10  ros::init(argc, argv, "dmu_node");
11  ros::NodeHandle nh;
12 
13  imu = std::shared_ptr<DMU11>(new DMU11(nh));
14 
15  imu->openPort();
16 
17  usleep(100000);
18 
19  ros::Rate rate(imu->rate_);
20  while (ros::ok())
21  {
22  imu->update();
23  ros::spinOnce();
24  rate.sleep();
25  }
26 
27  imu->closePort();
28 
29 
30  return 0;
31 }
ROSCPP_DECL void init(int &argc, char **argv, const std::string &name, uint32_t options=0)
int main(int argc, char *argv[])
Definition: dmu_node.cpp:8
ROSCPP_DECL bool ok()
bool sleep()
std::shared_ptr< DMU11 > imu
Definition: dmu_node.cpp:6
ROSCPP_DECL void spinOnce()
Definition: DMU11.h:21


dmu_ros
Author(s): Leutrim Gruda
autogenerated on Mon Jun 10 2019 13:05:49