error: no match for 'operator='
Hey,
I get this error when building the package:
/home/ken/cws/src/mathematics/src/evenNumberGenerator.cpp:24: error: no match for 'operator=' (operand types are 'mathematics::TwoData_<std::allocator<void> >::_data2_type {aka std_msgs::Int8_<std::allocator<void> >}' and 'int')
number.data2 = i*2;
^
Basically, I am working on this issue, finally I think I figured it out the correct way of using custom messages in my package but I guess I made some mistake in my code.
msg file:
ken@ken-Satellite-L500D:~$ cat cws/src/mathematics/msg/TwoData.msg
std_msgs/Int8 data1
std_msgs/Int8 data2
Does anyone have an idea?
Thanks!