I'm using Kinetic.
I have a custom message path.msg
string path_name
segment[] segments
I'm trying to send a ROS goal with that message type.
I initialize an array in my code
cuarl_rover_planner::segment segments[path->getSegments().size()];
//do stuff that populates the array
cuarl_rover_planner::path action_path;
action_path.segments = segments; // Error here
I get this error
error: no match for ‘operator=’ (operand types are ‘cuarl_rover_planner::path_<std::allocator<void> >::_segments_type {aka std::vector<cuarl_rover_planner::segment_<std::allocator<void> >, std::allocator<cuarl_rover_planner::segment_<std::allocator<void> > > >}’ and ‘cuarl_rover_planner::segment [(<anonymous> + 1)] {aka cuarl_rover_planner::segment_<std::allocator<void> > [(<anonymous> + 1)]}’)
action_path.segments = segments;
I'm assuming that the action_path.segments
take a different data type, but I don't understand what that datatype is, from that error message.