Formula Student Autonomous Systems
The code for the main driverless system
Loading...
Searching...
No Matches
invictasim_node.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <chrono>
4#include <memory>
5#include <thread>
6
8#include "rclcpp/rclcpp.hpp"
9#include "std_msgs/msg/float64.hpp"
11
12class InvictaSimNode : public rclcpp::Node {
13public:
17 explicit InvictaSimNode(const InvictaSimParameters& params);
18
22 ~InvictaSimNode() = default;
23
24private:
26
27 // Vehicle model
28 std::shared_ptr<VehicleModel> vehicle_model_;
29
30 // Simulation state
31 double sim_time_;
32 std::chrono::steady_clock::time_point next_loop_time_;
33 rclcpp::TimerBase::SharedPtr simulation_timer_;
34
35 // Publishers
36 rclcpp::Publisher<std_msgs::msg::Float64>::SharedPtr test_pub_;
37
38 // Subscribers
39
43 void init();
44
48 void simulation_step();
49};
std::chrono::steady_clock::time_point next_loop_time_
void init()
Initialize the simulator node.
InvictaSimParameters params_
std::shared_ptr< VehicleModel > vehicle_model_
rclcpp::TimerBase::SharedPtr simulation_timer_
~InvictaSimNode()=default
Destructor.
void simulation_step()
Perform a single simulation step.
rclcpp::Publisher< std_msgs::msg::Float64 >::SharedPtr test_pub_