Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Costmaps header stamps are set to 0 #2897

Closed
charlielito opened this issue Apr 7, 2022 · 5 comments · Fixed by #2899
Closed

Costmaps header stamps are set to 0 #2897

charlielito opened this issue Apr 7, 2022 · 5 comments · Fixed by #2899

Comments

@charlielito
Copy link
Contributor

Bug report

/local_costmap/costmap or /global_costmap/costmap topics header stamps are set to 0. Is this somehow intentional?

  • Operating System:
    • Ubuntu 20.04
  • ROS2 Version:
    • Galactic binaries
  • Version or commit hash:
    • Galactic binaries 1.0.8-1focal.20220211
  • DDS implementation:
    • Cyclone

Steps to reproduce issue

Launch the nav2 stack as usual then see /local_costmap/costmap or /global_costmap/costmap topics header and note that they are set to 0.

Expected behavior

Header stamps consistent with system time

Actual behavior

Header stamps set to 0

Additional information

I see that the header stamp is set here to

  grid_->header.stamp = rclcpp::Time();

which AFAIK is the reason it is set to 0.

@SteveMacenski
Copy link
Member

I don't think it is intentional to be 0, please submit a PR to implement with the real time!

@charlielito
Copy link
Contributor Author

Done #2899

@Jos-Meran
Copy link

Hi there, I have the same problem in ROS2 Foxy. Saw what you did to fix it (from grid_->header.stamp = rclcpp::Time(); to grid_->header.stamp = clock_->now();), but I can't seem to find the file (costmap_2d_publisher.cpp) where the header stamp is defined. I don't know much about this stuff, but is this something that I can't do locally and has to be fixed directly in the foxy-devel branch of the nav2 package? If so, how could I push this change?

@SteveMacenski
Copy link
Member

Foxy is EOL and has not receive updates for some time

@Jos-Meran
Copy link

Oh, so should I install the package from source and use the main branch?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants