move_base goal not reached

asked 2015-03-25 08:48:38 -0500

RND gravatar image

updated 2015-03-26 04:08:51 -0500


I am trying to use move_base to move my robot to a particular point in the environment. While moving autonomously, the robot should build a map at the same time using the gmapping node. I am running on a Powerbot platform with the rosaria package to control and drive the robot. This is the move_base.launch file that I am using to set the parameters of the move_base package. As you can see, I have disabled the recovery_behaviour and clearing_rotation parameters. The local planner that I am using is the DWA planner.



  <arg name="no_static_map" default="false"/>

  <arg name="base_global_planner" default="navfn/NavfnROS"/>
  <arg name="base_local_planner" default="dwa_local_planner/DWAPlannerROS"/>
  <!-- <arg name="base_local_planner" default="base_local_planner/TrajectoryPlannerROS"/> -->

  <node pkg="move_base" type="move_base" respawn="false" name="move_base" output="screen">

    <param name="base_global_planner" value="$(arg base_global_planner)"/>
    <param name="base_local_planner" value="$(arg base_local_planner)"/>  
    <rosparam file="$(find move_base)/config/planner.yaml" command="load"/>

    <!-- observation sources located in costmap_common.yaml -->
    <rosparam file="$(find move_base)/config/costmap_common.yaml" command="load" ns="global_costmap" />
    <rosparam file="$(find move_base)/config/costmap_common.yaml" command="load" ns="local_costmap" />

    <!-- local costmap, needs size -->
    <rosparam file="$(find move_base)/config/costmap_local.yaml" command="load" ns="local_costmap" />
    <param name="local_costmap/width" value="10.0"/>
    <param name="local_costmap/height" value="10.0"/>
    <param name="local_costmap/inflation/inflation_radius" value="0.2"/>

    <!-- static global costmap, static map provides size -->
    <rosparam file="$(find move_base)/config/costmap_global_static.yaml" command="load" ns="global_costmap" unless="$(arg no_static_map)"/>

    <!-- global costmap with laser, for odom_navigation_demo -->
    <rosparam file="$(find move_base)/config/costmap_global_laser.yaml" command="load" ns="global_costmap" if="$(arg no_static_map)"/>
    <param name="global_costmap/width" value="100.0" if="$(arg no_static_map)"/>
    <param name="global_costmap/height" value="100.0" if="$(arg no_static_map)"/>
    <param name="global_costmap/inflation/inflation_radius" value="0.5" if="$(arg no_static_map)"/>

    <!-- DWAPlannerROS parameters -->
    <rosparam file="$(find move_base)/config/planner.yaml" command="load" ns="DWAPlannerROS"/>
    <param name="DWAPlannerROS/acc_lim_x" value="0.5"/>
    <param name="DWAPlannerROS/acc_lim_y" value="0.5"/>
    <param name="DWAPlannerROS/acc_lim_th" value="1.0"/>
    <param name="DWAPlannerROS/max_trans_vel" value="0.3"/>
    <param name="DWAPlannerROS/max_vel_x" value="0.3"/>
    <param name="DWAPlannerROS/max_vel_y" value="0.3"/>
    <param name="DWAPlannerROS/min_rot_vel" value="0.2"/>
    <param name="DWAPlannerROS/max_rot_vel" value="0.4"/>

    <!-- Remap into namespace for cmd_vel_mux switching -->
    <remap from="cmd_vel" to="/RosAria/cmd_vel" />



Then, I am using this code to move the robot 30cm along the x-axis of the robot and 20cm along the y-axis of the robot. My robot can only move in a 2 dimensional environment. I need to set up move_base to be able to give the robot a goal location as an (x,y) coordinate and it must move to that location.


#include <ros/ros.h>
#include <move_base_msgs/MoveBaseAction.h>
#include <actionlib/client/simple_action_client.h>

typedef actionlib::SimpleActionClient<move_base_msgs::MoveBaseAction> MoveBaseClient;

int main(int argc, char** argv){
    ros::init(argc, argv, "simple_navigation_goals");

    //tell the action client that we want to spin a thread by default
    MoveBaseClient ac("move_base", true);

    //wait for the action server to come up
        ROS_INFO("Waiting ...
edit retag flag offensive close merge delete


Can you embed the launch, code, and image into the question?

lucasw gravatar imagelucasw ( 2015-03-25 17:20:41 -0500 )edit

OK i embedded the launch and code but could not embed the image.

RND gravatar imageRND ( 2015-03-26 04:09:31 -0500 )edit