Skip to content

[nav2_planner] costmap no updated after restart #3547

@BriceRenaudeau

Description

@BriceRenaudeau

Bug report

The global costmap used by nava2_planner is not updated after a lifecycle restart

  • Operating System:
    • Ubuntu
  • ROS2 Version:
    • Humble
  • Version or commit hash:
    • Humble
  • DDS implementation:
    • cyclonedds

Steps to reproduce issue

- Start the navigation stack
- Stop it using the lifecycle `deactivate` and `cleanup`
- Restart it using the lifecycle `configure` and `activate`

Expected behavior

The nav2_planner is restarted with a working costmap.

Actual behavior

The nav2_planner is restarted with a frozen costmap.
The costmap parameters are not accessible, the static_layer is not updated.

Additional information

This happens because the costmap thread is deleted in the on_cleanup() method and is not recreated in the configure process.
https://github.com/ros-planning/navigation2/blob/1cdc277b84115ee97c94b60b2a14630d097c6975/nav2_planner/src/planner_server.cpp#L255

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions