Quadcopter Frame Configuration

Typically: "How do I... ", "How can I... " questions
Post Reply
sumeros
Posts: 2
Joined: 10 Aug 2019, 05:55

Quadcopter Frame Configuration

Post by sumeros » 13 Aug 2019, 17:50

Hi all,

I'm new to V-REP so my question might sound silly. I'm working on a quadcopter project. I've modelled my system in Matlab, I'm sending position and orientation (outputs of system) from Simulink to V-REP and simulating them simultaneously. I'm controlling my quadcopter with a joystick.

The problem is, when I make my drone to rotate through z-axis (yaw), x and y planes switch to each other. So when I try to make a pitch, i get roll. It is because the orientation is referenced to earth frame.

I want to make the orientation referenced to quadcopter's frame.

Thanks in advance

coppelia
Site Admin
Posts: 7229
Joined: 14 Dec 2012, 00:25

Re: Quadcopter Frame Configuration

Post by coppelia » 15 Aug 2019, 05:48

Hello,

not sure how the position/orientation of your quadcopter in V-REP is achieved... is your quadcopter dynamically enabled and are you acting on it with forces simulating the propeller thrust?
From your question however I suspect that you are simply reproducing the position and orientation of a passive object. In that case, you will have to work with coordinate transformations to adjust from one reference frame to another. Transformation matrices are the ideal tool for this. Have a look at (for example) sim.getObjectMatrix, sim.setObjectMatrix, and the matrix/transformation functions.

Cheers

sumeros
Posts: 2
Joined: 10 Aug 2019, 05:55

Re: Quadcopter Frame Configuration

Post by sumeros » 15 Aug 2019, 14:40

Thank you for the response,

I am simulating all the dynamical system in simulink. I'm just sending states (phi, theta, psi, etc)to v-rep. After, I use those values to simulate visually. So I guess yes, I am simply reproducing the position and orientation of a passive object. I'll try the transformation matrices now.

Post Reply