[Ros Learning notes] using laser Radar (Rplidar) to test Hector_mapping_ros learning

Source: Internet
Author: User
Tags radar

1. Create workspace and install compile Rplidar package

Reference [Ros Learning notes]ros using LIDAR (Rplidar) Step 1, link to:

http://blog.csdn.net/sdhjqhjq1/article/details/79143498

2, hector_mapping package installation

sudo apt-get install Ros-indigo-hector-slam


3. Create launch files

Add hector_mapping_demo.launch files to the rplidar_ros/launch/directory

<launch> <node pkg= "hector_mapping" type= "hector_mapping" name= "hector_mapping" output= "screen" > <!-- Frame names--> <param name= "Pub_map_odom_transform" value= "true"/> <param name= "map_frame" value= "map"/ > <param name= "base_frame" value= "Base_link"/> <param name= "odom_frame" value= "Base_link"/> <!--Tf Use--> <param name= "Use_tf_scan_transformation" value= "true"/> <param name= "Use_tf_pose_start_estimate" Value= "false"/> <!--Map Size/start point--> <param name= "map_resolution" value= "0.05"/> <param nam E= "Map_size" value= "2048"/> <param name= "map_start_x" value= "0.5"/> <param name= "map_start_y" value= "0.5" /> <param name= "laser_z_min_value" value = " -1.0"/> <param name= "laser_z_max_value" value = "1.0"/> <p Aram Name= "Map_multi_res_levels" value= "2"/> <param name= "Map_pub_period" value= "2"/> <param name= "Laser_ Min_dist "value=" 0.4 "/> <param name= "Laser_max_dist" value= "5.5"/> <param name= "output_timing" value= "false"/> <param "name=" Scanmatch_transform "value=" true "/> <!--<param name=" Tf_map_scanmatch_transform_frame_name "value=" Scanmatcher_frame "/>--> <!--Map update parameters--> <param name=" Update_factor_free "value=" 0.4 "
; <param name= "update_factor_occupied" value= "0.7"/>     <param name= "Map_update_distance_thresh" value= "0.2"/> <param name= "Map_update_angle_thresh" value= "0.06"/> <!--advertising config-->  &l
T;param name= "Advertise_map_service" value= "true"/> <param name= "scan_subscriber_queue_size" value= "5"/> <param name= "scan_topic" value= "Scan"/> </node> <node pkg= "TF" type= "Static_transform_publisher" name= "Base_to_laser_broadcaster" args= "0 0 0 0 0 0/base_link/laser"/>   <node pkg= "Rviz" type= "Rviz" Name= "R Viz "    args="-D $ (find Hector_slam_launch)/rviz_cfg/mApping_demo.rviz "/> </launch> 


4, run the test

View port numbers before running, granting port permissions

Lsusb
sudo chmod a+rw/dev/ttyusb0


Run the following two launch files

Roslaunch Rplidar_ros Hector_mapping_demo.launch
Roslaunch Rplidar_ros Rplidar.launch
We can get the radar scanning the surrounding environment


Reference: Https://github.com/robopeak/rplidar_ros/wiki

Next note write mobile robot autonomous navigation


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.