I am using this branch: https://github.com/kintzhao/rplidar_ros/tree/feature/angFilterPublish for limiting the range of the lidar. As per the code,to get the complete range of lidar, the min_angle should be set to -3.14 and the max_angle should be set to 3.12. This gives a complete 360 degree range of lidar.
I have mounted the lidar such that the -x axis is facing the front side of the robot. So, I want to filter the laserscan to have a range of 180 degress. So , as per the axis and degree convention in the diagram rplidar_A2.png, I have set the min_angle to be -1.57 and max_angle to 1.57. But when I run the code, it throws an error immediately,
terminate called after throwing an instance of 'std::runtime_error'
what(): Time is out of dual 32-bit range
terminate called after throwing an instance of 'std::length_error'
what(): vector::_M_fill_insert"
terminate called after throwing an instance of 'std::runtime_error' what(): Time is out of dual 32-bit range terminate called after throwing an instance of 'std::length_error' what(): vector::_M_fill_insert"