Galaxis Codebase  1.0.0
Team Galaxis software stack for the Carolo Cup 2023 - ROS2 based software
main.cpp
Go to the documentation of this file.
1 #include <functional>
2 #include "rclcpp/rclcpp.hpp"
3 #include "ECUNode.hpp"
4 #include "std_msgs/msg/string.hpp"
5 #include <galaxis/messages.hpp>
6 
7 int main(int argc, char* argv[]) {
8  rclcpp::init(argc, argv);
9 
10  auto node = std::make_shared<ECUNode>();
11  auto handler = std::make_shared<ECUHandler>();
12 
13  node->init(handler);
14  handler->init(
16  node.get(),
17  std::placeholders::_1,
18  std::placeholders::_2));
19 
20  rclcpp::spin(node);
21  rclcpp::shutdown();
22  return 0;
23 }
ECUNode::publishMeasurements
void publishMeasurements(const EcuPacket *const packet, const std::array< std::chrono::duration< double, std::milli >, 10 > &diff_ms)
Publishes the new Measurements from the ECU on the apropriate Publishers.
Definition: ECUNode.cpp:140
main
int main(int argc, char *argv[])
Definition: main.cpp:13
ECUNode.hpp
messages.hpp