ApolloAuto / apollo

An open autonomous driving platform
Apache License 2.0
25.28k stars 9.72k forks source link

[Offline Perception Visualizer] Failed to find match for field. #2362

Closed 1duo closed 6 years ago

1duo commented 6 years ago

Trying to run https://github.com/ApolloAuto/apollo/blob/master/docs/howto/how_to_run_offline_perception_visualizer.md.

Issue:

Failed to find match for field 'intensity'.
Failed to find match for field 'h'.

More details:

I0104 14:37:27.810307 27830 offline_lidar_visualizer_tool.cc:77] starting to run
I0104 14:37:27.869201 27830 offline_lidar_visualizer_tool.cc:80]  pose size 3808
I0104 14:37:27.869215 27830 offline_lidar_visualizer_tool.cc:81]  pcd size 3808
I0104 14:37:27.869220 27830 offline_lidar_visualizer_tool.cc:88] starting frame is 1
I0104 14:37:28.869283 27830 offline_lidar_visualizer_tool.cc:91] ***************** Frame 0 ******************
I0104 14:37:28.869321 27830 offline_lidar_visualizer_tool.cc:94] load pcd file from file path/apollo/data/pcd/1.pcd
Failed to find match for field 'intensity'.
Failed to find match for field 'h'.
E0104 14:37:28.884354 27830 hdmap_util.cc:36] No existing file found in /apollo/modules/map/data/sunnyvale_big_loop/base_map.bin|base_map.xml|base_map.txt. Fallback to first candidate as default result.
I0104 14:37:28.884380 27830 hdmap.cc:24] Loading HDMap: /apollo/modules/map/data/sunnyvale_big_loop/base_map.bin...
E0104 14:37:28.884397 27830 file.h:139] Failed to open file /apollo/modules/map/data/sunnyvale_big_loop/base_map.bin in binary mode.
E0104 14:37:28.884481 27830 file.h:96] Failed to open file /apollo/modules/map/data/sunnyvale_big_loop/base_map.bin in text mode.
E0104 14:37:28.884490 27830 hdmap_util.cc:62] Failed to load HDMap /apollo/modules/map/data/sunnyvale_big_loop/base_map.bin
I0104 14:37:28.884510 27830 timer.cc:37] [DEBUG] TIMER lidar_get_roi_from_hdmap elapsed_time: 0 ms
I0104 14:37:28.884531 27830 lidar_process.cc:133] [DEBUG] call roi_filter succ. The num of roi_cloud is: 0
I0104 14:37:28.884557 27830 timer.cc:37] [DEBUG] TIMER lidar_roi_filter elapsed_time: 0 ms
I0104 14:37:28.884569 27830 lidar_process.cc:155] [DEBUG] call segmentation succ. The num of objects is: 0
I0104 14:37:28.884580 27830 timer.cc:37] [DEBUG] TIMER lidar_segmentation elapsed_time: 0 ms
I0104 14:37:28.884603 27830 lidar_process.cc:167] [DEBUG] call object_builder succ.
I0104 14:37:28.884610 27830 timer.cc:37] [DEBUG] TIMER lidar_object_builder elapsed_time: 0 ms
I0104 14:37:28.884624 27830 lidar_process.cc:182] [DEBUG] call tracker succ, there are 0 tracked objects.
I0104 14:37:28.884639 27830 timer.cc:37] [DEBUG] TIMER lidar_tracker elapsed_time: 0 ms
I0104 14:37:28.884656 27830 lidar_process.cc:196] [DEBUG] lidar process succ.
I0104 14:37:28.884672 27830 timer.cc:37] [DEBUG] TIMER lidar_type_fuser elapsed_time: 0 ms
Segmentation fault (core dumped)

Steps:

Mostly followed https://github.com/ApolloAuto/apollo/blob/master/docs/howto/how_to_run_offline_perception_visualizer.md.

cd apollo
bash docker/scripts/dev_start.sh
bash docker/scripts/dev_into.sh
roslaunch velodyne export_pcd_offline.launch

cd /apollo/data/bag
rosbag play --clock Apollo1.5_demo.bag 

cd /apollo/modules/perception/tool
python gen_pose_file.py /apollo/data/pcd

What is the reason for that? Any idea how to make it match? Thanks in advance!

1duo commented 6 years ago

Regenerated PCD and pose files, it seems matched. However, still cannot start visualizer_tool:

I0104 18:44:52.334465   110 cnn_segmentation.cc:82] using Caffe GPU mode
I0104 18:44:52.349375   110 lidar_process.cc:272] Init algorithm plugin successfully, segmentor: CNNSegmentation
I0104 18:44:52.349431   110 lidar_process.cc:286] Init algorithm plugin successfully, object builder: MinBoxObjectBuilder
I0104 18:44:52.349449   110 hm_tracker.cc:300] matcher method of HmObjectTracker is hungarian_matcher
I0104 18:44:52.349459   110 object_track.cc:42] filter method of object track is kalman_filter
I0104 18:44:52.349465   110 object_track.cc:53] track cached history size maximum of object track is 5
I0104 18:44:52.349472   110 object_track.cc:393] track consecutive invisible maximum of object track set is 1
I0104 18:44:52.349480   110 object_track.cc:405] track visible ratio minimum of object track set is 0.6
I0104 18:44:52.349534   110 hm_tracker.cc:323] collect age minimum of HmObjectTracker is 0
I0104 18:44:52.349540   110 hm_tracker.cc:312] collect consecutive invisible maximum of HmObjectTracker is 0
I0104 18:44:52.349547   110 object_track.cc:76] acceleration noise maximum of object track is 5
I0104 18:44:52.349555   110 object_track.cc:64] speed noise maximum of object track is 0.4
I0104 18:44:52.349565   110 hungarian_matcher.cc:36] match distance maximum of HungarianMatcher is 4
I0104 18:44:52.349572   110 track_object_distance.cc:37] location distance weight of TrackObjectDistance is 0.6
I0104 18:44:52.349581   110 track_object_distance.cc:49] direction distance weight of TrackObjectDistance is 0.2
I0104 18:44:52.349589   110 track_object_distance.cc:61] bbox size distance weight of TrackObjectDistance is 0.1
I0104 18:44:52.349597   110 track_object_distance.cc:73] point num distance weight of TrackObjectDistance is 0.1
I0104 18:44:52.349604   110 track_object_distance.cc:85] histogram distance weight of TrackObjectDistance is 0.5
I0104 18:44:52.349611   110 hm_tracker.cc:334] histogram bin size of HmObjectTracker is 10
I0104 18:44:52.349619   110 kalman_filter.cc:38] use adaptive of KalmanFilter is 1
I0104 18:44:52.349624   110 kalman_filter.cc:45] association score maximum of KalmanFilter is 4
I0104 18:44:52.349634   110 kalman_filter.cc:90] measurment noise of KalmanFilter is 0.4
I0104 18:44:52.349642   110 kalman_filter.cc:91] initial velocity noise of KalmanFilter is 5
I0104 18:44:52.349647   110 kalman_filter.cc:93] propagation noise of KalmanFilter is
10 00 00
00 10 00
00 00 10
I0104 18:44:52.349687   110 kalman_filter.cc:57] breakdown threshold maximum of KalmanFilter is 10
I0104 18:44:52.349696   110 lidar_process.cc:300] Init algorithm plugin successfully, tracker: HmObjectTracker
I0104 18:44:52.349706   110 lidar_process.cc:313] Init algorithm plugin successfully, type_fuser: DummyTypeFuser
I0104 18:44:52.349720   110 glfw_viewer.cc:64] GLFWViewer::initialize()
libGL error: failed to load driver: swrast
E0104 18:44:53.493954   110 glfw_viewer.cc:134] Failed to create glfw window!
I0104 18:44:53.494798   110 glfw_viewer.cc:71]  Failed to initialize the window !
E0104 18:44:53.494832   110 opengl_visualizer.cc:35] Failed to initialize opengl viewer
E0104 18:44:53.494844   110 offline_lidar_visualizer_tool.cc:65] Init visialuzer failed
I0104 18:44:53.494921   110 offline_lidar_visualizer_tool.cc:77] starting to run
I0104 18:44:53.558010   110 offline_lidar_visualizer_tool.cc:80]  pose size 3232
I0104 18:44:53.558035   110 offline_lidar_visualizer_tool.cc:81]  pcd size 3232
I0104 18:44:53.558044   110 offline_lidar_visualizer_tool.cc:88] starting frame is 1
I0104 18:44:54.558148   110 offline_lidar_visualizer_tool.cc:91] ***************** Frame 0 ******************
I0104 18:44:54.558241   110 offline_lidar_visualizer_tool.cc:94] load pcd file from file path/apollo/data/pcd/1.pcd
Failed to find match for field 'intensity'.
Failed to find match for field 'h'.
I0104 18:44:54.576930   110 hdmap_input.cc:82] [DEBUG] Get road boundaries : num_boundary = 8 num_junction = 3
I0104 18:44:54.577018   110 hdmap_input.cc:187] [DEBUG] Points num < 3, so no need to downsample.
I0104 18:44:54.577038   110 hdmap_input.cc:187] [DEBUG] Points num < 3, so no need to downsample.
I0104 18:44:54.577059   110 hdmap_input.cc:187] [DEBUG] Points num < 3, so no need to downsample.
I0104 18:44:54.577083   110 hdmap_input.cc:187] [DEBUG] Points num < 3, so no need to downsample.
I0104 18:44:54.577105   110 hdmap_input.cc:187] [DEBUG] Points num < 3, so no need to downsample.
I0104 18:44:54.577116   110 hdmap_input.cc:187] [DEBUG] Points num < 3, so no need to downsample.
I0104 18:44:54.577139   110 hdmap_input.cc:187] [DEBUG] Points num < 3, so no need to downsample.
I0104 18:44:54.577153   110 hdmap_input.cc:187] [DEBUG] Points num < 3, so no need to downsample.
I0104 18:44:54.577174   110 hdmap_input.cc:187] [DEBUG] Points num < 3, so no need to downsample.
I0104 18:44:54.577191   110 hdmap_input.cc:187] [DEBUG] Points num < 3, so no need to downsample.
I0104 18:44:54.577257   110 timer.cc:37] [DEBUG] TIMER lidar_get_roi_from_hdmap elapsed_time: 1 ms
I0104 18:44:54.584744   110 lidar_process.cc:133] [DEBUG] call roi_filter succ. The num of roi_cloud is: 49717
I0104 18:44:54.584772   110 timer.cc:37] [DEBUG] TIMER lidar_roi_filter elapsed_time: 7 ms
I0104 18:44:54.593225   110 timer.cc:37] [DEBUG] TIMER [CNNSeg] feature generation elapsed_time: 8 ms
I0104 18:44:54.638375   110 timer.cc:37] [DEBUG] TIMER [CNNSeg] CNN forward elapsed_time: 45 ms
I0104 18:44:54.655086   110 timer.cc:37] [DEBUG] TIMER [CNNSeg] clustering elapsed_time: 16 ms
I0104 18:44:54.661706   110 timer.cc:37] [DEBUG] TIMER [CNNSeg] post-processing elapsed_time: 6 ms
I0104 18:44:54.661741   110 lidar_process.cc:155] [DEBUG] call segmentation succ. The num of objects is: 1
I0104 18:44:54.661751   110 timer.cc:37] [DEBUG] TIMER lidar_segmentation elapsed_time: 76 ms
I0104 18:44:54.662142   110 lidar_process.cc:167] [DEBUG] call object_builder succ.
I0104 18:44:54.662158   110 timer.cc:37] [DEBUG] TIMER lidar_object_builder elapsed_time: 0 ms
I0104 18:44:54.662168   110 hm_tracker.cc:428] [DEBUG] velo2local_pose
000.969622 000.244099 -0.0158281 0000000000
0-0.244506 000.969072 -0.0334254 0000000000
0.00717948 00.0362801 000.999316 0000000000
0000000000 0000000000 0000000000 0000000001
I0104 18:44:54.662287   110 lidar_process.cc:182] [DEBUG] call tracker succ, there are 1 tracked objects.
I0104 18:44:54.662299   110 timer.cc:37] [DEBUG] TIMER lidar_tracker elapsed_time: 0 ms
I0104 18:44:54.662308   110 lidar_process.cc:196] [DEBUG] lidar process succ.
I0104 18:44:54.662319   110 timer.cc:37] [DEBUG] TIMER lidar_type_fuser elapsed_time: 0 ms
E0104 18:44:54.664278   110 offline_lidar_visualizer_tool.cc:120] transformed cloud size is 103930
I0104 18:44:54.664301   110 frame_content.cc:37] initial pose 0000.969622 0000.244099 0-0.0158281 00000587250
00-0.244506 0000.969072 0-0.0334254 4.14152e+06
00.00717948 000.0362801 0000.999316 000-29.4737
00000000000 00000000000 00000000000 00000000001
I0104 18:44:54.664372   110 frame_content.cc:38] offset = -587250  -4.14152e+06  29.4737
Segmentation fault (core dumped)
chucklqsun commented 6 years ago

It seems graphic lib does not work well. Do you use command "sudo ./NVIDIA-Linux-x86_64-375.39.run --no-opengl-files -a -s" to install nvidia driver in both docker and host?

I0104 18:44:52.349720   110 glfw_viewer.cc:64] GLFWViewer::initialize()
libGL error: failed to load driver: swrast
E0104 18:44:53.493954   110 glfw_viewer.cc:134] Failed to create glfw window!
I0104 18:44:53.494798   110 glfw_viewer.cc:71]  Failed to initialize the window !
1duo commented 6 years ago

@chucklqsun Thanks for your help. Yes, I have both drivers installed and the versions matched. Any other possibility I need to check?

chucklqsun commented 6 years ago

@1duo I encountered this issue when I installed the driver on both host and container with the correct version but without arguments " --no-opengl-files -a -s"。So I guess it is not version issue, but opengl files issue.

1duo commented 6 years ago

@chucklqsun Many thanks for pointing it out! I'll have a try shortly.

JonathanJones92 commented 6 years ago

@1duo have you figure out? Has it been successful?

xiaohuitu commented 6 years ago

@1duo @JonathanJones92 I also have the same experience with @chucklqsun , and solved the libGL error by reinstalling the driver with arguments " --no-opengl-files -a -s".

xiaoxq commented 6 years ago

The HDMap is missing.

E0104 14:37:28.884490 27830 hdmap_util.cc:62] Failed to load HDMap /apollo/modules/map/data/sunnyvale_big_loop/base_map.bin

Could you restart the dev container, and check if the map exists: /apollo/modules/map/data/sunnyvale_big_loop ?

1duo commented 6 years ago

Hi @xiaoxq , does this looks good? Did not see "big".

[yuduo@workstation2 data]$ pwd
/home/yuduo/apollo/modules/map/data
[yuduo@workstation2 data]$ ls
demo  README.md  sunnyvale_loop
[yuduo@workstation2 data]$ ls sunnyvale_loop/
base_map.bin  base_map_test.bin  base_map.xml               routing_map.bin  sim_map.bin
base_map.lb1  base_map.txt       default_end_way_point.txt  routing_map.txt  sim_map.txt
xiaoxq commented 6 years ago

Interesting. May I know your code base version and docker image version? They might be outdated.

I reset the map dir and start a new container. Everything looks good.

rm -fr modules/map/data
git checkout modules/map/data

bash docker/scripts/dev_start.sh
ls -al modules/map/data
1duo commented 6 years ago

@xiaoxq The code base was Release 2.0.0 tag released this 21 days ago as of today. I can try with latest master branch too.

xiaoxq commented 6 years ago

Could you grep "sunnyvale_big_loop" in the code and docs? I'm wondering where it is referenced, as I didn't find it when switched to r2.0.0.

The default flagfile points to "sunnyvale_loop": https://github.com/ApolloAuto/apollo/blob/r2.0.0/modules/common/data/global_flagfile.txt

1duo commented 6 years ago

@xiaoxq True, not found in r2.0.0.

➜  apollo-2.0.0 grep -r sunnyvale_big_loop .
grep: ./data/core/core_offline_lidar_v.11125: Permission denied

I guess it's been changed recently, second log could be from master branch, not r2.0.0.

zhxt commented 6 years ago

@xiaoxq @1duo I think I know this, it was changed in rivision 4d00bd20525facad6aafd0397b74993055ffcb68

I have saw many error saying:

hdmap.cc:24] Loading HDMap: /apollo/modules/map/data/sunnyvale_big_loop/sim_map.bin...

hdmap_util.cc:36] No existing file found in /apollo/modules/map/data/sunnyvale_big_loop/base_map.bin|base_map.xml|base_map.txt. Fallback to first candidate as default result.

file.h:139] Failed to open file /apollo/modules/map/data/sunnyvale_big_loop/sim_map.bin in binary mode.

hdmap_util.cc:62] Failed to load HDMap /apollo/modules/map/data/sunnyvale_big_loop/sim_map.bin

simulation_world_updater.cc:277] Failed to load default list of POI from /apollo/modules/map/data/sunnyvale_big_loop/default_end_way_point.txt

in logs many days ago.

albe81x commented 6 years ago

Hi all, I had a segmentation fault error while trying to execute the perception visualizer.

_### I0615 16:46:30.494514 3994 kalman_filter.cc:58] breakdown threshold maximum of KalmanFilter is 10 I0615 16:46:30.494521 3994 lidar_process.cc:300] Init algorithm plugin successfully, tracker: HmObjectTracker I0615 16:46:30.494535 3994 lidar_process.cc:313] Init algorithm plugin successfully, type_fuser: DummyTypeFuser I0615 16:46:30.494570 3994 glfwviewer.cc:65] GLFWViewer::initialize()

I have built the perception visualizer using: _av@in_dev_docker:/apollo$ bazel build -c opt -c dbg --cxxopt=-DUSE_CAFFE_GPU //modules/perception/tool/offline_visualizer_tool:offline_lidar_visualizertool

and got the folllowing backtrace: _### #0 0x00007fff9c9128ee in ?? () from /usr/lib/x86_64-linux-gnu/libglfw.so.3

1 0x00007fff9c911c81 in ?? () from /usr/lib/x86_64-linux-gnu/libglfw.so.3

2 0x00007fff9c90d102 in glfwCreateWindow () from /usr/lib/x86_64-linux-gnu/libglfw.so.3

3 0x00007ffff4dbcf12 in apollo::perception::GLFWViewer::WindowInit (this=0x7fff38895150)

at modules/perception/obstacle/lidar/visualizer/opengl_visualizer/glfw_viewer.cc:133 

4 0x00007ffff4dbcaa9 in apollo::perception::GLFWViewer::Initialize (this=0x7fff38895150)

at modules/perception/obstacle/lidar/visualizer/opengl_visualizer/glfw_viewer.cc:71 

5 0x00007ffff4dccbac in apollo::perception::OpenglVisualizer::Init (this=0x7fff3879f220)

at modules/perception/obstacle/lidar/visualizer/opengl_visualizer/opengl_visualizer.cc:35 

6 0x00000000004a43ec in apollo::perception::OfflineLidarPerceptionTool::Init (this=0x7fffffffe0d0, use_visualization=true)

at modules/perception/tool/offline_visualizer_tool/offline_lidar_visualizer_tool.cc:64 

7 0x00000000004a10be in main (argc=1, argv=0x7fffffffe1d8)

at modules/perception/tool/offline_visualizer_tool/offline_lidar_visualizer_tool.cc:224_ 

Does anybody knows why the glfwCreateWindow(winwidth, winheight, "openglvisualizer", nullptr, nullptr) function inside /apollo/modules/perception/obstacle/lidar/visualizer/opengl_visualizer/glfwviewer.cc may cause such a segmentation fault in the visualizer tool? PS I have verified that glxinfo and glxgears tools are correctly working inside my docker using nvidia 384.130 drivers and CUDA 8.0 installed inside my Ubuntu 14.04

Thanks for your support

natashadsouza commented 6 years ago

@albe81x do you still see this issue?

albe81x commented 6 years ago

Hi Natasha, yes I did not have the chance to progress further on this topic. Do you have any suggestion or update about it?

Thanks for your support, Alberto

natashadsouza commented 6 years ago

@albe81x could you give me more details about your system?

RezaMehrabian commented 4 years ago

Any update in this error?