ataparlar / loam-mapper

0 stars 1 forks source link

[ERROR] [loam_mapper-1]: process has died [ exit code -6, ... loam_mapping_ws/install/loam_mapper/share/loam_mapper/config/loam_mapper_params.yaml] #2

Open congphase opened 2 months ago

congphase commented 2 months ago

After running ros2 launch loam_mapper loam_mapper.launch.py in the README, I encountered the following output:

[INFO] [launch]: All log files can be found below /home/phase/.ros/log/2024-04-22-17-30-47-729969-pc-29541
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [loam_mapper-1]: process started with pid [29544]
[loam_mapper-1] [WARN] [1713781847.815252539] [rcl]: ROS_LOCALHOST_ONLY is deprecated but still honored if it is enabled. Use ROS_AUTOMATIC_DISCOVERY_RANGE and ROS_STATIC_PEERS instead.
[loam_mapper-1] [WARN] [1713781847.815264391] [rcl]: 'localhost_only' is enabled, 'automatic_discovery_range' and 'static_peers' will be ignored.
[loam_mapper-1] Probably empty lines at the end of csv, no problems: Too few columns in line 714430 in file "temp_pose_file.csv".
[loam_mapper-1] terminate called after throwing an instance of 'std::bad_alloc'
[loam_mapper-1]   what():  std::bad_alloc
[ERROR] [loam_mapper-1]: process has died [pid 29544, exit code -6, cmd '/home/phase/Fun/cars/oss/autoware_labs/loam_mapping_ws/install/loam_mapper/lib/loam_mapper/loam_mapper --ros-args --params-file /home/phase/Fun/cars/oss/autoware_labs/loam_mapping_ws/install/loam_mapper/share/loam_mapper/config/loam_mapper_params.yaml'].

My loam_mapper_params.yaml looks like:

$ cat /home/phase/Fun/cars/oss/autoware_labs/loam_mapping_ws/install/loam_mapper/share/loam_mapper/config/loam_mapper_params.yaml
/**:
  ros__parameters:
    pcap_dir_path: /home/phase/Downloads/ytu_campus_pcap_and_poses
    pose_txt_path: /home/phase/Downloads/ytu_campus_pcap_and_poses/ytu_campus_080423_ground_truth.txt
    pcd_export_directory: /home/phase/Downloads/ytu_campus_pcap_and_poses/output/

    map_origin_x: 658761.0
    map_origin_y: 4542599.0
    map_origin_z: 116.250886

    imu2lidar_roll: 179.623
    imu2lidar_pitch: -0.44
    imu2lidar_yaw: 0.675

    enable_ned2enu: true
    voxel_resolution: 0.2
    debug_mode: true

The tree structure of the paths used in loam_mapper_params.yaml looks like this:

$ tree /home/phase/Downloads/ytu_campus_pcap_and_poses
/home/phase/Downloads/ytu_campus_pcap_and_poses
├── output
├── ytu_campus_080423_ground_truth.txt
└── ytu_map_2_08_04_23.pcap

1 directory, 2 files

@ataparlar Can you tell what's wrong with my run?

ataparlar commented 2 months ago

Can you please try with this commit?

ataparlar commented 2 months ago

Hi @congphase

The error says that it is searching the pose txt file in wrong path:

what():  Can not open file "/home/ataparlar/data/task_spesific/loam_based_localization/mapping/pcap_and_poses/ytu_campus_080423_ground_truth.txt" because "No such file or directory".

You need the change the files in config/loam_mapper_params.yaml

Then it must work.

congphase commented 2 months ago

I checked out that commit, and made changes to paths in loam_mapper_params.yaml, and this is the output:

$ ros2 launch loam_mapper loam_mapper.launch.py
[INFO] [launch]: All log files can be found below /home/phase/.ros/log/2024-04-22-18-16-11-027359-pc-44428
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [loam_mapper-1]: process started with pid [44431]
[loam_mapper-1] [WARN] [1713784571.109845709] [rcl]: ROS_LOCALHOST_ONLY is deprecated but still honored if it is enabled. Use ROS_AUTOMATIC_DISCOVERY_RANGE and ROS_STATIC_PEERS instead.
[loam_mapper-1] [WARN] [1713784571.109856201] [rcl]: 'localhost_only' is enabled, 'automatic_discovery_range' and 'static_peers' will be ignored.
[loam_mapper-1] Probably empty lines at the end of csv, no problems: Too few columns in line 714430 in file "temp_pose_file.csv".
[loam_mapper-1] terminate called after throwing an instance of 'std::bad_alloc'
[loam_mapper-1]   what():  std::bad_alloc
[ERROR] [loam_mapper-1]: process has died [pid 44431, exit code -6, cmd '/home/phase/Fun/cars/oss/autoware_labs/loam_mapping_ws/install/loam_mapper/lib/loam_mapper/loam_mapper --ros-args --params-file /home/phase/Fun/cars/oss/autoware_labs/loam_mapping_ws/install/loam_mapper/share/loam_mapper/config/loam_mapper_params.yaml'].
ataparlar commented 2 months ago

How much RAM amount do you have? PCAP parser consumes too much RAM. You might want to split the PCAPs even smaller.

congphase commented 2 months ago

Hi @ataparlar, Sorry for the late response. My PC has 32GB of RAM. Here's part of the output from the system:

$ lshw -short
WARNING: you should run this program as super-user.
H/W path         Device        Class          Description
=========================================================
                               system         Computer
/0                             bus            Motherboard
/0/0                           memory         31GiB System memory
/0/1                           processor      Intel(R) Core(TM) i9-10885H CPU @ 2.40GHz
ataparlar commented 2 months ago

@congphase Can you try it again after updating the repo? I changed the structure a bit and it should work now. I got a similar error with you with the before version. Now it works fine for me.

congphase commented 2 months ago

Hi @ataparlar

Having checked out the main branch, installed geographiclib, point_cloud_msg_wrapper, split the PCAP file given in the data folder. Rebuilding and running ros2 launch loam_mapper loam_mapper.launch.py gives me this:

$ ros2 launch loam_mapper loam_mapper.launch.py
[INFO] [launch]: All log files can be found below /home/phase/.ros/log/2024-04-24-11-37-03-874677-pc-46944
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [loam_mapper-1]: process started with pid [46950]
[loam_mapper-1] [WARN] [1713933423.960196876] [rcl]: ROS_LOCALHOST_ONLY is deprecated but still honored if it is enabled. Use ROS_AUTOMATIC_DISCOVERY_RANGE and ROS_STATIC_PEERS instead.
[loam_mapper-1] [WARN] [1713933423.960208548] [rcl]: 'localhost_only' is enabled, 'automatic_discovery_range' and 'static_peers' will be ignored.
[loam_mapper-1] Probably empty lines at the end of csv, no problems: Too few columns in line 714430 in file "temp_pose_file.csv".
[loam_mapper-1] terminate called recursively
[loam_mapper-1] terminate called after throwing an instance of 'std::out_of_range'
[loam_mapper-1]   what():  vector::_M_range_check: __n (which is 714401) >= this->size() (which is 714401)
[ERROR] [loam_mapper-1]: process has died [pid 46950, exit code -6, cmd '/home/phase/Fun/cars/oss/autoware_labs/loam_mapping_ws/install/loam_mapper/lib/loam_mapper/loam_mapper --ros-args --params-file /home/phase/Fun/cars/oss/autoware_labs/loam_mapping_ws/install/loam_mapper/share/loam_mapper/config/loam_mapper_params.yaml'].

Looks like the vector range is not carefully handled.