ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
It looks like you're trying to copy the header from one message into the timestamp in another message, and the compiler is trying to tell you that these types aren't compatible.
The relevant error message is:
home/rmb/gopigo_ws/src/pd_controller/src/pd_controller.cpp:24:25: error: no match for ‘operator=’ (operand types are ‘std_msgs::Header_<std::allocator<void> >::_stamp_type {aka ros::Time}’ and ‘const _header_type {aka const std_msgs::Header_<std::allocator<void> >}’)
encoder.header.stamp = tk->header;
It looks like you should update that line so that it's just copying the timestamp:
encoder.header.stamp = tk->header.stamp;