ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
You can't use copy-constructor syntax because currentScan.ranges has already been constructed (as part of the constructor for sensor_msgs::LaserScan
).
Assignment will work, though:
currentScan.ranges = ranges;