Live Scan from RPLidar not in line with SLAM Map

asked 2023-04-04 02:18:29 -0500

Hi there, I am working on a robot that uses the SLAM algorithm to map out its surrounding, using Hector SLAM. It is able to generate a live map of my surroundings, however, i cannot seem to get the laser scan to work together with the map by showing its live movement as it goes through the map (aka as I move, the map gets bigger and increases in size, my pose moves, but the laser scan stays at the centre. Can anyone help? My hectorslam launch file is as shown

<node pkg="tf" type="static_transform_publisher" name="link1_broadcaster" args="0.0 0.0 0.0 0.0 0.0 0.0 base_link laser 100"/> <!--change -->

<node pkg="hector_mapping" type="hector_mapping" name="hector_height_mapping" output="screen">
<param name="scan_topic" value="scan" />
<param name="base_frame" value="base_link" />
<param name="odom_frame" value="base_link" />
<param name="map_frame" value="base_link" />

<param name="output_timing" value="false"/>
<param name="advertise_map_service" value="true"/>
<param name="use_tf_scan_transformation" value="true"/>
<param name="use_tf_pose_start_estimate" value="false"/>
<param name="pub_map_odom_transform" value="false"/>
<param name="map_with_known_poses" value="false"/>

<param name="map_pub_period" value="0.5"/>
<param name="update_factor_free" value="0.45"/>

<param name="map_update_distance_thresh" value="0.02"/>
<param name="map_update_angle_thresh" value="1.0"/>

<param name="map_resolution" value="0.02"/> <!--0.05-->
<param name="map_size" value="1024"/>
<param name="map_start_x" value="0.5"/>
<param name="map_start_y" value="0.5"/>
edit retag flag offensive close merge delete