Quadrotor simulation (only visualization, nothing more)

Typically: "How do I... ", "How can I... " questions
Post Reply
Posts: 1
Joined: 27 May 2020, 22:15

Quadrotor simulation (only visualization, nothing more)

Post by midonji »

Hello, I implemented in matlab my controller (PID) to make a quadrotor follow a desired trajectory in a environment with obstacles, so I got at each time instant (0.01s) position of quadrotor, its orientation and velocity, I have all its states. I really need to do a simulation in Coppelia but only for a visualization purpose: I need in fact to represnt my environment with obstacles and show the quadrotor movement.
I don't want to use setTargetPosition for the green sphere since it's not accurate and my quadrotor could crahs in some obstacles, I just want to disable the green sphere and directly set quadrotor position and orientation (if possible also velocity but not so crucial) I got from my controller and have a visualization of it. So i don't need gravity force, drag effect or anything else since I did it directly in MATLAB but my supervisor really wants to use also Coppelia. Can I do this? If yes, how can I implement it? How can I disable gravity, drag etc?

P.S: I used Euler angles so I have their values, which convention for angles is the most suitable with respect to my goal and compatible with your commands?

Thank you so much.

Site Admin
Posts: 8206
Joined: 14 Dec 2012, 00:25

Re: Quadrotor simulation (only visualization, nothing more)

Post by coppelia »


in order to disable dynamics for the whole model, open the model properties, and check Model is not dynamic and Model is not respondable. Then remove the child script attached to the model [Edit --> remove --> associated child script].

Then you can directly set the position and orientation of the quadcopter with sim.setObjectPosition and sim.setObjectOrientation.
From a legacy remote API Matlab client, use simxSetObjectPosition and simxSetObjectOrientation.


Post Reply