ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

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;