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

2d-navigation-goal robot not moving

asked 2019-06-10 16:41:25 -0500

Usui gravatar image

updated 2019-06-12 16:16:00 -0500

Here's my launch file:

<launch>

   <master auto="start"/>
 <!-- Run the map server --> 
<node name="map_server" pkg="map_server" type="map_server" args="$(find my_robot_name_2dnav)/map/map.yaml"/>
 <!--- Run AMCL --> 
    <include file="$(find amcl)/examples/amcl_diff.launch">

   <node pkg="move_base" type="move_base" respawn="false" name="move_base" output="screen">
   <!-- change controller frequency in case it is running in circles-->
   <param name="controller_frequency" value="10.0" />
    <rosparam file="$(find my_robot_name_2dnav)/param/costmap_common_params.yaml" command="load" ns="global_costmap" /> 
    <rosparam file="$(find my_robot_name_2dnav)/param/costmap_common_params.yaml" command="load" ns="local_costmap" />
    <rosparam file="$(find my_robot_name_2dnav)/param/local_costmap_params.yaml" command="load" />
     <rosparam file="$(find my_robot_name_2dnav)/param/global_costmap_params.yaml" command="load" /> 
    <rosparam file="$(find my_robot_name_2dnav)/param/base_local_planner_params.yaml" command="load" />
 </node>

</launch>

I did rosrun map_server map_server map so I didn't add map_server to the launch file.

base_local:

TrajectoryPlannerROS:
 controller_frequency: 9.0
 max_vel_x: 0.45
 min_vel_x: 0.1
 max_vel_theta: 1.0
  min_in_place_vel_theta: 0.05

 acc_lim_theta: 3.2
  acc_lim_x: 2.5
 acc_lim_y: 2.5
#  xy_goal_tolerance: 0.5
 yaw_goal_tolerance: 0.5

  meter_scoring: false
  holonomic_robot: false

costmap:

obstacle_range: 2.5
 raytrace_range: 3.0
 footprint: [[0.1651, 0.1778], [0.1651, -0.1778],[-0.1651,-0.1778], [-0.1651, 0.1778]]
 #robot_radius: ir_of_robot
 inflation_radius: 0.35

observation_sources: laser_scan_sensor #point_cloud_sensor

laser_scan_sensor: {sensor_frame: laser, data_type: LaserScan, topic: scan, marking: true, clearing: true}

global_costmap:

global_costmap:
  global_frame: /map
  robot_base_frame: base_link
  update_frequency: 5.0
  static_map: true

local_costmap:

  local_costmap:
 global_frame: odom
 robot_base_frame: base_link
 update_frequency: 1.0
 publish_frequency: 2.0
 static_map: true
rolling_window: true
width: 6.0
 height: 6.0
 resolution: 0.05

When I did the 2d navigation goal it moves like what I want and the map shows that also, but then it kept on spinning and won't stop.

It gave me alot of this:

[ WARN] [1560202477.002795121]: Control loop missed its desired rate of 20.0000Hz... the loop actually took 0.0742 seconds
[ WARN] [1560202477.092615987]: Control loop missed its desired rate of 20.0000Hz... the loop actually took 0.1140 seconds
[ WARN] [1560202478.586816017]: Control loop missed its desired rate of 20.0000Hz... the loop actually took 0.0942 seconds
[ WARN] [1560202478.686886942]: Control loop missed its desired rate of 20.0000Hz... the loop actually took 0.0943 seconds
[ WARN] [1560202478.786992583]: Control loop missed its desired rate of 20.0000Hz... the loop actually took 0.0943 seconds

I tried changing the control frequency to 3 and it's the same thing

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-06-10 23:39:48 -0500

billy gravatar image

The warning about missing desired rate is not related to the robot spinning near the goal. You can set the control frequency with "controller_frequency: 9.0" as the very first line in the base_local file. Before the TrajectoryPlannerROS: line. The warning doesn't mean anything is failing. Except for clogging up the screen and log file, that warning is harmless and can be used as diagnostic later when you're optimizing.

Tip 1:

You have min_in_place_vel_theta: 0.4 set pretty high. Try 0.05 for that.

Tip 2:

In you local planner you should try to increase the goal tolerance from default. See this page: http://wiki.ros.org/base_local_planner. This will make it easier for movebase to conclude you've reached the goal. The default for yaw_goal_tolerance is 0.05 so if you have the min theta velocity at 0.4 I can see robot having issue parking at the correct angle. Lower min theta to 0.05 and increase goal tolerance to 0.2 and see if that fixes it. Then retune once it's working

Question 1:

You have holonomic marked as true. Is that really true?

edit flag offensive delete link more

Comments

Except for clogging up the screen and log file, that warning is harmless

I would not just make statements like this.

The warning is there for a reason, and missing the control rate could lead to the robot overshooting the goal, not reaching it, the robot not reacting to dynamic obstacles in time (or at all), robot not stopping when it needs to, etc, etc.

The navigation stack runs a closed-loop system. If it can't run that loop at the desired frequency, it's going to fail some of its tasks.

gvdhoorn gravatar image gvdhoorn  ( 2019-06-11 03:02:50 -0500 )edit

@billy I am not sure about holonomic I just saw other iRobot move_base put it as true

So I changed it like you said but it still spinning around weirdly, I updated the files I used above

Usui gravatar image Usui  ( 2019-06-11 11:39:45 -0500 )edit

@Usui, If iRobot is not holonomic then you should mark it as false. If you're still getting warning about loop rate, move the controller frequency line above the TrajectoryPlannerROS: line. On my system location before that line was important.

billy gravatar image billy  ( 2019-06-11 13:38:13 -0500 )edit

Okay so now it's just super inconsistent. Sometimes it moves, sometimes it takes weird pathing to get to the goal, sometimes it doesn't even move. The one thing that is consistent is the warning about missing loop either 20 hz or 5 hz.

Usui gravatar image Usui  ( 2019-06-11 15:17:50 -0500 )edit

@gvdhoon - fair enough, point taken.

billy gravatar image billy  ( 2019-06-11 19:11:01 -0500 )edit

So what should I do now? I have been following this site: http://wiki.ros.org/navigation/Tutori... but it still haven't solve the issue

Usui gravatar image Usui  ( 2019-06-12 15:16:19 -0500 )edit

Couple things;

1 - Setup RVIZ to view the map, inflation radius, robot position, local and global plans, laser scan. Verify that your initial position is not within the inflation radius of anything and that the inflation radius used allows for a path to the goal. Post screen shot.

2 - I don't know how important this is but the indenting in your yaml files is confusing. I'm not convinced all your variables are being set properly. Two spaces for indenting and keep the parameters that should have equal indenting lined up. Again, I don't know for sure this matters but clean it up just to be sure.

billy gravatar image billy  ( 2019-06-14 00:37:22 -0500 )edit

The indentation up there is because I other spaced since you need 4 space to turn it into code. My indentation is fine.

Usui gravatar image Usui  ( 2019-06-14 11:55:22 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2019-06-10 16:41:25 -0500

Seen: 1,287 times

Last updated: Jun 11 '19