ROS2 Dashing: No seconds() in Time_ struct
Hi,
While trying to compile the image message callback function in a ROS2 node below,
void imageCallback(const sensor_msgs::msg::Image::ConstSharedPtr& img_msg) {
double cur_time = img_msg->header.stamp.seconds();
...
}
I get the following compilation error:
const struct builtin_interfaces::msg::Time_<std::allocator<void>> has no member named ‘seconds’
How do I solve this issue?