Using std::vector Copy Constructor In a Message
Hello all, I am attempting the following code:
vector<float> ranges(360, 10); //A vector of 360 '10's
sensor_msgs::LaserScan currentScan;
currentScan.ranges(ranges); // <---------- Fails
Here is the cryptic error message:
error: no match for call to ‘(std::vector<float, std::allocator<float> >) (std::vector<float,std::allocator<float> >&)’
I tried googling similar errors but to no avail. If someone could offer some readings on the failure behind this, I would really appreciate this. Thank you
Constantin