Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RPLiDAR Node Crashes with std::bad_array_new_length #136

Open
grwells opened this issue Oct 3, 2023 · 1 comment
Open

RPLiDAR Node Crashes with std::bad_array_new_length #136

grwells opened this issue Oct 3, 2023 · 1 comment

Comments

@grwells
Copy link

grwells commented Oct 3, 2023

Hi I am working through the iRobot Create3 LiDAR SLAM tutorial and have run into the issue that when the rplidar composition node is running, no data is published to the /scan topic (partly because waiting for subscriber). Then, as soon as the topic is subscribed to, the rplidar node crashes with:

[rplidar_composition-2] [INFO] [1696367215.051876111] [rplidar_node]: RPLidar running on ROS2 package rplidar_ros. RPLIDAR SDK Version:2.0.0
[rplidar_composition-2] [INFO] [1696367215.102402199] [rplidar_node]: RPLidar S/N: B8D285C1E8839EF5C8E49BF668672B03
[rplidar_composition-2] [INFO] [1696367215.102533110] [rplidar_node]: Firmware Ver: 1.20
[rplidar_composition-2] [INFO] [1696367215.102564163] [rplidar_node]: Hardware Rev: 2
[rplidar_composition-2] [INFO] [1696367215.153908247] [rplidar_node]: RPLidar health status : 0
[rplidar_composition-2] [INFO] [1696367215.154012062] [rplidar_node]: RPLidar health status : OK.
[rplidar_composition-2] [INFO] [1696367215.154041670] [rplidar_node]: Start
[rplidar_composition-2] [INFO] [1696367218.303152989] [rplidar_node]: current scan mode: , sample rate: -2147483648 Khz, max_distance: 0.0 m, scan frequency:10.0 Hz, 
[rplidar_composition-2] terminate called after throwing an instance of 'std::bad_array_new_length'
[rplidar_composition-2]   what():  std::bad_array_new_length
[ERROR] [rplidar_composition-2]: process has died [pid 23925, exit code -6, cmd '/opt/ros/humble/lib/rplidar_ros/rplidar_composition --ros-args -r __ns:=/ --params-file /home/user/Documents/U_of_I/Robotics/create3_examples_ws/install/create3_lidar_slam/share/create3_lidar_slam/config/rplidar_node.yaml']. 

Comments

  1. Running ros2 launch create3_lidar_slam sensors_launch.py
  • node launches, no errors, and reports RPLiDAR health status: OK
  1. Subscribing with ros2 topic echo /scan

I am running Pop!_OS, ROS2 Humble, RPLiDAR ROS2 flavor of rplidar_ros repo, and have replicated these results on several different machines including my desktop and the RPi 4 I am using on the Create3.

As far as I can tell, this is an error internal to the rplidar_ros package, in the source code, but debug information is insufficient for someone unfamiliar with the project to trace. Some research indicates this is an array related error, but documentation in the code is scarce enough I would welcome any input before swimming through the code.

@grwells grwells changed the title No Scan Data Published by rplidar_composition Node RPLiDAR Node Crashes with std::bad_array_new_length Oct 3, 2023
@grwells
Copy link
Author

grwells commented Oct 11, 2023

Notes after further research and discussion in #138:

  1. I found more related issues in sllidar_ros2. These indicate that the potential solution is downgrading the SDK version.
  2. Alternatively, upgrade to a newer hardware revision, the A2M12 in my case.

Conclusion: fixing this bug is not a priority/doesn't have maintainer attention yet, so path of least resistance is to shell out for a new lidar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant