Skip to content

Commit 552bca0

Browse files
committed
fix resize bug
1 parent 5574059 commit 552bca0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

whole_body_controllers/src/ik_controller.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ auto IKController::on_init() -> controller_interface::CallbackReturn
8080
*model_ = reduced_model;
8181
data_ = std::make_shared<pinocchio::Data>(*model_);
8282

83-
position_interface_names_.reserve(model_->nq);
84-
velocity_interface_names_.reserve(model_->nv);
83+
position_interface_names_.resize(model_->nq);
84+
velocity_interface_names_.resize(model_->nv);
8585

8686
// save the interface names in the same order as the model
8787
// start at index 1 to skip the universe joint
@@ -283,8 +283,8 @@ auto IKController::update_reference_from_subscribers(const rclcpp::Time & /*time
283283
for (std::size_t i = 0; i < reference.size(); ++i) {
284284
reference_interfaces_[i] = reference[i];
285285
}
286-
287286
common::messages::reset_message(current_reference);
287+
288288
return controller_interface::return_type::OK;
289289
}
290290

0 commit comments

Comments
 (0)