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 53de800
Show file tree
Hide file tree
Showing 2 changed files with 10 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
10 changes: 9 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,16 @@ 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. Assume velocity continues forward based on current state,
// target_acceleration is zero.
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 53de800

Please sign in to comment.