Skip to content

Commit

Permalink
[mc_rbdyn] Fix frame sensor update
Browse files Browse the repository at this point in the history
The frames are not read in the order they are created so there's no
reason that the parent would be updated before its children frames.
  • Loading branch information
gergondet committed Feb 13, 2024
1 parent f4d0982 commit b84298d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/mc_rbdyn/RobotFrame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ RobotFrame::RobotFrame(NewRobotFrameToken tkn,

void RobotFrame::resetForceSensor() noexcept
{
if(parent_) { sensor_ = (static_cast<RobotFrame *>(parent_.get()))->sensor_; }
else { sensor_ = robot_.findBodyForceSensor(body()); }
sensor_ = robot_.findBodyForceSensor(body());
}

const std::string & RobotFrame::body() const noexcept
Expand Down

0 comments on commit b84298d

Please sign in to comment.