Skip to content

Commit

Permalink
Merge pull request #40 in SRR/franka_ros2 from hotfix/franka-state to…
Browse files Browse the repository at this point in the history
… humble

* commit '46dc7a2297832fa1530ff27ff3e8573b01bd1311':
  hotfix: fix franka state
  • Loading branch information
BarisYazici committed Aug 22, 2023
2 parents 81c975c + 46dc7a2 commit 5273252
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions franka_hardware/src/franka_hardware_interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,11 @@ hardware_interface::return_type FrankaHardwareInterface::read(const rclcpp::Time
if (hw_franka_model_ptr_ == nullptr) {
hw_franka_model_ptr_ = robot_->getModel();
}
const auto kRobotState = robot_->readOnce();
hw_positions_ = kRobotState.q;
hw_velocities_ = kRobotState.dq;
hw_efforts_ = kRobotState.tau_J;

hw_franka_robot_state_ = robot_->readOnce();
hw_positions_ = hw_franka_robot_state_.q;
hw_velocities_ = hw_franka_robot_state_.dq;
hw_efforts_ = hw_franka_robot_state_.tau_J;

return hardware_interface::return_type::OK;
}
Expand Down

0 comments on commit 5273252

Please sign in to comment.