https://zhuanlan.zhihu.com/p/510712104
cd /apollo/
视觉测试:
1.启动dreamview,并选择车辆和地图
./scripts/bootstrap.sh
2.启动transform模块
cyber_launch start /apollo/modules/transform/launch/static_transform.launch
3.启动图像压缩模块
cyber_launch start modules/drivers/tools/image_decompress/launch/image_decompress.launch
4.启动障碍物检测模块
修改配置文件第10行和11行的内容
vim modules/perception/production/conf/perception/camera/fusion_camera_detection_component.pb.txt
为:
output_final_obstacles : true
output_obstacles_channel_name : "/apollo/perception/obstacles"
启动模块
mainboard -d modules/perception/production/dag/dag_streaming_perception_camera.dag
5.查看
5.1 查看日志
tail -f /apollo/data/log/mainboard.INFO
5.2 显存不再变化
watch -n 0.1 nvidia-smi
可以看一下之前显存是怎么变化的
6.播放离线数据,开始检测
cyber_recorder play -f /apollo/data/bag/demo_sensor_data_for_vision.record --loop
激光测试:
激光雷达要参照感知测试文档:
1.启动dreamview,并选择车辆和地图
./scripts/bootstrap.sh
2.启动transform模块
cyber_launch start /apollo/modules/transform/launch/static_transform.launch
3.启动障碍物检测模块
3.1在global_flagfile.txt 中加入:
--pointcloud_topic=/apollo/sensor/velodyne64/compensator/PointCloud2
3.2 将/apollo/modules/common/data/global_flagfile.txt中增加数据包中 pointcloud_topic 数据:
--pointcloud_topic=/apollo/sensor/velodyne64/compensator/PointCloud2 :
#--pointcloud_topic=/apollo/sensor/velodyne64/compensator/PointCloud2
config_file_path: "/apollo/modules/perception/production/conf/perception/lidar/velodyne64_detection_conf.pb.txt"
flag_file_path: "/apollo/modules/perception/production/conf/perception/perception_common.flag"
readers {
channel: "/apollo/sensor/velodyne64/compensator/PointCloud2"
3.3启动模块
mainboard -d /apollo/modules/perception/production/dag/dag_streaming_perception_lidar.dag
3.4 或启动launch 文件
cyber_launch start /apollo/modules/perception/production/launch/perception_lidar.launch
停止该节点是时候:cyber_launch stop /apollo/modules/perception/production/launch/perception_lidar.launch
4.查看
4.1 查看日志
tail -f /apollo/data/log/mainboard.INFO
4.2 显存不再变化
watch -n 0.1 nvidia-sm
i
5.播放离线数据,开始检测
cyber_recorder play -f /apollo/data/bag/demo_sensor_data_for_vision.record --loop
或者:
cyber_recorder play -f /apollo/data/bag/sensor_rgb.record -k /perception/vehicle/obstacles /apollo/perception/obstacles /apollo/perception/traffic_light /apollo/prediction
6.重现演示要先关闭节点
cyber_launch stop
7 日志查看:
/apollo/data/log/mainboard.log.INFO.时间
8 测试结果,报错误了。
RuntimeError: CUDA out of memory. Tried to allocate 108.00 MiB (GPU 0; 7.93 GiB total capacity; 1.90 GiB already allocated; 66.56 MiB free; 1.95 GiB reserved in total by PyTorch)
[perception_lidar]
看一下节点订阅关系,看一下GPU的占有率.
重启之后,GPU没有报问题。