Fixed terrain_type = 0 not processing the input

This commit is contained in:
Axel 2022-10-11 11:02:09 +02:00 committed by bernat
parent f0b4e6af99
commit f3065f2541
1 changed files with 3 additions and 3 deletions

View File

@ -196,7 +196,7 @@ namespace learning {
auto drv_inputs = torch::tensor(
{_input.steering, _input.throttle, _input.braking}, torch::kFloat32); //steer, throtle, brake
TorchInputs.push_back(drv_inputs);
if (_input.terrain_type > 0) {
if (_input.terrain_type >= 0) {
TorchInputs.push_back(_input.terrain_type);
}
TorchInputs.push_back(_input.verbose);
@ -231,7 +231,7 @@ namespace learning {
auto drv_inputs = torch::tensor(
{_input.steering, _input.throttle, _input.braking}, torch::kFloat32); //steer, throtle, brake
TorchInputs.push_back(drv_inputs);
if (_input.terrain_type > 0) {
if (_input.terrain_type >= 0) {
TorchInputs.push_back(_input.terrain_type);
}
TorchInputs.push_back(_input.verbose);
@ -270,7 +270,7 @@ namespace learning {
auto drv_inputs = torch::tensor(
{_input.steering, _input.throttle, _input.braking}, torch::kFloat32); //steer, throtle, brake
TorchInputs.push_back(drv_inputs.cuda());
if (_input.terrain_type > 0) {
if (_input.terrain_type >= 0) {
TorchInputs.push_back(_input.terrain_type);
}
TorchInputs.push_back(_input.verbose);