Page 1 of 1

Quadcopter Dynamics

Posted: 09 Nov 2021, 16:48
by chanukajanith9689
I'm working on a project to, land quadcopter correctly when it is facing to disturbances at landing time. I choose CoppeliaSim to simulate my project. I want to know that how do I reconstruct the quadcopter lua code in CoppeliaSim.

I mean, I want to program quadcopter,
  • using my own controller (PID, H Infinity, Sliding mode controller etc.)
  • use basic equations of quadcopter dynamics in research papers.

Re: Quadcopter Dynamics

Posted: 10 Nov 2021, 10:24
by coppelia
Hello,

best is to use a simple model of a rigid quadcopter. The simplest would be to use a 4 cylinders (inside of a compound shape) representing your 4 propellers.
Then, there are a few API functions that you will have to use:
  • sim.addForceAndTorque (applying a force and/or torque about the center of mass). To emulate lift, drag, etc.
  • sim.addForce (applying a force at a specific position on a shape). To emulate drag, etc.
  • sim.getObjectVelocity (needed if you want to emulate drag)
Keep in mind that when adding a force/torque, you'll have to do that in each simulation step.

Cheers