Skip to content

Remove unnecessary publish_limited_velocity_ member variable#2265

Closed
greencookie-afk wants to merge 1 commit intoros-controls:masterfrom
greencookie-afk:remove-unnecessary-publish-limited-velocity-member
Closed

Remove unnecessary publish_limited_velocity_ member variable#2265
greencookie-afk wants to merge 1 commit intoros-controls:masterfrom
greencookie-afk:remove-unnecessary-publish-limited-velocity-member

Conversation

@greencookie-afk
Copy link
Copy Markdown

Summary

  • Remove the redundant publish_limited_velocity_ member variable from DiffDriveController
  • Use params_.publish_limited_velocity directly instead of maintaining a separate copy

Motivation

As noted in issue #2246, publish_limited_velocity_ is just a copy of params_.publish_limited_velocity. Since params_ is already a class member, there's no need to maintain this redundant state.

Changes

  • Removed bool publish_limited_velocity_ = false; from the header file
  • Replaced all uses of publish_limited_velocity_ with params_.publish_limited_velocity in the implementation

Fixes #2246

Use params_.publish_limited_velocity directly instead of maintaining a
separate member variable that mirrors the parameter value.
@greencookie-afk greencookie-afk closed this by deleting the head repository Mar 31, 2026
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.

DiffDrive: Remove unnecessary member variable

1 participant