in ctrl_pkg/src/ctrl_state.cpp [284:298]
void AutoDriveCtrl::setConstantThrottle(float throttle) {
auto srvRequest = std::make_shared<deepracer_interfaces_pkg::srv::NavThrottleSrv::Request>();
if (throttle >= 0.0 && throttle <= 1.0) {
srvRequest->throttle = throttle;
auto future_result = navigationThrottleClient_->async_send_request(srvRequest);
future_result.wait();
auto srvResponse = future_result.get();
if(srvResponse->error != 0){
RCLCPP_ERROR(ctrlNode->get_logger(), "Setting throttle failed.");
}
}
else {
RCLCPP_ERROR(ctrlNode->get_logger(), "Invalid navigation throttle: %f", throttle);
}
}