Hi
I am trying to use AMCL instead of Gmapping and use pre-existing map:
I followed this tutorial with some modification to use AMCL and a new algorithm for global path planning in in fixed pre-build map.
NOTE: I am using simulator not real rosbot2
Here is my launch file for the navigation stack configuration:
<param if="$(arg use_gazebo)" name="use_sim_time" value="true"/>
<!-- Bring the ROSbot model and show it in rviz -->
<include file="$(find rosbot_description)/launch/rosbot_rviz.launch"/>
<!-- NOTE: rosbot_rviz.launch includes: "$(find rosbot_description)/launch/rosbot.launch" which lanuches Gazebo -->
<!-- Map server -->
<arg name="map_file" default="$(find rosbot_navigation)/maps/gridMap8by8.yaml"/>
<node name="map_server" pkg="map_server" type="map_server" args="$(arg map_file)" />
<!--- tf -->
<node if="$(arg use_rosbot)" pkg="tf" type="static_transform_publisher" name="laser_broadcaster" args="0 0 0 3.14 0 0 base_link laser 100" />
<!--- Localization: Run AMCL -->
<node pkg="amcl" type="amcl" name="amcl" output="screen">
<remap from="scan" to="/scan"/>
<param name="odom_frame_id" value="odom"/>
<param name="odom_model_type" value="diff-corrected"/>
<param name="base_frame_id" value="base_link"/>
<param name="update_min_d" value="0.1"/>
<param name="update_min_a" value="0.1"/>
<param name="min_particles" value="2500"/>
<param name="max_particles" value="10000"/>
</node>
<!-- Move base -->
<node pkg="move_base" type="move_base" name="move_base" output="screen">
<param name="controller_frequency" value="10.0"/>
<param name="base_global_planner" value="my_newPlanner_global_planner/MyNewPlannerGlobalPlannerROS"/>
<rosparam file="$(find rosbot_navigation)/config/costmap_common_params.yaml" command="load" ns="global_costmap" />
<rosparam file="$(find rosbot_navigation)/config/costmap_common_params.yaml" command="load" ns="local_costmap" />
<rosparam file="$(find rosbot_navigation)/config/local_costmap_params.yaml" command="load" />
<rosparam file="$(find rosbot_navigation)/config/global_costmap_params.yaml" command="load" />
<rosparam file="$(find rosbot_navigation)/config/trajectory_planner.yaml" command="load" />
</node>
If I have an occupancy grid map 8*8, where each cell is indexed from 0 to 63
I want to read the start and goal position from text file and use them in the above launch file. Is that possible?
For example start is index 13 which cell (1,5), and goal is index 57 which is cell(7,1)
I don’t want to set goal from rviz, I want start and goal to be read from text file.
Appreciate your help