Skip to content

Add ramp filter for wheel speed control#214

Open
HydrogenZp wants to merge 2 commits into
rm-controls:masterfrom
HydrogenZp:ramp_test
Open

Add ramp filter for wheel speed control#214
HydrogenZp wants to merge 2 commits into
rm-controls:masterfrom
HydrogenZp:ramp_test

Conversation

@HydrogenZp

Copy link
Copy Markdown
Contributor

为dshot_shooter_controller 添加斜坡启动和斜坡停止

Copilot AI review requested due to automatic review settings June 7, 2026 16:19

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 in setSpeed().
  • 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
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.

2 participants