Ask Your Question

Revision history [back]

How do I solve this issue?

Use the correct name ;)

builtin_interfaces/msg/Time.msg only has a sec field, not seconds:

int32 sec
uint32 nanosec

How do I solve this issue?

Use the correct name ;)

builtin_interfaces/msg/Time.msg only has a sec field, not seconds:

int32 sec
uint32 nanosec

And unless I'm mistaken:

double cur_time = img_msg->header.stamp.seconds();

It's also not a method/function, but a plain public member variable. You can't invoke it, so the () are also incorrect/not needed.