Using AMCL for navigation with hector slam

asked 2018-11-22 05:54:29 -0500

Clark gravatar image

Hi guys, I'm trying to navigate on a given map(built by hector slam), and the odometry is only supplied by Lidar by using hector mapping (didn't use any other extra sensors ), and I'm using raspberry pi 3B to publish the /scan data to my computer(RViz, navigation, mapping). Now, when I use AMCL for navigation, there're some problems showed up(the particle seems weird), I search a lot but still don't know where is the problem, is there any one can please help me to check the problems, thank you very much!! (here is the link of picture:AMCL_problems )

<launch>

    <node pkg="rviz" type="rviz" name="rviz"
    args="-d $(find my_robot_name_2dnav)/rviz_config/amcl_nav.rviz" />

    <node pkg="map_server" type="map_server" name="map_server" args="$(find map_container)/room_hand_map.yaml" />

    <node pkg="amcl" type="amcl" name="amcl">
            <param name="tf_broadcast" value="true" />
            <param name="base_frame_id" value="/base_link" />
            <param name="global_frame_id" value="/map" />
            <param name="odom_frame_id" value="/scanmatch_odom" />
            <param name="use_map_topic" value="false" />
            <param name="initial_pose_x" value="0.0"/>
            <param name="initial_pose_y" value="0.0"/>

        <remap from="scan" to="/scan" />
        <param name="odom_model_type" value="diff" />
        <param name="transform_tolerance" value="0.5" />
        <param name="gui_publish_rate" value="10.0"/><!--default:-1.0-->
        <param name="laser_max_beams" value="300"/><!--default:30-->
        <param name="laser_max_range" value="-1.0"/>
        <param name="laser_min_range" value ="-1.0" />
        <param name="min_particles" value="500"/>

    <!--
            ODOM TRANSFORMER
    -->
    <node name="odomtransformer" pkg="my_robot_name_2dnav" type="odomtransformer.py" output="screen">
            <param name="odom_input" value="/scanmatch_odom" />
            <param name="tf_output" value="/base_link" />
    </node>

    <!--
            HECTOR STUFF
    -->
<node pkg="tf" type="static_transform_publisher" name="map2scanmatch" args="0 0 0 0.0 0.0 0.0 map scanmatch_odom 100" />
    <node name="hector_mapping" pkg="hector_mapping" type="hector_mapping" output="screen">
            <remap from="map" to="/mapcurrent" />
    <param name="map_frame" value="/mapcurrent" />
    <param name="base_frame" value="/base_link" />
    <param name="odom_frame" value="/scanmatcher_odom" />
            <param name="pub_odometry" 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_resolution" value="0.05"/>
    <param name="map_size" value="2048"/>
edit retag flag offensive close merge delete