Skip to content

Unifies all controllers cmd_vel_timeout and reference_timeout units to be in seconds#2262

Draft
ielson wants to merge 1 commit intoros-controls:masterfrom
ielson:fix/unify-cmd-vel-timeout-unit
Draft

Unifies all controllers cmd_vel_timeout and reference_timeout units to be in seconds#2262
ielson wants to merge 1 commit intoros-controls:masterfrom
ielson:fix/unify-cmd-vel-timeout-unit

Conversation

@ielson
Copy link
Copy Markdown

@ielson ielson commented Mar 30, 2026

Summary

Change cmd_vel_timeout parameter in tricycle_controller from milliseconds (int) to seconds (double) to be consistent with the other controllers cmd_vel_timeout and reference_timeout units.

Changes

  • tricycle_controller/src/tricycle_controller_parameter.yaml: Changed type from int to double, default from 500 (ms) to 0.5 (s)
  • tricycle_controller/include/tricycle_controller/tricycle_controller.hpp: Changed member type from std::chrono::milliseconds to rclcpp::Duration
  • tricycle_controller/src/tricycle_controller.cpp: Updated initialization to use from_seconds() instead of std::chrono::milliseconds
  • tricycle_controller/config/tricycle_drive_controller.yaml: Updated config value from 500 to 0.5

Test plan

  • Build tricycle_controller package
  • Run tricycle_controller tests
  • Run pre-commit run -a

Closes #1937


Contributions via pull requests are much appreciated. Before sending us a pull request, please ensure that:

  1. Limited scope. Your PR should do one thing or one set of things. Avoid adding “random fixes” to PRs. Put those on separate PRs.
  2. Give your PR a descriptive title. Add a short summary, if required.
  3. Make sure the pipeline is green.
  4. Don’t be afraid to request reviews from maintainers.
  5. New code = new tests. If you are adding new functionality, always make sure to add some tests exercising the code and serving as live documentation of your original intention.

To send us a pull request, please:

  • Fork the repository.
  • Modify the source; please focus on the specific change you are contributing. If you also reformat all the code, it will be hard for us to focus on your change.
  • Ensure local tests pass. (colcon test and pre-commit run (requires you to install pre-commit by pip3 install pre-commit)
  • Commit to your fork using clear commit messages.
  • Send a pull request, answering any default questions in the pull request interface.
  • Pay attention to any automated CI failures reported in the pull request, and stay involved in the conversation.

Signed-off-by: Daniel Mascarenhas <daniel.mascarenhas@saipem.com>
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 this pull request may close these issues.

Unified the unit of cmd_vel_timeout

1 participant