rplidar.lua

参数意义部分内容转自 https://blog.csdn.net/qq_29796781/article/details/78969734 及 http://www.cnblogs.com/Ezekiel/p/9907812.html

相较于之前版本的lua_parameter_dictionary.cc 多了几个key需要配置 use_nav_sat use_landmarks 等等
SPARSE_POSE_GRAPH变成了POSE_GRAPH

include "map_builder.lua"
include "trajectory_builder.lua"

options = {
    map_builder = MAP_BUILDER,
    trajectory_builder = TRAJECTORY_BUILDER,
    map_frame = "map",
    tracking_frame = "base_link",
    published_frame = "odom",
    odom_frame = "odom",
    provide_odom_frame = false,
    publish_frame_projected_to_2d = false,
    use_odometry = true,
    use_nav_sat = false,
    use_landmarks = false, 
    num_laser_scans = 1,
    num_multi_echo_laser_scans = 0,
    num_subdivisions_per_laser_scan = 1,
    num_point_clouds = 0,
    lookup_transform_timeout_sec = 0.2,
    submap_publish_period_sec = 0.3,
    pose_publish_period_sec = 5e-3,
    trajectory_publish_period_sec = 30e-3,
    rangefinder_sampling_ratio = 1.,
    odometry_sampling_ratio = 1.,
    fixed_frame_pose_sampling_ratio = 1.,
    landmarks_sampling_ratio = 1.,
    imu_sampling_ratio = 1.,}

MAP_BUILDER.use_trajectory_builder_2d = true

TRAJECTORY_BUILDER_2D.submaps.num_range_data = 35
TRAJECTORY_BUILDER_2D.min_range = 0.3
TRAJECTORY_BUILDER_2D.max_range = 8.
TRAJECTORY_BUILDER_2D.missing_data_ray_length = 1.
TRAJECTORY_BUILDER_2D.use_imu_data = false
TRAJECTORY_BUILDER_2D.use_online_correlative_scan_matching = true
TRAJECTORY_BUILDER_2D.real_time_correlative_scan_matcher.linear_search_window = 0.1
TRAJECTORY_BUILDER_2D.real_time_correlative_scan_matcher.translation_delta_cost_weight = 10.
TRAJECTORY_BUILDER_2D.real_time_correlative_scan_matcher.rotation_delta_cost_weight = 1e-1
POSE_GRAPH.optimization_problem.huber_scale = 1e2
POSE_GRAPH.optimize_every_n_nodes = 35
POSE_GRAPH.constraint_builder.min_score = 0.65
--SPARSE_POSE_GRAPH.optimization_problem.huber_scale = 1e2
--SPARSE_POSE_GRAPH.optimize_every_n_scans = 35
--SPARSE_POSE_GRAPH.constraint_builder.min_score = 0.65

return options
  • 地图坐标系 map_frame = “map”

  • map_frame
    地图坐标系,用来发布子地图的ROS坐标系ID,位姿的父坐标系,通常是“map”

  • tracking_frame
    建图时跟踪的坐标系 如果使用了IMU应该是IMU的位置 尽管它可能转动了
    常用的选择是“imu_link”(一博主这么说) 但是我见到的都是base_link

  • published_frame
    作为发布位置的子坐标系的ROS坐标系ID,对于“odom”例程,如果系统的其他地方提供“odom”坐标系,那么“odom”在map_frame中的位置将会被发布,否则,设置为“base_link”即可。

  • odom_frame
    “provide_odom_frame”为真时使用,位于“published_frame ”和“map_frame”之间,用来发布本地SLAM结果(非闭环),通常是“odom”。

  • provide_odom_frame
    如果使能,这个局部的,非闭环的,连续的“odom_frame ”在“map_frame”中的位置将被发布。

  • use_odometry
    如果使能,将订阅nav_msgs/Odometry类型的topic “odom”,这种情况下,必须提供里程计,而且里程计的信息将被包含在SLAM中。

  • num_laser_scans
    订阅的laser scan topics的个数,对于单个激光,订阅sensor_msgs/LaserScan类型的“scan”topic(ensor_msgs/LaserScan这个topic 将被用SLAM的输入)
    对于多个激光,topics为“scan_1”, “scan_2”…(如果num_laser_scans大于1,那么多个被编号的scan topics
    (比如scan1、scan2、scan3、……直到并包括num_laser_scans)将被用作SLAM的输入)

  • num_multi_echo_laser_scans
    订阅多回波技术laser scan topics的个数,对于单个激光,订阅sensor_msgs/MultiEchoLaserScan类型的“echoes”topic,对于多个激光,topics为“echoes_1”, “echoes_2”…。

  • num_subdivisions_per_laser_scan
    接收到的(多回波)laser scan中分离出来的点云的个数,分割scan能够保证在激光设备移动的过程中scans不弯曲变形。有相应的轨迹生成器选项可以将分离的scans累积到点云中,用来进行scan matching。

  • num_point_clouds
    订阅的点云topics 的个数,对于单个测距仪,订阅sensor_msgs/PointCloud2类型的“points2”topic,对于多个测距仪,topics为“points2_1”, “points2_2”…。

  • lookup_transform_timeout_sec
    使用tf2进行转换搜素的超时时间的秒数。

  • submap_publish_period_sec
    发布submap 位置的间隔秒数,如0.3s。

  • pose_publish_period_sec
    发布位置的间隔秒数,如5e-3对应200Hz,即5ms

  • trajectory_publish_period_sec
    发布轨迹标记的间隔秒数,如30e-3对应30ms。

  • 一个轮速计,发布/odom(Odometry),tf: odom->base_link:

published_frame=”odom”,
use_odometry=true,`
  • 没有惯导或不相信其他传感器,而只使用激光雷达数据:
TRAJECTORY_BUILDER_2D.use_online_correlative_scan_matching=true

你可能感兴趣的:(rplidar.lua)