ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Robot can't reach goal and keep rotate endless

asked 2015-06-12 10:45:20 -0600

Lil Kmer gravatar image

Hi all,

I have some trouble implementing the navigation stack for one omnidirectional robot. The transfornation -and Odom publisher are done and work fine. I have read Navigation Tutorial and i have adjusted my files so that the application could operate without a static map. So when I launched my files and start sending a goal, the robot rotate endless.

Has anyone an idea about this issue? Here ist my setup for the navigation Stack:

Base local planner:

  TrajectoryPlannerROS:
  max_vel_x: 50
  min_vel_x: 10
  max_rotational_vel: 0.1
  min_in_place_rotational_vel: 0.1

  acc_lim_theta: 0.6
  acc_lim_x: 2.5
  acc_lim_y: 2.5

  holonomic_robot: true

  meter_scoring: true

Coastmap common:

obstacle_range: 2.5
raytrace_range: 3.0
footprint: [ [0.37, 0.33], [-0.37, 0.33], [-0.37, -0.33], [0.37, -0.33] ]
#footprint_padding: 0.01
inflation_radius: 0.55

observation_sources: laser_scan_sensor

laser_scan_sensor: {sensor_frame: /base_laser_front_link, data_type: LaserScan, topic: scan_front, marking: true, clearing: true}

Global coastmap:

global_costmap:
  global_frame: map
  robot_base_frame: base_link
  update_frequency: 0.4
  static_map: false
  rolling_window: true
  width: 3.0
  height: 3.0
  resolution: 0.005
  origin_x: -1.5
  origin_y: -1.5

Local coastmap:

local_costmap:
  global_frame: odom
  robot_base_frame: base_link
  update_frequency: 0.4
  publish_frequency: 2.0
  static_map: false
  rolling_window: true
  width: 3.0
  height: 3.0
  resolution: 0.01
  origin_x: -1.5
  origin_y: -1.5

Move base:

<launch>

<node pkg="gmapping" type="slam_gmapping" name="slam_gmapping" >
        <remap from="scan" to="scan_front" />
        <param name="map_update_interval" value="0.2" />
</node>

  <node pkg="move_base" type="move_base" respawn="false" name="move_base" output="screen"> 
    <param name="controller_frequency" value="0.8"/>
    <rosparam file="$(find miagy_2dnav)/costmap_common_params.yaml" command="load" ns="global_costmap" />
    <rosparam file="$(find miagy_2dnav)/costmap_common_params.yaml" command="load" ns="local_costmap" />
    <rosparam file="$(find miagy_2dnav)/local_costmap_params.yaml" command="load" />
    <rosparam file="$(find miagy_2dnav)/global_costmap_params.yaml" command="load" />
    <rosparam file="$(find miagy_2dnav)/base_local_planner_params.yaml" command="load" />
  </node>
</launch>

Source file to send a goal:

#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
  while(!ac.waitForServer(ros::Duration(5.0))){
    ROS_INFO("Waiting for the move_base action server to come up");
  }

  move_base_msgs::MoveBaseGoal goal;

  //we'll send a goal to the robot to move 1 meter forward
  goal.target_pose.header.frame_id = "base_link";
  goal.target_pose.header.stamp = ros::Time::now();

  goal.target_pose.pose.position.x = 1.0;
  goal.target_pose.pose.orientation.w = 1.0;

  ROS_INFO("Sending goal");
  ac.sendGoal(goal);

  ac.waitForResult();

  if(ac.getState() == actionlib::SimpleClientGoalState::SUCCEEDED)
    ROS_INFO("Hooray, the base moved 1 meter forward");
  else
    ROS_INFO("The base failed to move forward 1 meter for some reason");

  return 0;
}

Any help will be appreciate. Thanks

edit retag flag offensive close merge delete

Comments

I have exactly the same problem with the navigation stack. Did you solve it? Thanks.

czhang gravatar image czhang  ( 2015-08-13 21:06:22 -0600 )edit

Me too. If you have found a solution...

lfr gravatar image lfr  ( 2016-06-02 03:50:25 -0600 )edit

same here...

quentin gravatar image quentin  ( 2016-09-02 05:37:32 -0600 )edit
1

Are you sure you want max_vel_x = 50 and min_vel_x = 10? These are in meters per second so 10 m/s is approximately 22 mph or 36 km/h. Also, your global resolution is 0.005 m which is just 5mm. Is your odometry that accurate? Finally, why do you set the controller_frequency so low (0.8 Hz)?

Pi Robot gravatar image Pi Robot  ( 2016-09-02 22:27:36 -0600 )edit

same problem here. Solutions???

dottant gravatar image dottant  ( 2016-10-25 09:06:56 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2016-09-06 01:27:35 -0600

quentin gravatar image

Hi there,

In my case, the robot was rotating for ever without starting the navigation (even though the global path was computed and drawn on rviz). The reason for this behavior was a too small maximum translational acceleration: it was basically not sufficient to start the motion!! I just increased it and it worked

edit flag offensive delete link more
0

answered 2016-09-02 12:14:55 -0600

lfr gravatar image

Hi there !

In your launch file, you did not specify what planner to use. Personally, I used the eband_local_planer for omni-directional navigation.
You could try it.
First, add the following lines inside the tag <node pkg="move_base"....> .... </node> :

<param name="base_global_planner" value="navfn/NavfnROS"/>
<param name="base_local_planner" value="eband_local_planner/EBandPlannerROS"/>

Then, you just have to create and fill the YAML file for the configuration of the eband_local_planner, let's call it eb_planner.yaml for example.
You have to load this file inside the same tags as previously mentioned (move_base) as follows:

<rosparam file="$(find your_package_name)/config/eb_planner.yaml" command="load" />

(I supposed you put your yaml file inside a folder named "config", of course, you can put it where you want).

You can find all the information about the eband_local_planner here: eband_local_planner

I sincerely hope it will help you,
lfr

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2015-06-12 10:45:20 -0600

Seen: 2,070 times

Last updated: Sep 06 '16