Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/sas_robot_driver_ros.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,17 @@ int RobotDriverROS::control_loop()
}


// Execute the control loop callback if one has been set
if (robot_driver_->control_loop_callback_is_set()) {
RCLCPP_INFO_STREAM_ONCE(node_->get_logger(), "::Control loop callback is set and will be executed!");
try {
robot_driver_->execute_control_loop_callback();
} catch (const std::exception& e) {
throw std::runtime_error("Control loop callback execution failed: " + std::string(e.what()));
}
}


auto joint_positions{robot_driver_->get_joint_positions()};
VectorXd joint_velocities;
try{joint_velocities = robot_driver_->get_joint_velocities();} catch(...){}
Expand Down
Loading