Bird
Raised Fist0
ROSframework~20 mins

Recovery behaviors in ROS - Practice Problems & Coding Challenges

Choose your learning style10 modes available
Challenge - 5 Problems
🎖️
ROS Recovery Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ component_behavior
intermediate
2:00remaining
What happens when a ROS navigation recovery behavior is triggered?
In a ROS navigation stack, when a recovery behavior like rotate_recovery is activated, what is the expected behavior of the robot?
AThe robot stops all movement and waits indefinitely for manual intervention.
BThe robot performs a predefined maneuver, such as rotating in place, to clear obstacles or escape a stuck position.
CThe robot immediately shuts down the navigation stack and powers off motors.
DThe robot ignores the recovery behavior and continues the current path regardless of obstacles.
Attempts:
2 left
💡 Hint
Think about what a recovery behavior is designed to do when the robot is stuck.
❓ state_output
intermediate
2:00remaining
What is the state of the ROS navigation stack after a recovery behavior completes successfully?
After a recovery behavior finishes its action successfully, what state does the ROS navigation stack typically enter?
AIt transitions back to normal path following to continue navigation.
BIt resets the robot's position to the origin (0,0).
CIt shuts down the navigation stack to prevent further errors.
DIt remains in recovery mode waiting for further commands.
Attempts:
2 left
💡 Hint
Consider what the robot should do after successfully recovering from an obstacle.
📝 Syntax
advanced
2:00remaining
Identify the correct YAML snippet to configure a recovery behavior in ROS navigation.
Which YAML snippet correctly configures the clear_costmap_recovery behavior in a ROS navigation recovery behaviors list?
A
- name: clear_costmap_recovery
  type: 'clear_costmap_recovery/ClearCostmapRecovery'
B
- name: clear_costmap_recovery
  type: clear_costmap_recovery/ClearCostmapRecovery
C
- name: clear_costmap_recovery
  type: clear_costmap_recovery\ClearCostmapRecovery
D
- name: clear_costmap_recovery
  type: "clear_costmap_recovery/ClearCostmapRecovery"
Attempts:
2 left
💡 Hint
YAML strings can be enclosed in single or double quotes for clarity.
🔧 Debug
advanced
2:00remaining
Why does the recovery behavior fail to execute in this ROS launch snippet?
Given this launch snippet, why does the recovery behavior not run?
AThe package "move_base" is missing from the workspace.
BThe node type "move_base" is incorrect; it should be "move_base_node".
CThe recovery_behaviors parameter expects a YAML list, not a string with escaped quotes.
DThe recovery behavior "rotate_recovery" is not installed by default.
Attempts:
2 left
💡 Hint
Look closely at how the recovery_behaviors parameter is formatted.
🧠 Conceptual
expert
3:00remaining
Which recovery behavior is best suited to clear unknown obstacles detected by the robot's sensors?
In ROS navigation, you want to clear unknown obstacles that might be causing the robot to get stuck. Which recovery behavior is designed specifically for this purpose?
Await_recovery: pauses the robot to allow obstacles to move away.
Brotate_recovery: rotates the robot in place to find a clear path.
Cback_up_recovery: moves the robot backward to escape tight spots.
Dclear_costmap_recovery: clears the robot's costmap to remove stale obstacle data.
Attempts:
2 left
💡 Hint
Think about which behavior resets the map of obstacles.

Practice

(1/5)
1. What is the main purpose of recovery behaviors in ROS navigation?
easy
A. To help the robot fix problems when it gets stuck
B. To speed up the robot's movement
C. To map the environment faster
D. To reduce battery usage

Solution

  1. Step 1: Understand recovery behaviors role

    Recovery behaviors are designed to help the robot when it encounters problems like being stuck or blocked.
  2. Step 2: Compare options with purpose

    Only To help the robot fix problems when it gets stuck matches this purpose. Other options describe unrelated functions.
  3. Final Answer:

    To help the robot fix problems when it gets stuck -> Option A
  4. Quick Check:

    Recovery behaviors fix stuck robot = C [OK]
Hint: Recovery behaviors fix stuck robots, not speed or mapping [OK]
Common Mistakes:
  • Confusing recovery behaviors with mapping functions
  • Thinking recovery behaviors save battery
  • Assuming recovery speeds up navigation
2. Which YAML configuration snippet correctly enables a recovery behavior in ROS navigation?
easy
A. recovery_behaviors: - clear_costmap_recovery - rotate_recovery
B. recovery_behaviors = [clear_costmap, rotate_recovery]
C. recovery_behaviors: clear_costmap: true rotate_recovery: true
D. recovery_behaviors: - name: clear_costmap type: "clear_costmap_recovery/ClearCostmapRecovery"

Solution

  1. Step 1: Identify correct YAML syntax for recovery behaviors

    ROS navigation expects a list of recovery behaviors with name and type keys in YAML format.
  2. Step 2: Check each option's format

    recovery_behaviors: - name: clear_costmap type: "clear_costmap_recovery/ClearCostmapRecovery" uses correct YAML list with name and type. Options B, C, and D use invalid syntax or missing keys.
  3. Final Answer:

    YAML list with name and type keys -> Option D
  4. Quick Check:

    YAML recovery behaviors need name and type keys = A [OK]
Hint: YAML lists need dash and key:value pairs for recovery behaviors [OK]
Common Mistakes:
  • Using equal signs instead of colon in YAML
  • Missing name or type keys in recovery behavior
  • Using Python list syntax instead of YAML
3. Given this ROS recovery behavior configuration snippet, what will happen when the robot is stuck?
recovery_behaviors:
  - name: rotate_recovery
    type: "rotate_recovery/RotateRecovery"
medium
A. The robot will clear its costmap to remove obstacles
B. The robot will rotate in place to find a new path
C. The robot will stop and wait indefinitely
D. The robot will move backward quickly

Solution

  1. Step 1: Understand rotate_recovery behavior

    The rotate_recovery behavior makes the robot spin in place to scan surroundings and find a new path.
  2. Step 2: Match behavior to options

    The robot will rotate in place to find a new path correctly describes rotation. The robot will clear its costmap to remove obstacles describes clearing costmap, which is different. Options C and D do not match rotate_recovery.
  3. Final Answer:

    The robot will rotate in place to find a new path -> Option B
  4. Quick Check:

    rotate_recovery spins robot = B [OK]
Hint: RotateRecovery spins robot to find path, not clear or stop [OK]
Common Mistakes:
  • Confusing rotate_recovery with clear_costmap_recovery
  • Thinking robot stops instead of rotating
  • Assuming robot moves backward
4. You configured a recovery behavior in ROS but it never triggers when the robot is stuck. What is the most likely cause?
medium
A. The recovery behavior is not listed in the YAML file
B. The robot's battery is low
C. The robot is moving too fast
D. The map is too large

Solution

  1. Step 1: Check recovery behavior configuration

    If the recovery behavior is not listed or enabled in the YAML file, it will not run.
  2. Step 2: Evaluate other options

    Battery level, speed, or map size do not prevent recovery behaviors from triggering directly.
  3. Final Answer:

    The recovery behavior is not listed in the YAML file -> Option A
  4. Quick Check:

    Missing YAML config stops recovery trigger = A [OK]
Hint: Recovery behaviors must be listed in YAML to trigger [OK]
Common Mistakes:
  • Blaming battery or speed for recovery not triggering
  • Ignoring YAML configuration
  • Assuming map size affects recovery behavior
5. You want the robot to first clear its costmap and then rotate if still stuck. How should you configure the recovery behaviors in YAML?
hard
A. recovery_behaviors: - name: rotate_recovery type: "rotate_recovery/RotateRecovery" - name: clear_costmap type: "clear_costmap_recovery/ClearCostmapRecovery"
B. recovery_behaviors: - clear_costmap_recovery - rotate_recovery
C. recovery_behaviors: - name: clear_costmap type: "clear_costmap_recovery/ClearCostmapRecovery" - name: rotate_recovery type: "rotate_recovery/RotateRecovery"
D. recovery_behaviors: clear_costmap: true rotate_recovery: true

Solution

  1. Step 1: Understand order matters in recovery behaviors

    ROS runs recovery behaviors in the order listed in YAML. To clear costmap first, it must be listed first.
  2. Step 2: Check YAML syntax and order

    recovery_behaviors: - name: clear_costmap type: "clear_costmap_recovery/ClearCostmapRecovery" - name: rotate_recovery type: "rotate_recovery/RotateRecovery" lists clear_costmap first, then rotate_recovery, with correct YAML syntax. recovery_behaviors: - name: rotate_recovery type: "rotate_recovery/RotateRecovery" - name: clear_costmap type: "clear_costmap_recovery/ClearCostmapRecovery" reverses order. Options B and C have invalid syntax.
  3. Final Answer:

    List clear_costmap first, then rotate_recovery with correct YAML -> Option C
  4. Quick Check:

    Order in YAML controls recovery sequence = D [OK]
Hint: List recovery behaviors in YAML in desired run order [OK]
Common Mistakes:
  • Reversing order of recovery behaviors
  • Using invalid YAML syntax
  • Assuming order does not matter
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard