"terminate call after throwing an instance of 'std::length_error'" while running Cartographer

asked 2022-10-10 03:27:43 -0500

maino.LEE gravatar image

updated 2022-10-13 05:27:12 -0500

ravijoshi gravatar image

Robot Model : ROBOTIS Turtlebot3 burger & Waffle-pi Model

Lidar Model : LDS-02

ROS Version : Ros 2 Foxy Fitzroy

ROS environment variables :

  • ROS_VERSION=2
  • ROS_PYTHON_VERSION=3
  • ROS_DOMAIN_ID=30
  • ROS_LOCALHOST_ONLY=0
  • ROS_DISTRO=foxy

System and environment details:

  • OS : Ubuntu 20.04.5 Focal Fossa LTS
  • Rviz2 package Version : 8.2.7
  • Cartographer package : turtlebot3_cartographer
  • Cartographer Version : 2.1.4
  • Bringup package : turtlebot3_bringup
  • Bringup Version : 2.1.4

I'm using the turtlebot3 robot from ROBOTIS Company to study

I followed all the manuals provided on the Website sequentially

But it stops with the following error.

[cartographer_node-1] terminate called after throwing an instance of 'std::length_error'

[cartographer_node-1] what() : cannot create std::vector larger than max_size()

[ERROR] [cartographer_node-1]: process has died [pid 8332, exit code -6, cmd '/opt/ros/foxy/lib/cartographer_ros/cartographer_node -configuration_directory /home/minho/turtlebot3_ws/install/turtlebot3_cartographer/share/turtlebot3_cartographer/config -configuration_basename turtlebot3_lds_2d.lua --ros-args -r __node:=cartographer_node --params-file /tmp/launch_params_14prxt8_'].

These are the things I've tried to troubleshoot.

  1. Reinstall the package

  2. Change Lidar sensor LDS-02 to LDS-01

  3. Check the .bashrc file and typo correction ( e.g - export TURTLEBOT3_MODEL or LDS_MODEL )


I think there is an error in the code part where the package is provided or the LDS model is not compatible yet

This is because the package I received about a year ago worked without any problems at all

If this is not the case or if anyone has solved the same problem, please help.

edit retag flag offensive close merge delete