Hi everyone,

I have had my octorotor flying using the 2.7 version of the code and everything is going well.

I would now like to change the reference frame of the vehicle so that it is valid on a global frame. This means that regardless of the vehicle attitude from where I am standing, if I want it to fly to my left I use the control stick to point to the left and it goes that way even if it means that the vehicle is pitching instead of rolling.

I have gone through the code as well as I can and found a line that says motor_to_channel_map. (this is in line 189 of AP_MotorsMatrix.cpp) and then line 39 of AP_Motors.cpp states:

// initialise motor map
    if( APM_version == AP_MOTORS_APM1 ) {
        set_motor_to_channel_map(APM1_MOTOR_TO_CHANNEL_MAP);
    } else {
        set_motor_to_channel_map(APM2_MOTOR_TO_CHANNEL_MAP);
    }

Can anyone please help me to find where this mapping is taking place?

This will be the basis for applying some university research into control allocation so that I can perform motor failure flight testing.

Thanks for any help.

Aryeh

Views: 61

Reply to This

Replies to This Discussion

Simple mode remaps the user input based on yaw. Does that help?
It's a simple vector rotation. It's far more upstream than what your talking about.

Thanks for that reply, but this is to do with a more ambitious plan for using a pseudo-inverse method to determine control allocation (I've written a paper on the theory of it and now I've got to put it in to practise!).

For example, I've got a switch that cuts the power to one of the motors. The vehicle should reconfigure the voltage demands between the remaining 7 motors to perform exactly the same as when there are 8 motors (up to a point, obviously since there is less total thrust).

As it is, if a motor fails then the vehicle drops altitude and rolls towards the broken motor...

Thanks

Aryeh

How is your control allocation going on? Did you implement the pseudo inverse method onboard?

RSS

Social Networking

Contests

Season Two of the Trust Time Trial (T3) Contest has now begun. The fourth round is an accuracy round for multicopters, which requires contestants to fly a cube. The deadline is April 14th.

A list of all T3 contests is here

Advertisement

© 2013   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service