-
Notifications
You must be signed in to change notification settings - Fork 350
Expand file tree
/
Copy pathHAL.hpp
More file actions
37 lines (30 loc) · 934 Bytes
/
HAL.hpp
File metadata and controls
37 lines (30 loc) · 934 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#ifndef INCLUDE_HAL_HPP_
#define INCLUDE_HAL_HPP_
#include <memory>
#include <thread>
#include <vector>
#include <array>
class MotorsNode;
class OdometryNode;
class LaserNode;
namespace rclcpp::executors { class MultiThreadedExecutor; }
class HAL
{
public:
HAL() = delete;
static void set_v(const float velocity);
static void set_w(const float velocity);
static std::array<double, 3> get_pose3d();
static std::array<double, 3> get_odom();
static std::vector<float> get_laser_data();
private:
static void init();
friend class SystemBootstrapper;
static std::shared_ptr<MotorsNode> motors_node_;
static std::shared_ptr<OdometryNode> odometry_node_;
static std::shared_ptr<OdometryNode> noisy_odometry_node_;
static std::shared_ptr<LaserNode> laser_node_;
static std::shared_ptr<rclcpp::executors::MultiThreadedExecutor> executor_;
static std::thread spin_thread_;
};
#endif