[Autoware auto] - Monitored node

asked 2022-05-31 19:17:45 -0500

Doug gravatar image

Hi all,

Autoware.auto user here. Ade v4.4.0, on master branch, last commit is [e3e26be1] - [#1478] Let rr planner record in custom frame.

I'm trying to get a sense of where the Autoware Monitoring system is at and where it's going: link

More particularly, I'm trying to understand if the Monitored node API is already usable: link

So far I've tried creating a simple ROS2 node that inherits from the MonitoredNode class instead of rclcpp::Node. Things start not compiling after creating a monitored publisher:

std::chrono::milliseconds min_time_interval(100);
std::chrono::milliseconds max_time_interval(200);
publisher = create_monitored_publisher<std_msgs::msg::UInt8>("topic", rclcpp::QoS(10), min_time_interval, max_time_interval);

When compiling with colcon I get the following error:

monitored_publisher.hpp:138:55: error: conversion to ‘std::vector<long unsigned int>::value_type’ {aka ‘long unsigned int’} from ‘std::chrono::duration<long int, std::ratio<1, 1000> >::rep’ {aka ‘long int’} may change the sign of the result [-Werror=sign-conversion]
138 |       msg.data.push_back(min_publishing_interval.count());

What would be the correct way to create a monitored publisher ? Thanks in advance for any help !

edit retag flag offensive close merge delete