How to make a recovery behavior work?

asked 2021-02-22 08:03:14 -0600

FFelizpe gravatar image

updated 2021-02-22 08:15:17 -0600

Hello there, good morning!

I've been here trying to work with ROS Navigation for a while, and we're generally making our robot work fine, navigate through the desired places without many problems. However, we are facing a major problem, that is when the robot finds out an obstacle suddenly appearing in front of itself.

We have looked upon all the things regarding recovery behaviors, but they... don't seem to be working? We've included this in the common costmap parameters, but it didn't seem like it made a difference:

recovery_behaviors:
- name: 'conservative_reset'
 type: 'clear_costmap_recovery/ClearCostmapRecovery'
- name: 'aggressive_reset'
 type: 'clear_costmap_recovery/ClearCostmapRecovery'

We tried to check the code for the ClearCostmapRecovery, but we also can't find it anywhere in the system. We've found the clear_costmap_recovery.h, but that's not exactly what we were looking for - where is the .cpp code?

What we wanted to do, in fact, is a recovery routine that would allow the robot to step back for a moment to reposition itself so it can find a new, better route, when stuck. However, none of the ROS default behaviors allow that. Going through the ROS Wiki, we found the stepback and steerturn recovery, which seemed to be exactly what we wanted - however, it doesn't work, either. According to the files, it should even show messages that it's working on the terminal, but we aren't getting any of that. That's how we declared the plugin in the common costmap:

recovery_behaviors:
#- name: 'conservative_reset'
#  type: 'clear_costmap_recovery/ClearCostmapRecovery'
- name: 'stepback_and_steerturn_recovery'
  type: 'stepback_and_steerturn_recovery/StepBackAndSteerTurnRecovery'
#- name: 'aggressive_reset'
#  type: 'clear_costmap_recovery/ClearCostmapRecovery'

Is there something we're doing wrong? How can we fix this and make the robot recover properly? We've tried to see another similar questions to these, but we had no luck - there are too few questions about this specific problem, and they're all old or outdated - is this problem rare?

We're using ROS Kinetic in a Raspberry Pi 4, too.

Regardless, thank you in advance!

edit retag flag offensive close merge delete

Comments

1

Is your formatting accurate? If it is as you posted, try this instead:

recovery_behaviors:
  - name: 'conservative_reset'
    type: 'clear_costmap_recovery/ClearCostmapRecovery'
  - name: 'aggressive_reset'
    type: 'clear_costmap_recovery/ClearCostmapRecovery'
tryan gravatar image tryan  ( 2021-02-22 15:09:19 -0600 )edit