Differential Rover: Ported R1 to GZ and introduced new GZ wheel interface

This commit is contained in:
PerFrivik
2023-12-21 16:27:53 +01:00
committed by Per Frivik
parent 1e7ce32480
commit 056e41af8c
9 changed files with 286 additions and 0 deletions
@@ -226,6 +226,11 @@ int GZBridge::init()
return PX4_ERROR;
}
if (!_mixing_interface_motor.init(_model_name)) {
PX4_ERR("failed to init motor output");
return PX4_ERROR;
}
ScheduleNow();
return OK;
}
@@ -724,6 +729,7 @@ void GZBridge::Run()
_mixing_interface_esc.stop();
_mixing_interface_servo.stop();
_mixing_interface_motor.stop();
exit_and_cleanup();
return;
@@ -739,6 +745,7 @@ void GZBridge::Run()
_mixing_interface_esc.updateParams();
_mixing_interface_servo.updateParams();
_mixing_interface_motor.updateParams();
}
ScheduleDelayed(10_ms);
@@ -754,6 +761,9 @@ int GZBridge::print_status()
PX4_INFO_RAW("Servo outputs:\n");
_mixing_interface_servo.mixingOutput().printStatus();
PX4_INFO_RAW("Motor outputs:\n");
_mixing_interface_motor.mixingOutput().printStatus();
return 0;
}