UST"/>
使用UST
1、修改demo_revo_lds.launch
路径:cartographer_ros/cartographer_ros/launch/demo_revo_lds.launch
<launch><param name="/use_sim_time" value="true" /><node name="cartographer_node" pkg="cartographer_ros"type="cartographer_node" args="-configuration_directory $(find cartographer_ros)/configuration_files-configuration_basename revo_lds.lua"output="screen"><remap from="scan" to="scan" /></node><node name="rviz" pkg="rviz" type="rviz" required="true"args="-d $(find cartographer_ros)/configuration_files/demo_2d.rviz" /></launch>
2 修改参数配置文件revo_lds.lua
路径:cartographer_ros/cartographer_ros/configuration_files/revo_lds.lua
include "map_builder.lua"options = {map_builder = MAP_BUILDER,sensor_bridge = { horizontal_laser_min_range = 0.3, horizontal_laser_max_range = 10., horizontal_laser_missing_echo_ray_length = 1, constant_odometry_translational_variance = 0., constant_odometry_rotational_variance = 0., }, map_frame = "map",tracking_frame = "laser",published_frame = "laser",odom_frame = "odom",provide_odom_frame = true,use_odometry_data = false,use_constant_odometry_variance = true,constant_odometry_translational_variance = 0.,constant_odometry_rotational_variance = 0.,use_horizontal_laser = true,use_horizontal_multi_echo_laser = false,horizontal_laser_min_range = 0.3,horizontal_laser_max_range = 10.,horizontal_laser_missing_echo_ray_length = 1.,num_lasers_3d = 0,lookup_transform_timeout_sec = 0.2,submap_publish_period_sec = 0.3,pose_publish_period_sec = 5e-3,
}MAP_BUILDER.use_trajectory_builder_2d = true
TRAJECTORY_BUILDER_2D.use_imu_data = false
TRAJECTORY_BUILDER_2D.use_online_correlative_scan_matching = true
SPARSE_POSE_GRAPH.optimization_problem.huber_scale = 1e2return options
3 重新编译
1. cd catkin_ws
2. catkin_make
3. source catkin_ws/devel/setup.bash
4. rospack profile
运行脚本进行实时建图
1. roscore
2. rosrun urg_node urg_node _ip_address:=192.168.0.10
3. roslaunch cartographer_ros demo_revo_lds.launch
更多推荐
使用UST
发布评论