让ROS知道此yaml的存在
用例使用此yaml文件
# 文件名为 test.yaml
max_points: 70000
attr_num: 4
benewake:
point_cloud_range: [0, -46.08, -1, 92.16, 46.08, 4.6]
tanway:
point_clod_range: [-46.08, 0, -1, 46.08, 92.16, 4.6]
LIDAR:
fov_up: 3.0
fov_down: -25.0
bev_map:
voxel_size: [0.16, 0.16, 5.6]
grid_size: [576, 576, 1]
range_map:
proj_H: 96
proj_W: 960
<launch>
<param name="/use_sim_time" value="true"/>
<node pkg="perception" name="perception_node" type="perception_node" output="screen" >
<param name="XXX", type="XXX", value="XXX"/>
<!-- rosparam file="$(find <pkg_name>)/config/test.yaml" command="load" -->
<!-- 载入 test.yaml 让 ros 知道它的存在 -->
<rosparam file="$(find perception)/config/test.yaml" command="load"/>
</node>
</launch>
各类型用例
c++ 基本类型(base_type)
ros::NodeHandle nh;
int max_points, attr_num;
nh.getParam("max_points", max_points);
nh.getParam("attr_num", attr_num);
std::vector
std::vector<float> voxel_size, point_cloud_range;
std::vector<int> grid_size;
ros::NodeHandle nh;
nh.getParam("bev_map/voxel_size", voxel_size);
nh.getParam("bev_map/grid_size", grid_size);
nh.getParam("benewake/point_cloud_range", point_cloud_range);