TaigaCam and camera stabilizer, pan test

TaigaCam and Ardupilot tries to look home position all the time. Camera can turn about 100 degrees. In Ardupilot there is no compass, and therefore it calculates flight direction once per second according to gps. That's why camera turns slowly.
This pan-system needs only one line of code to Ardupilot. In plane there is also roll stabilizer, and it needs also only one line code.

 

If I should build a pan/tilt camera, I would first build a platform, that is always in level. Then I would install the pan/tilt camera on it. This system needs only 4 lines code to Ardupilot, and all free servo channels... In the main program there is fast_loop. To the end of this subroutine, just above }, I should add these lines. (I have not tested the last line = tilt)

 

APM_RC.OutputCh(CH_5, constrain(g.rc_6.radio_in - (dcm.roll_sensor / 10),900,2100)); 
APM_RC.OutputCh(CH_6, constrain(g.rc_7.radio_in + (dcm.pitch_sensor / 10),900,2100));  
APM_RC.OutputCh(CH_7, constrain((wrap_360(get_bearing(&current_loc, &home) - g_gps->ground_course) / 10) + 500,900,2100));
APM_RC.OutputCh(CH_8, constrain(atan(((float)get_alt_distance(&current_loc, &home) / 100) / (float)get_distance(&current_loc, &home)) * 573 + 1000,900,2100));

 

Views: 401

Tags: APM, Ardupilot, TaigaCam, camera, stabilizer

Comment by Johann Van Niekerk on May 14, 2011 at 9:51am

Hi Alpo

 

You have a nice setup, thank you for sharing the code.

Comment by Guntars on May 14, 2011 at 12:59pm
Can you write the code for following the separate GPS point of interest? Good for AP.
Comment by Rory Paul on May 14, 2011 at 3:22pm
Nice to see you here Alpo!
Comment by iw28 on May 15, 2011 at 3:40am
very cool !
great if I want to zoom on an obejct while flying :)

Comment

You need to be a member of DIY Drones to add comments!

Join DIY Drones

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

Groups

Advertisement

© 2013   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service