Camera roll stabilization.

General discussions on the Gluon-project that don't fit elsewhere. If required, I will create more subforums.

Moderator: lukasz

Camera roll stabilization.

Postby daedalus » Thu Jun 16, 2011 4:53 am

Hi Tom,

Somewere in February you said "Roll stabilization of the camera is possible (1 servo output is direct
proportional with the roll angle)."
I would like to test this but where do I start?
daedalus
 
Posts: 38
Joined: Tue Apr 05, 2011 4:50 pm
Location: Romania

Re: Camera roll stabilization.

Postby Tom » Sun Jun 19, 2011 8:24 am

I would need to add 1 additional line to the source code.

Here I added another output (servo 6) to the aileron mixing mode:

control.c
Code: Select all
      default:  // aileron
         number_of_controlled_channels = 6;
                        if (config.control.reverse_servo6)
            servo_out[5] = -(int)(sensor_data.roll*636.0) + 1500;
         else
            servo_out[5] = +-(int)(sensor_data.roll*636.0) + 1500;


Attached the hex file (untested, from development code)

Let me know how it went!
Attachments
rtos_pilot.X.production.hex
(358.5 KiB) Downloaded 612 times
User avatar
Tom
Site Admin
 
Posts: 1016
Joined: Fri Nov 13, 2009 6:27 pm
Location: Belgium

Re: Camera roll stabilization.

Postby Tom » Sun Jun 19, 2011 7:36 pm

I forgot to tell you: this latest version (development) uses 57600 baud in gluonconfig...

Tom
User avatar
Tom
Site Admin
 
Posts: 1016
Joined: Fri Nov 13, 2009 6:27 pm
Location: Belgium

Re: Camera roll stabilization.

Postby daedalus » Tue Jun 21, 2011 7:03 pm

And it worked really well.

Thank you Tom!
daedalus
 
Posts: 38
Joined: Tue Apr 05, 2011 4:50 pm
Location: Romania

Re: Camera roll stabilization.

Postby daedalus » Thu Aug 04, 2011 4:56 am

What I've noticed is that in Gluonconfig Configuration/Servos tab reversing the servo 6 does not change anything on the servo. Is working always in the same direction.
daedalus
 
Posts: 38
Joined: Tue Apr 05, 2011 4:50 pm
Location: Romania

Re: Camera roll stabilization.

Postby Tom » Thu Aug 04, 2011 7:49 am

Good remark, I'll update this as well :-)
User avatar
Tom
Site Admin
 
Posts: 1016
Joined: Fri Nov 13, 2009 6:27 pm
Location: Belgium

Re: Camera roll stabilization.

Postby Vanags » Sat Aug 06, 2011 8:06 pm

Tom, why do you need 57600 baud rate ?
1) most long range systems uses low baud rate, because of low wavelength.
2) Not everybody loves XBee as such
3) If bandwidth is high the code is not efficient, and it may eat up the CPU. (like CSV is much worse than binary packet )
4) Lost packet retransmission requires some overhead. (Some RF transceivers does it by themselves, and it requires half of the bandwidth )
Vanags
 
Posts: 4
Joined: Sat Aug 06, 2011 7:51 pm

Re: Camera roll stabilization.

Postby Tom » Sun Aug 07, 2011 7:28 pm

Good questions...

1) That's true. But the baudrate can easily be changed (in code) and the telemetry rate can easily be slowed down. The actual rate is about 500 bytes per second in fast mode, or 200 bytes in slow mode. So even 2400 baud should not be a problem.So the serial baudrate should not always be the same as RF baudrate.
2) That's true, but as a developer I need to make some choices. So yes, it's currently optimized for XBee.
3) Also true... But the code is quite modular, so for example MAVlink is easy to implement.
4) Yes, currently there is no packet retransmission.
User avatar
Tom
Site Admin
 
Posts: 1016
Joined: Fri Nov 13, 2009 6:27 pm
Location: Belgium

Re: Camera roll stabilization.

Postby Vanags » Sun Aug 07, 2011 7:57 pm

Tom, thanks for explanation! 500bps is absolutely OK.
Vanags
 
Posts: 4
Joined: Sat Aug 06, 2011 7:51 pm

Re: Camera roll stabilization.

Postby daedalus » Wed Aug 10, 2011 1:01 pm

Tom, I still want to reverse the direction of the servo 6.
I there a way to generally modify a variable if it's not on the GluonConfig interface?
Some command line?
daedalus
 
Posts: 38
Joined: Tue Apr 05, 2011 4:50 pm
Location: Romania

Next

Return to General

Who is online

Users browsing this forum: No registered users and 34 guests

cron