Phill Simpson's Posts (1)

Sort by

The latest version of ArduCopter (3.2 -rc11 and above) has several new and improved mission commands  and features that make the automated capture of spherical panoramas fairly straightforward. These include a “Command-Yaw” relative command, the Do-Jump command, and an increase in the maximum number of Mission commands (waypoints) for Pixhawk users to 718. It is now possible to create a mission to capture a 10 column by 5 row mosaic panorama with as little as 30 commands using the “Do-Jump” command.  If you want to take advantage of the of the increasing overlap in the images as the camera approaches the nadir (fewer images per row), you won’t be able to use the “Do-Jump” command and will have to manually code for each row of photos – but now you won’t bump up against the previous limit for the number of commands in a Mission for any reasonably sized panorama.

  

The video shows the testing of the Command-Yaw command along with a demo of using it for a panorama. I’ve attached a copy of the Mission file I use for a 5 row, 10 column panorama.  The basic flow for the Mission script is to position the frame in a specific yaw direction (e.g., North or East), rotate the gimbal up to row 1, then take a photo. The script then rotates the gimbal to row 2 and takes another picture. After it completes row 5 it yaws CW by 36 degrees and takes another row of pictures. It continues this until all 10 columns are captured. The servo values for the gimbal angles and the amount of yaw for each column are dependent upon the field of view of your camera. 5 rows by 10 columns works well for a Canon SD900. 4 rows by 8 columns works well for a NEX 5N with the 16mm pancake lens and gives about the same resolution panorama. A completed panorama can be seen at the link below.

  

The view from above Paradise, California (http://www.360cities.net/image/the-view-from-above-paradise-california)

  

I’m interested in hearing how others are using their copters to do aerial panoramas.

Original Mission

Panorama-Mission-10-Col-5-Row-Start-East-Relative.txt

I’ve been doing some further experimenting after being disappointed in not being able to capture a full size equirectangular jpg panorama (30,000 x 15,000 pixels) with my previous SD900 camera settings and original mission plan. I’ve found that a zoom setting of 2 gives a FOV of each image of about 40 degrees horizontal and 30 degrees vertical would give enough resolution to produce a 30,000 x 15,000 pixels panorama using a 6 row by 14 columns. Unfortunately, a rectangular matrix this large to capture the panorama would require too many pictures (84) and require too much flight time.  The alternative to a matrix panorama is one where each row has a different number of images based on its pitch angle. As the pitch angle nears the zenith or nadir, fewer columns are needed in each row. After some tests with my tripod mounted panorama head I came up with the following mission parameters for the panorama:

Row #  Pitch Angle   # Of Columns  Angle Between Images

1            +20                  13                     28

2               0                   14                     26

3             -21                  13                     28   

4             -43                  11                     33

5             -62                    8                     45

6             -85                    2                   180

Using this mission the number of photos is reduced to 61 and the time to completion is well within my maximum mission time of 13 minutes (it takes 9 minutes for the photos plus the time to fly to the correct position and then land safely afterwards).

If you are using PTGui or Autopano to build the panorama, the initial layout of the photos is easier if you use a PapyWizard XML file with the camera angles. I’ve attached both the mission and PapyWizard xml files to this post for anyone who wants to try it. There are a few things you need to know about the mission file if you decide you want to use it:

First, you will need to compute the elevation servo settings for your specific gimbal. I taped a printout of a setting circle on the gimbal and put a pointer on the camera then tried various pitch values via a short mission file (on the bench with the props removed) until I found what was needed.

Second, the mission file contains a hybrid of Do-Jump commands for the first three rows and multiple repetitions of similar code for rows 4 through 6. This is because Arducopter 3.2 only allows a maximum of three Do-Jump commands in a mission. That is due to change in 3.3 for PixHawk users but we aren’t there yet.

Third, if a Do-Jump command is preceded by a Condition-Yaw command, there must be a waypoint in between them that provides enough of a delay that the Command-Yaw has time to complete before the flight controller hits the Do-Jump command. If it is not, the Do-Jump command gets skipped. For my frame this is about 3-4 seconds for short rotations, longer for large rotations, yours may be different.

Lastly, you will need to provide enough time for the camera to take an image before moving to the next image. In my case, I need 4 seconds for the images to be captured. I use a small CHDK script (Zoom2.bas) to set the zoom and take two photos (in case one is blurry). It takes about two seconds from the time the shutter command is sent  for the script to take the first photo, then almost another two seconds for the second photo to be taken. So there’s a Waypoint command after each Do-Digicam command with a 4 second wait and zero Lat, Lon, and Alt.

You’ll notice that the area between the zenith and about 35 degrees elevation is not covered in the mission. You’ll need to make a separate sky panorama using a pano head to capture the top portion and then blend it with the bottom portion. But, if you’ve gotten this far you already know how to do that.

A test of the mission and methods used above can be found at: http://www.360cities.net/image/over-bille-park-in-paradise-california

 

Mission with Zoom set to 2 and 61 images

SD900%20_Zoom_2_Pano_61_Images_99_Commands.txt

Papywizard XML file

papywizard_SD900_Zoom2_6Row.xml

CHDK File

Zoom2.bas

Read more…