bool TriggerReset(SetBool.Request req, ref SetBool.Response resp) { Debug.Log("reset orientation service!"); droneController.TriggerReset(); droneController.ApplyMotorForce(Vector3.zero); droneController.ApplyMotorTorque(Vector3.zero); return(true); }
bool ClearPathService(SetBool.Request req, ref SetBool.Response resp) { Debug.Log("clear path service!"); PathPlanner.Clear(); resp.message = ""; resp.success = true; return(true); }
bool ConstrainTorqueX(SetBool.Request req, ref SetBool.Response resp) { Debug.Log("constrain_torque_x service!"); droneController.ConstrainTorqueX = req.data; resp.message = droneController.ConstrainTorqueX.ToString(); resp.success = true; return(true); }
void _SetGravity() { SetBool.Request req = new SetBool.Request(); SetBool.Response resp = new SetBool.Response(); req.data = _useGravity; if (gravityService.call(req, ref resp)) { Debug.Log("gravity service called: " + _useGravity); } }
bool ConstrainTorqueZ(SetBool.Request req, ref SetBool.Response resp) { Debug.Log("constrain_torque_z service!"); droneController.ConstrainTorqueZ = req.data; resp.message = droneController.ConstrainTorqueZ.ToString(); resp.success = true; // droneController.TriggerReset (); droneController.ApplyMotorForce(Vector3.zero); droneController.ApplyMotorTorque(Vector3.zero); return(true); }
bool GravityService(SetBool.Request req, ref SetBool.Response resp) { Debug.Log("gravity service!"); droneController.UseGravity = req.data; resp.message = droneController.UseGravity.ToString(); resp.success = true; // droneController.TriggerReset (); droneController.ApplyMotorForce(Vector3.zero); droneController.ApplyMotorTorque(Vector3.zero); return(true); }
void CallReset() { if (!init) { return; } SetBool.Request req = new SetBool.Request(); SetBool.Response resp = new SetBool.Response(); if (resetService.call(req, ref resp)) { Debug.Log("reset called!"); } }