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

How to avoid "Invalid Trajectory (cost: -1.000000)" in DWA Local Planner?

asked 2015-06-23 13:28:15 -0500

updated 2015-06-25 12:00:31 -0500

Dear all,

I am using DWA to drive a differential robot around. I am running Ubuntu 12.04 and ROS Hydro.

In general, the robot navigates well. However, sometimes when I send it to tight spots, I receive the following warnings:

[ WARN] [1435079055.081046415]: Invalid Trajectory 0.000000, 0.000000, 0.822608, cost: -1.000000
[ WARN] [1435079056.578828210]: Invalid Trajectory 0.000000, 0.000000, 0.931650, cost: -1.000000
[ WARN] [1435079058.079198312]: Invalid Trajectory 0.000000, 0.000000, 0.850638, cost: -1.000000
[ WARN] [1435079058.580604641]: Invalid Trajectory 0.000000, 0.000000, 1.000000, cost: -1.000000
[ WARN] [1435079060.483851910]: Invalid Trajectory 0.000000, 0.000000, 0.400000, cost: -1.000000

While receiving these warnings, the robot stands still, and eventually starts doing recovery behaviors, aborting most of the time afterwards.

My questions:

  • What is causing these invalid trajectories with cost: -1?
  • How can I avoid them?

Below, my "base_local_planner_params.yaml" file:

TrajectoryPlannerROS:
  max_vel_x: 0.8        
  min_vel_x: 0.2
  max_vel_y: 0.0        
  min_vel_y: 0.0  
  max_vel_theta: 2.0
  min_vel_theta: -2.0 
  min_in_place_vel_theta : 0.65
  escape_vel: -0.1

  acc_lim_theta: 3.2    
  acc_lim_x: 2.5        
  acc_lim_y: 0.0                       

  holonomic_robot: false

  sim_time: 1.5
  sim_granularity: 0.025 
  angular_sim_granularity: 0.025
  vx_samples: 5                         
  vy_samples: 0
  vtheta_samples: 20
  meter_scoring: false                 

  yaw_goal_tolerance: 0.2              
  xy_goal_tolerance: 0.25              
  latch_xy_goal_tolerance: false        
  gdist_scale: 0.5                      
  pdist_scale: 0.7                      
  occdist_scale: 0.02        

  dwa: true

Here is a video of the robot's behavior: https://youtu.be/Y-zro-sXO-o

Let me know if further details are necessary. Thanks in advance!

edit retag flag offensive close merge delete

Comments

How are you specifying the footprint?

David Lu gravatar image David Lu  ( 2015-06-25 12:31:04 -0500 )edit

Here it is: footprint: [[0.15,0.22],[0.15,-0.22],[-0.55,-0.22],[-0.55,0.22]]
it's a rectangle around the robot.

DavidPortugal gravatar image DavidPortugal  ( 2015-06-25 13:21:14 -0500 )edit

I've been playing around with the vx_samples and vtheta_samples lately, but still without success.

DavidPortugal gravatar image DavidPortugal  ( 2015-06-30 09:23:21 -0500 )edit

Hi David (Portugal), did you end up finding a way to make DWA "behave"? Thanks!

spmaniato gravatar image spmaniato  ( 2016-03-03 14:11:39 -0500 )edit

Unfortunately no @spmaniato. The problem wasn't critical, and the robot would recover eventually.

DavidPortugal gravatar image DavidPortugal  ( 2016-03-04 03:03:43 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2015-06-23 14:03:46 -0500

David Lu gravatar image

It means that it can't find any valid plan. Invalid plans have negative costs.

edit flag offensive delete link more

Comments

Yes, I am aware of that, thanks. The issue is: What is causing the generation of invalid plans and how can I avoid it? Do you see anything in the parameters that should not be there and might cause this?

DavidPortugal gravatar image DavidPortugal  ( 2015-06-24 06:26:03 -0500 )edit

To figure that out, you need to be more explicit about what the tight spot actually looks like in relation to your robot.

David Lu gravatar image David Lu  ( 2015-06-24 08:27:55 -0500 )edit

Thank you David, I've added a video showing the robot's behavior in the original question.

DavidPortugal gravatar image DavidPortugal  ( 2015-06-25 12:01:24 -0500 )edit

Hi i m facing the same problem! Did you find any solution

SH_Developer gravatar image SH_Developer  ( 2017-07-04 07:39:12 -0500 )edit

I have the same issue too, no solution yet

KevWal gravatar image KevWal  ( 2023-08-10 11:22:23 -0500 )edit

I have found, that depending on the planner in use, this is what it means in the code.

If dwa:

 ROS_WARN("Invalid Trajectory %f, %f, %f, cost: %f", vel_samples[0], vel_samples[1], vel_samples[2], cost);

or if trajectory_planner:

ROS_WARN("Invalid Trajectory %f, %f, %f, cost: %f", vx_samp, vy_samp, vtheta_samp, cost);
KevWal gravatar image KevWal  ( 2023-08-10 11:24:28 -0500 )edit

Question Tools

3 followers

Stats

Asked: 2015-06-23 13:28:15 -0500

Seen: 1,470 times

Last updated: Jun 25 '15