Skip to content

Commit

Permalink
Revert clang-tidy version; Assume constant acceleration during tracking
Browse files Browse the repository at this point in the history
  • Loading branch information
AndyZe committed Aug 14, 2024
1 parent df51b3e commit a824293
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/format.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:
jobs:
pre-commit:
name: Format
runs-on: ubuntu-24.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
Expand Down
9 changes: 8 additions & 1 deletion moveit_core/online_signal_smoothing/src/ruckig_filter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,15 @@ bool RuckigFilterPlugin::doSmoothing(Eigen::VectorXd& positions, Eigen::VectorXd
}

// Update Ruckig target state
// This assumes stationary at the target (zero vel, zero accel)
ruckig_input_->target_position = std::vector<double>(positions.data(), positions.data() + positions.size());
// We don't know what the next command will be, so assume no change in acceleration
const size_t num_joints = ruckig_input_->current_acceleration.size();
for (size_t i = 0; i < num_joints; ++i)
{
ruckig_input_->target_velocity.at(i) =
ruckig_input_->current_velocity.at(i) + ruckig_input_->current_acceleration.at(i) * params_.update_period;
}
// target_acceleration remains a vector of zeroes

// Call the Ruckig algorithm
ruckig::Result ruckig_result = ruckig_->update(*ruckig_input_, *ruckig_output_);
Expand Down

0 comments on commit a824293

Please sign in to comment.