Skip to content

Commit

Permalink
fix: handle missing joint splines
Browse files Browse the repository at this point in the history
  • Loading branch information
hiikariri committed Dec 29, 2023
1 parent 077dc07 commit af337b9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/akushon/action/model/action.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,9 @@ void Action::generate_splines()
joint_splines.clear();
for (auto pose : poses) {
for (auto & joint : pose.get_joints()) {
const auto it = joint_splines.find(joint.get_id());
auto it = joint_splines.find(joint.get_id());
if (it == joint_splines.end()) {
joint_splines.emplace(joint.get_id(), std::make_shared<keisan::SmoothSpline>());
it = joint_splines.emplace(joint.get_id(), std::make_shared<keisan::SmoothSpline>()).first;
}
it->second->add_point(joint.get_position(), pose.get_time());
}
Expand Down

0 comments on commit af337b9

Please sign in to comment.