MCPcopy Create free account
hub / github.com/SHAILAB-IPEC/OpenFly-Platform / set_drone_pos

Method set_drone_pos

train/eval.py:75–82  ·  view source on GitHub ↗
(self, x, y, z, pitch, yaw, roll)

Source from the content-addressed store, hash-verified

73 self._client.simSetVehiclePose(target_pose, True)
74
75 def set_drone_pos(self, x, y, z, pitch, yaw, roll):
76 self._client.moveByVelocityBodyFrameAsync(0, 0, 0, 0.02)
77 qua = euler_to_quaternion(pitch, -yaw, roll)
78 target_pose = airsim.Pose(airsim.Vector3r(x, y, z),
79 airsim.Quaternionr(qua[0], qua[1], qua[2], qua[3]))
80 self._client.simSetVehiclePose(target_pose, True)
81 self._client.moveByVelocityBodyFrameAsync(0, 0, 0, 0.02)
82 time.sleep(0.1)
83
84 def _camera_init(self):
85 '''Camera initialization'''

Callers 1

_drone_initMethod · 0.95

Calls 1

euler_to_quaternionFunction · 0.70

Tested by

no test coverage detected