HC-SR04 Ultrasonic Sensor
Authors: Daniel Rico-Aniles
The Sensor Description
When the RPlidar
Hardware Architecture
The solution that has worked best for th
Figure 2. Hardware architecture to control an ultrasonic sensor HC-SR04
Finite State Machine
STEP 1 - rplidar.launch Modification
The RPLidar Se
HC-SR04 with Configuration and Data Registers
STEP 1 - rplidar.launch Modification
The RPLidar Se
VHDL Codes
STEP 3 - Hector-SLAM Mapping File Modification
There are 2 important parameters in the Hector-SLAM mapping launch file that can help to avoid getting a map broken, map_update_distance_thresh and map_update_angle_thresh. These parameters determined how often the map is updated, the units are meters and radians for the distance and angle respectively.
open the file catkin_ws/src/hector_slam/hector_slam_mapping/launch/mapping_default.launch
Modify the parameter map_update_distance_thresh and map_update_angle_thresh.
The used parameter values are shown shown in Figure 4.
Figure 4 Map update parameter inside the Hector-SLAM mapping launch file.
Results
After doing the above stated modification it was possible to generate a correct map running Hector-SLAM and teleoperating the robot with a bluetooth controller. The generated map is shown in Figure 5.
IMPORTANT the parameters have to be tuned so that the robot can move in straight line or turn at 100% the speed without breaking the map.
Figure 5 Successful map generation.