I am looking at the code a bit. This seems easy enough, but I'm a very amatuer coder. I want to take the AMP1, build a little gimbal and hoist it on a balloon or kite, then have it hold camera position (at this point). Eventually I want to have it point at things. I can try to get a friend to help code that portion.

Basically if someone can give me a idea of what to alter in the code, (could it be as simple as "g.rc_camera_roll.servo_out    = (float)-ahrs.roll_sensor * g.camera_roll_gain; " ) I would be very grateful. if it is more complicated, please give me a route toward making this happen.

Thanks!

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • Now both ArduPlane and ArduCopter use the same code.

    Please follow the updated setup instructions here:

    http://code.google.com/p/ardupilot-mega/wiki/Tracking

  • Moderator

    The answer to this depends on whether you are using ArduPlane or ArduCopter.

    I haven't tested this solution, but here are the details.

    For ArduPlane:

    [from http://code.google.com/p/ardupilot-mega/wiki/Tracking]

    Connecting the servos

    Connect you camera roll, pitch and yaw servos to the APM auxiliary servos outputs (ch5, ch6, ch7 and ch8). You can connect them in any order you like. If you do not have or use one of them just do not connect it. You can also connect one servo to open/close the camera or to deploy/retract the camera and a servo to trigger the camera.

    After that, power your APM and connect it to the Mission Planner software. In the setup pane, assign the functions that you are using to the RC5_FUNCTION, RC6_FUNCTION, RC7_FUNCTION and RC8_FUNCTION labels.

    6       // mount yaw (pan)
    7 // mount pitch (tilt)
    8 // mount roll
    9 // mount open (deploy) / close (retract)
    10 // camera trigger

    So for example if you have mount pitch on channel 6, mount roll on channel 7, and camera trigger on channel 8, you should set:

    RC6_FUNCTION 7
    RC7_FUNCTION 8
    RC8_FUNCTION 10             <---- I don't care for this example, since CH8 is used for mode sw

    In your case, you might have:

    RC5_FUNCTION 7
    RC6_FUNCTION 8         <----- roll, not pan/yaw
    RC7_FUNCTION 10

    Here is a quick list of all the functions:

    RC_Channel_aux.h:

    AP_Int8 function; // 0=disabled, 1=manual, 2=flap, 3=flap auto, 4=aileron, 5=flaperon, 6=mount yaw (pan), 7=mount pitch (tilt), 8=mount roll, 9=camera trigger, 10=camera open, 11=egg drop

    See also the various min, max, and trim and reverse settings for those channels. These will help you get the roll just right.

    For ArduCopter, see http://code.google.com/p/arducopter/wiki/AC2_Camera as a starting point. I'm thinking you're using ArduPlane since roll and pitch are already the typical arrangement for ArduCopter.

This reply was deleted.

Activity