Sending start and goal to navigation stack
Hi
I am trying to use AMCL instead of Gmapping and use pre-existing map. NOTE: I am using simulated robot(rosbot2) not a real robot.
Here is my launch file for the navigation stack configuration:
<launch>
<arg name="use_rosbot" default="true"/>
<arg name="use_gazebo" default="true"/>
<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>
I built this map: http://www.mediafire.com/view/fy7rsid...
This is how my map looks like in Rviz: http://www.mediafire.com/view/e3ekp50...
This is the yaml file:
image: gridMap8by8.pgm
resolution: 0.5
origin: [-2,-2, 0]
occupied_thresh: 0.65
free_thresh: 0.196
negate: 0
width: 4
height: 4
I want to set the start position of the robot at index 13 which cell (1,5), and goal is index 57 which is cell(7,1) I want to read the start and goal position from text file and use them in the above launch file. Is that possible? I don’t want to set goal from rviz, I want start and goal to be read from text file and used in the launch file.
bool makePlan (const geometry_msgs::PoseStamped &start, const geometry_msgs::PoseStamped &goal, std::vector< geometry_msgs::PoseStamped > &plan)
I implemented makePlan for new path planner, how start and goal as PoseStamped be sent to makePlan?
Appreciate your help