Common
common packages for kyubic
 
Loading...
Searching...
No Matches
tilt_servo.hpp
Go to the documentation of this file.
1
10#ifndef _TILT_SERVO_HPP
11#define _TILT_SERVO_HPP
12
13#include <driver_msgs/msg/int32_stamped.hpp>
14#include <memory>
15#include <proto_files/conversion_driver_msgs__Int32Stamped.hpp>
16#include <protolink/client.hpp>
17#include <rclcpp/rclcpp.hpp>
18
24{
25
29class TiltServo : public rclcpp::Node
30{
31public:
36 explicit TiltServo(const rclcpp::NodeOptions & options);
37
38private:
39 std::string mcu_ip_addr; // of microcontroller, etc.
40 uint16_t mcu_port; // same as above
41 uint16_t this_port; // of the computer executing this code
42
43 protolink::IoContext io_context_;
44 std::shared_ptr<protolink::udp_protocol::soket> sock_;
45
46 using protoInt32Stamped = protolink__driver_msgs__Int32Stamped::driver_msgs__Int32Stamped;
47 std::shared_ptr<protolink::udp_protocol::Publisher<protoInt32Stamped>> protolink_publisher_;
48
49 rclcpp::Subscription<driver_msgs::msg::Int32Stamped>::SharedPtr sub_;
50};
51
52} // namespace driver::sensors_esp32_driver
53
54#endif // !_TILT_SERVO_HPP
TiltServo class.
Definition: tilt_servo.hpp:30
driver for sensors_esp32