Add ramp filter for wheel speed control#214
Open
HydrogenZp wants to merge 2 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds a ramp-limited wheel speed command to smooth friction wheel acceleration and refines “shot detected” reset logic.
Changes:
- Introduce a
RampFilter<double>for wheel speed and apply it insetSpeed(). - Clear the ramp filter state when the controller starts.
- Tighten
has_shoot_reset condition with a configurable raise threshold.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| rm_dshot_shooter_controllers/src/standard.cpp | Instantiates/uses the ramp filter and updates shot-detection condition. |
| rm_dshot_shooter_controllers/include/rm_dshot_shooter_controllers/standard.h | Adds ramp filter member and includes shared filter headers. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+120
to
+122
| // Ramp filter: acc=200 rad/s², dt=0.001s → per-step limit = 0.2 rad/s | ||
| // Scales: 0→900 RPM(94.25 rad/s) in ~0.47s at 1kHz control loop | ||
| wheel_speed_ramp_filter_ = new RampFilter<double>(200.0, 0.001); |
Comment on lines
+122
to
124
| wheel_speed_ramp_filter_ = new RampFilter<double>(200.0, 0.001); | ||
| ros::NodeHandle nh_trigger = ros::NodeHandle(controller_nh, "trigger"); | ||
| return ctrl_trigger_.init(effort_joint_interface_, nh_trigger); |
Comment on lines
+120
to
+121
| // Ramp filter: acc=200 rad/s², dt=0.001s → per-step limit = 0.2 rad/s | ||
| // Scales: 0→900 RPM(94.25 rad/s) in ~0.47s at 1kHz control loop |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
为dshot_shooter_controller 添加斜坡启动和斜坡停止