apollo icon indicating copy to clipboard operation
apollo copied to clipboard

Segmentation fault (core dumped) when run the offline_lidar_visualizer_tool

Open chasingw opened this issue 9 years ago • 8 comments

I follow the doc "how_to_run_offline_perception_visualizer.md" in docs/howto. when I have prepared pcd and pose data and built the offline perception visualizer. I try to run the /apollo/bazel-bin/modules/perception/tool/offline_visualizer_tool/offline_lidar_visualizer_tool but got Segmentation fault (core dumped), the following is some of the console output:

I0930 10:12:05.596755  5452 timer.cc:35] [DEBUG] TIMER lidar_roi_filter elapsed_time: 6 ms
I0930 10:12:05.604553  5452 timer.cc:35] [DEBUG] TIMER [CNNSeg] feature generation elapsed_time: 7 ms
I0930 10:12:05.632215  5452 timer.cc:35] [DEBUG] TIMER [CNNSeg] CNN forward elapsed_time: 27 ms
I0930 10:12:05.649706  5452 timer.cc:35] [DEBUG] TIMER [CNNSeg] clustering elapsed_time: 17 ms
I0930 10:12:05.651880  5452 timer.cc:35] [DEBUG] TIMER [CNNSeg] post-processing elapsed_time: 2 ms
I0930 10:12:05.651901  5452 lidar_process.cc:160] [DEBUG] call segmentation succ. The num of objects is: 0
I0930 10:12:05.651911  5452 timer.cc:35] [DEBUG] TIMER lidar_segmentation elapsed_time: 55 ms
I0930 10:12:05.651924  5452 lidar_process.cc:172] [DEBUG] call object_builder succ.
I0930 10:12:05.651931  5452 timer.cc:35] [DEBUG] TIMER lidar_object_builder elapsed_time: 0 ms
I0930 10:12:05.651937  5452 hm_tracker.cc:448] [DEBUG] velo2local_pose
000.969668 000.243903 -0.0159406 0000000000
0-0.244315 000.969118 -0.0334509 0000000000
0.00728954 00.0363308 000.999312 0000000000
0000000000 0000000000 0000000000 0000000001
I0930 10:12:05.652011  5452 timer.cc:35] [DEBUG] TIMER lidar_tracker elapsed_time: 0 ms
I0930 10:12:05.652017  5452 lidar_process.cc:189] [DEBUG] lidar process succ, there are 0 tracked objects.
E0930 10:12:05.653899  5452 offline_lidar_visualizer_tool.cc:120] transformed cloud size is 103916
I0930 10:12:05.653911  5452 frame_content.cc:35] initial pose 0000.969668 0000.243903 0-0.0159406 00000587251
00-0.244315 0000.969118 0-0.0334509 4.14152e+06
00.00728954 000.0363308 0000.999312 000-29.4684
00000000000 00000000000 00000000000 00000000001
I0930 10:12:05.653972  5452 frame_content.cc:36] offset = -587251  -4.14152e+06  29.4684
Segmentation fault (core dumped)

chasingw avatar Sep 30 '17 03:09 chasingw

What ROS bag did you use when running the offline visualizer? It requires the PCD and Pose data ready for running it. I cannot figure out the problem given the information provided. Would you upload the complete log file and show the topic information (by command "rostopic list ROS_BAG_NAME.bag") for helping me to diagnose the problem with more details? Thanks.

jzhuucla avatar Oct 02 '17 20:10 jzhuucla

@jzhuucla Thanks for your reply.

  1. I use the Apollo1.5_demo.bag and I do prepared the PCD and Pose data(by Launch the PCD exporter, Play ROS bag and run gen_pose_file.py)
  2. sorry, I dont know where to find the log file, the following is the complete console log

chasingw avatar Oct 11 '17 09:10 chasingw

You mentioned that you used the Apollo1.5_demo.bag. Did you use the one in the directory "docs/demo_guide/demo_1.5.bag"? This demo bag actually does not have point cloud messages (e.g., /apollo/sensor/velodyne64/compensator/PointCloud2), so there was not any PCD and Pose data dumped when you ran the PCD exporter and played the bag. Please contact the Apollo data open platform (http://apollo.auto/opendata.html) to access the bags including the Lidar point cloud. Thanks.

jzhuucla avatar Oct 12 '17 23:10 jzhuucla

@jzhuucla I just use the data download from the Apollo data open platform. And I found the the log Failed to initialize the window ! . so I run the command /apollo/bazel-bin/modules/perception/tool/offline_visualizer_tool/offline_lidar_visualizer_tool --enable_visualization=false, and it works. so how can I see a pop-up window showing the perception result in docker?

chasingw avatar Oct 13 '17 09:10 chasingw

Do you use the latest code of Apollo? What about the docker tag did you use (you may find it in "apollo/docker/scripts/dev_start.sh", e.g., the latest version is "VERSION_X86_64="dev-x86_64-20171013_1336"")? Would you upload the log which shows the error to help diagnostic for me? Thanks.

jzhuucla avatar Oct 19 '17 00:10 jzhuucla

@jzhuucla the problem still occur when I use the latest code of Apollo (which version is "VERSION_X86_64="dev-x86_64-20171103_2113" ), and I found some error log is

I1107 11:53:56.983589 20058 glfw_viewer.cc:64] GLFWViewer::initialize()
libGL error: failed to load driver: swrast
E1107 11:53:57.098266 20058 glfw_viewer.cc:134] Failed to create glfw window!
I1107 11:53:57.098434 20058 glfw_viewer.cc:71]  Failed to initialize the window !
I1107 11:53:57.098440 20058 opengl_visualizer.cc:35] Failed to initialize opengl viewer
E1107 11:53:57.098445 20058 offline_lidar_visualizer_tool.cc:65] init visialuzer failed
...
Segmentation fault (core dumped) 

Would you give me some suggestions?

chasingw avatar Nov 07 '17 04:11 chasingw

@chasingw install the nvidia driver with the opengl

muwenhu avatar Nov 16 '17 14:11 muwenhu

@wanglei828 Hi, I meet the same problem. Has this problem been fixed?

============================================

After running offline_lidar_visualizer_tool (no matter with a GPU and without a GPU): ... ... I0523 15:27:08.137200 708 glfw_viewer.cc:65] GLFWViewer::initialize() Segmentation fault (core dumped)

At the same time, dmesg gets: offline_lidar_v[20097]: segfault at 0 ip 00007fff9ec688ee sp 00007fffffffde00 error 4 in libglfw.so.3.0[7fff9ec5c000+12000]

It seems that the OPENGL library fails to open the window.

============================================

If disabling visualization, the program does not crash but outputs something as follow:

Failed to find match for field 'intensity'. Failed to find match for field 'h'. E0523 15:33:39.601167 720 hdmap_util.cc:116] RelativeMap adapter is not registered I0523 15:33:39.601176 720 timer.cc:37] [DEBUG] TIMER lidar_get_roi_from_hdmap elapsed_time: 0 ms E0523 15:33:39.601179 720 lidar_process.cc:128] failed to call roi filter. I0523 15:33:39.601183 720 offline_lidar_visualizer_tool.cc:133] finish pc I0523 15:33:39.601186 720 offline_lidar_visualizer_tool.cc:92] Frame 3558 I0523 15:33:39.601189 720 offline_lidar_visualizer_tool.cc:95] load pcd file from file path/apollo/data/pcd/3559.pcd

============================================

Any suggestions? Thanks.

sjtugjy avatar May 23 '18 07:05 sjtugjy