mich1342/ros2_laser_scan_merger

Memory violation Error while launching merge_2_scan.launch.py

sa32953 opened this issue · 5 comments

Hello @mich1342

I am trying to run your code with ROS2 Humble. I have made following edits to your code:

  1. Changed the function called in line 47 of main.cpp to update_point_cloud().
  2. Edited the names of 2 Laser Scan topics in main.cpp and merge_2_scan.launch.py to "scan_1" and "scan_2" respectively.

The code does not run and shows a error, potentially related to memory/ address voilation. The RosNode respawns, resulting in same error and enters an endless loop of errors

ros2 launch ros2_laser_scan_merger merge_2_scan.launch.py
[INFO] [launch]: All log files can be found below /home/sahil0102/.ros/log/2023-10-10-22-22-33-805361-sahil0102-VirtualBox-101751
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [ros2_laser_scan_merger-1]: process started with pid [101752]
[ros2_laser_scan_merger-1] [INFO] [1696969354.347477654] [ros2_laser_scan_merger]: Hellofile:///home/sahil0102/preci_m/git/ros2_laser_scan_merger/launch/merge_2_scan.launch.py

[ERROR] [ros2_laser_scan_merger-1]: process has died [pid 101752, exit code -11, cmd '/home/sahil0102/preci_m/workspaces/catkin_rosbridge/install/ros2_laser_scan_merger/lib/ros2_laser_scan_merger/ros2_laser_scan_merger --ros-args --params-file /tmp/launch_params_c21jr5hh'].
[INFO] [ros2_laser_scan_merger-1]: process started with pid [101765]
[ros2_laser_scan_merger-1] [INFO] [1696969357.238776619] [ros2_laser_scan_merger]: Hello
[ERROR] [ros2_laser_scan_merger-1]: process has died [pid 101765, exit code -11, cmd '/home/sahil0102/preci_m/workspaces/catkin_rosbridge/install/ros2_laser_scan_merger/lib/ros2_laser_scan_merger/ros2_laser_scan_merger --ros-args --params-file /tmp/launch_params_c21jr5hh'].
^C[WARNING] [launch]: user interrupted with ctrl-c (SIGINT)

Did you also face this issue? Did you figure out a solution for this.

@mich1342 Hi Michael, did you perhaps get a chance to look into this?

Hi @sa32953,

I am sorry currently quite busy setting up a new AMR. Will check with the actual Lidars on next Thursday / Friday. Could you tell me more about the Lidars setup and topics published by them? Make sure the terminal where you run the merger could subscribe to both of the lidars. Thank you for your interest to this repo.

Best Regards

Michael Jonathan

Btw @sa32953,

Could you try to run the foxy branch in your setup? I have tested it several months ago and have not got any issues. Thank you

Best Regards

Michael Jonathan

Hi @sa32953 ,

I just check it using my machine, everything works well. FYI the function called update_point_cloud is not being used anymore and not intended to be used initially. I have push the latest code that should works fine. The RGB color is being used to effectively differentiate lidars data. Thank you.
Best Regards.

Michael

Thanks @mich1342,

I tried with the updated code using the update_point_cloud_rgb() functions. It works now. (Earlier, I was trying to run update_point_cloud() which gave me the mentioned error).

I will close this issue now.