add test print

This commit is contained in:
Sem van der Hoeven
2023-03-03 12:47:04 +01:00
parent ee2d5c4d54
commit eaeb2dba5a
2 changed files with 5 additions and 1 deletions

2
.gitignore vendored
View File

@@ -328,3 +328,5 @@ tags
.ionide
# End of https://www.toptal.com/developers/gitignore/api/ros2,ros,cmake,c++,python,visualstudiocode,vim
.vscode/

View File

@@ -1,9 +1,10 @@
#include <chrono> //time measurement
#include <iostream> // reading from serial port
#include "rclcpp/rclcpp.hpp"
#include "std_msgs/msg/string.hpp"
using namespace std::chrono_literals;
using namespace std::chrono_literals; // for time measurements
class HeightSensorPublisher : public rclcpp::Node
{
@@ -13,6 +14,7 @@ class HeightSensorPublisher : public rclcpp::Node
publisher_ = this->create_publisher<std_msgs::msg::String>("height_sensor", 10);
timer_ = this->create_wall_timer(
500ms, std::bind(&HeightSensorPublisher::timer_callback, this));
RCLCPP_INFO(this->get_logger(), "Constructor of height sensor publisher");
}
private: