Common
common packages for kyubic
 
Loading...
Searching...
No Matches
imu_driver.hpp
Go to the documentation of this file.
1
10#ifndef _IMU_DRIVER_HPP
11#define _IMU_DRIVER_HPP
12
13#include <cstdint>
14#include <driver_msgs/msg/imu.hpp>
15#include <rclcpp/rclcpp.hpp>
16#include <serial/serial.hpp>
17#include <string>
18#include <timer/timeout.hpp>
19
20#include "imu_driver/g366.hpp"
21
26namespace driver::imu_driver
27{
28
32class IMUDriver : public rclcpp::Node
33{
34public:
40 IMUDriver();
41
45 void hw_reset();
46
47private:
48 std::string portname;
49 int baudrate;
50 uint64_t timeout_ms;
51
52 std::shared_ptr<timer::Timeout> timeout_;
53 std::shared_ptr<g366::G366> g366_;
54 // std::shared_ptr<g366::G366HWReseter> g366_hw_resetter_;
55 rclcpp::Publisher<driver_msgs::msg::IMU>::SharedPtr pub_;
56 rclcpp::TimerBase::SharedPtr timer_;
57
58 void _setup();
59 void _update();
60};
61
62} // namespace driver::imu_driver
63
64#endif
IMU driver class.
Definition: imu_driver.hpp:33
void hw_reset()
Hardware reset of IMU.
Definition: imu_driver.cpp:36
IMUDriver()
G366 & ROS-topic setting.
Definition: imu_driver.cpp:17
G366 library.
For imu driver.
serial library
timeout library