Custom message type errors
I am trying to create custom message with Power.msg:
# Power
std_msgs/Int64 voltage48
std_msgs/Int64 voltage12
Everything is good until i try to set a value to underlying variables, example:
custom_msg::Power power_msgs;
power_msgs.voltage48 = 0;
power_msgs.voltage12 = 0;
power_pub.publish(power_msgs);
This doesn't compile due to error:
error: no match for ‘operator=’ (operand types are ‘custom_msgs::Power_<std::allocator<void> >::_voltage48_type {aka std_msgs::Int64_<std::allocator<void> >}’ and ‘int’)
What am I doing wrong?