Skip to content

Mixing Wall time with simulation time in Costmap2DROS::mapUpdateLoop #3325

@AzaelCicero

Description

@AzaelCicero

Bug report

Required Info:

  • Operating System:
    • All
  • ROS2 Version:
    • All
  • Version or commit hash:
    • All
  • DDS implementation:
    • All

Steps to reproduce issue

Just use costmap_2d node with simulation time, which has very different rate than wall time. You will observe that HZ of map update and map publish is not reaching the expected value and are far off the target.

Expected behavior

Configured rates of update and publish should be achieved in respect to simulation time.

Actual behavior

Map update is reaching expected rate in respect to wall time. Publish rate is bounded to the update rate, as it can only occur during the update, yet it is triggered in respect to simulation time. Depending on the mismatch of the rate between simulation and wall time you will observe different HZ of update and publish.

Additional information

Code should be written in respect to one time source, in this case I think that simulation time is better suited.

https://github.com/ros-planning/navigation2/blob/main/nav2_costmap_2d/src/costmap_2d_ros.cpp#L461-L498

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions