Quadcopter Drone Model with Unity Plugin #2891
Unanswered
kalzoo
asked this question in
Asking for Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Intro
Hello all -- I'm working to integrate open-source drone autopilots (like Ardupilot) with Unity for automated flight simulation.
My setup
Unity 6, Mujoco 3.3.5, OSX
My question
there's a "reference" drone architecture provided in the menagerie, which is great. However, this is not importable by the Unity plugin, namely due to the error on
motor
: it needs a "joint or tendon," and just asite
is not enough.However, no modifications I've used have been sufficient to make the drone respond correctly to the autopilot control. Does anyone have a working example of such an integration or at least a model?
Minimal model and/or code that explain my question
So i've tried two different remedies (with full XML posted below):
Approach 1:
joint="root"
andgear
to represent the force offset from the drone's origin. Intuitively, I might think that using rotational force in this way wouldn't work, and opposite motors might cancel out the torque from one another on the main body, but this does fly in Mujoco's desktop application.However, in Unity, it just sits and is not affected by the force on the motors. it's not a matter of insufficient force - I've scaled it appropriately.
Full XML
Approach 2: Different drone structure with
hinge
s. This drone does react to physical input, but it flops around out of control and does not appear to react to forces in an intuitive way. The autopilot is not able to control it. While this could be due to the handling of autopilot inputs & outputs within the bridge code, that has been debugged and inspected carefully. I suspect that this file is not configured correctly:XML
Confirmations
Beta Was this translation helpful? Give feedback.
All reactions