Formula Student Autonomous Systems
The code for the main driverless system
Loading...
Searching...
No Matches
mocker_node.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <chrono>
4#include <cmath>
5#include <functional>
6#include <memory>
7#include <string>
8
11#include "fs_msgs/msg/finished_signal.hpp"
12#include "fs_msgs/msg/go_signal.hpp"
13#include "rclcpp/rclcpp.hpp"
14#include "utils/mocks.hpp"
15#include "visualization_msgs/msg/marker.hpp"
16
17class MockerNode : public rclcpp::Node {
18private:
19 rclcpp::Publisher<custom_interfaces::msg::PathPointArray>::SharedPtr planning_publisher;
20 rclcpp::Publisher<custom_interfaces::msg::ConeArray>::SharedPtr se_publisher;
21 rclcpp::Publisher<visualization_msgs::msg::Marker>::SharedPtr planning_visualization_publisher;
22
24 rclcpp::TimerBase::SharedPtr timer_;
25
26 std::string _map_frame_id_;
27
28public:
29 custom_interfaces::msg::PathPointArray gtruth_planning; // ground truth for the planning node
30 custom_interfaces::msg::ConeArray gtruth_se; // ground truth for the state estimation node
31
35 void publish_data();
36
42 MockerNode();
43};
std::string _map_frame_id_
rclcpp::Publisher< custom_interfaces::msg::ConeArray >::SharedPtr se_publisher
void publish_data()
publish the messages
rclcpp::TimerBase::SharedPtr timer_
custom_interfaces::msg::ConeArray gtruth_se
MockerNode()
Constructor for a new Mocker Node object.
rclcpp::Publisher< custom_interfaces::msg::PathPointArray >::SharedPtr planning_publisher
custom_interfaces::msg::PathPointArray gtruth_planning
rclcpp::Publisher< visualization_msgs::msg::Marker >::SharedPtr planning_visualization_publisher
Timer for the periodic publishing.