前言
系统环境是Ubuntu 16.04,每完成一大步,将会把系统的完整镜像(VM Ware导出的虚拟机)发布到Github与Gitee,供使用。因为安装环境,本身是很耗费时间的,安装过程亦参考了网上很多的文章,踩了很多的坑,本系列旨在填坑,让后来人可以集中精力做实际的开发、学习。
每步会有步骤说明,命令的输出如果太多,就省略不再贴出来。
使用的设备是 Livox Horizon + 大华(Dahua) DH-IPC-HFW2433M-LED
Livox Driver 安装
ningdr@ubuntu:~/soft$ echo ==================第一步==================ningdr@ubuntu:~$ cd /home/ningdr/soft/autoware.ai/src/drivers/awf_driversningdr@ubuntu:~/soft/autoware.ai/src/drivers/awf_drivers$ ningdr@ubuntu:~/soft/autoware.ai/src/drivers/awf_drivers$ git clone /Livox-SDK/livox_autoware_driver.gitningdr@ubuntu:~/soft/autoware.ai/src/drivers/awf_drivers$ cd livox_autoware_driver/ningdr@ubuntu:~/soft/autoware.ai/src/drivers/awf_drivers/livox_autoware_driver$ cp -f ./scripts/* ~/soft/autoware.ai/src/autoware/utilities/runtime_manager/scripts/ningdr@ubuntu:~/soft$ echo ==================第二步==================ningdr@ubuntu:~/soft/autoware.ai/src/drivers/awf_drivers/livox_autoware_driver$ cd livox_ros_driver/ningdr@ubuntu:~/soft/autoware.ai/src/drivers/awf_drivers/livox_autoware_driver$ git clone /Livox-SDK/Livox-SDK.gitningdr@ubuntu:~/soft/autoware.ai/src/drivers/awf_drivers/livox_autoware_driver$ cd Livox-SDK/buildningdr@ubuntu:~/soft/autoware.ai/src/drivers/awf_drivers/livox_autoware_driver$ cmake ..ningdr@ubuntu:~/soft/autoware.ai/src/drivers/awf_drivers/livox_autoware_driver$ make && sudo make installningdr@ubuntu:~/soft$ echo ==================第三步==================ningdr@ubuntu:~/soft/autoware.ai/src/drivers/awf_drivers/livox_autoware_driver$ cd ~/soft/autoware.ai/ningdr@ubuntu:~/soft/autoware.ai$ colcon build --cmake-args -DCMAKE_BUILD_TYPE=Releaseningdr@ubuntu:~/soft$ echo ==================第四步==================ningdr@ubuntu:~/soft/autoware.ai$ echo "source /home/ningdr/soft/autoware.ai/install/setup.bash" >> ~/.bashrcningdr@ubuntu:~/soft/autoware.ai$ source ~/.bashrcningdr@ubuntu:~/soft/autoware.ai$ roslaunch runtime_manager runtime_manager.launch
等待启动后,即可看到 Livox
配置livox
查询 livox 点云的 topic
ningdr@ubuntu:~$ rostopic list/AnimateGlobalPlan/accel_cmd/astar_sim_obstacle/astar_sim_obstacle_array/behavior_state/behavior_state_array/brake_cmd/clicked_point/config/adjust_xy/config/approximate_ndt_mapping/config/car_dpm/config/car_fusion/config/car_kf/config/compare_map_filter/config/decision_maker/config/distance_filter/config/icp/config/lane_rule/config/lane_select/config/lattice_velocity_set/config/ndt/config/ndt_mapping/config/pedestrian_dpm/config/pedestrian_fusion/config/pedestrian_kf/config/random_filter/config/ray_ground_filter/config/ring_filter/config/ring_ground_filter/config/ssd/config/superimpose/config/twist_filter/config/velocity_set/config/voxel_grid_filter/config/waypoint_follower/config/waypoint_replanner/detected_polygons/detection_range/dp_planner_tracked_boxes/from_rtmgr/global_waypoints_mark/global_waypoints_rviz/gnss_stat/grid_map_filter_visualization/distance_transform/grid_map_filter_visualization/distance_transform_updates/health_aggregator/error_text/health_aggregator/fatal_text/health_aggregator/ok_text/health_aggregator/warn_text/initialpose/lf_stat/light_color_managed/linear_velocity_viz/livox/imu/livox/lidar/local_trajectories/local_waypoints_mark/move_base_simple/goal/ndt_monitor/ndt_info_text/ndt_stat/next_target_mark/next_target_mark_array/pmap_stat/points_cluster/points_map/rosout/rosout_agg/route_cmd/safety_border/safety_border_array/steer_cmd/tf/tf_static/to_rtmgr/topic1/topic2/trajectory_circle_mark/trajectory_circle_mark_array/twist_cmd/vector_map/vector_map_center_lines_rviz/vmap_stat/waypoint_guide/waypoint_guide_array/waypoint_saver_markerningdr@ubuntu:~$ # 查询 livox 点云 topic 的 frame_idningdr@ubuntu:~$ rostopic echo /livox/lidar | grep frame_idframe_id: "livox_frame"frame_id: "livox_frame"frame_id: "livox_frame"frame_id: "livox_frame"frame_id: "livox_frame"frame_id: "livox_frame"frame_id: "livox_frame"^Cningdr@ubuntu:~$
根据上面查询的数据,配置 rviz,即可看到点云图像
安装 Livox 的 Autoware 驱动,其实也安装了 Livox 的 ROS 驱动,可以直接使用命令查看 rviz 点云:
ningdr@ubuntu:~/soft/autoware.ai$ roslaunch livox_ros_driver livox_lidar_rviz.launch
也可以通过命令录制 bag 文件:
ningdr@ubuntu:~/soft/autoware.ai$ roslaunch livox_ros_driver livox_lidar_msg.launch# 新启动一个 terminalningdr@ubuntu:~/soft/autoware.ai$ rosbag record /livox/lidar