Building a mult-camera rig - page 6 - Hotwire! Hardware Mods, Accessories and Insights - CHDK Forum

Building a mult-camera rig

  • 244 Replies
  • 99443 Views
*

Offline reyalp

  • ******
  • 14126
Advertisements
But did you look at this :  http://chdk.setepontos.com/index.php?topic=11490.msg112688#msg112688  ?
Yup, that and the thread linked at the bottom should be a good starting point.

Quote
* Have your PC issue a command or commands (sequentially or all-at-once) to every camera telling it to start the shooting process.
* When that is complete, and your subject is ready, you will open the red wire (+5) to complete the shot.
I'm not sure what is intended here by "start the shooting process"

If this includes pressing the shoot button, you will need to make sure that multicam isn't trying to poll the camera  waiting for the shot to complete. At a minimum this means you need to use mc:cmd() instead of mc:cmdwait(). I'm not sure off the top of my head if other changes will be required.

The default shoot command returns some status in messages. At a minimum, you'd want to flush them after chdkptp is in control again. You can use mc:flushmsgs() to do this. mc:cmd() and mc:cmdwait() automatically do this before sending the command.

Another thing you need to be aware of is when the script is running. When you do mc:start(), it start a script on the camera. The script runs until you send !mc:cmd('exit')
chdk script overrides (setting shutter speed etc) are generally cleared when the script exits, so you must not exit between setting your exposure settings and actually triggering the shot.

On the other hand, chdkptp cli commands (like mdownload) generally expect to be able to run their own script, which will fail if the multicam script is running, so you would need to exit the script before using them. You can use download -nolua while a script to download a single file if you know the exact name.
Don't forget what the H stands for.

I'm not sure what is intended here by "start the shooting process"
I was purposely being non-specific.  I was looking for any ptp command, remote script, local script, or magic incantation that lets you tell camera to enter a shooting sequence from your PC. That means it doing the equivalent of a "full press" and then moving along the path to where "wait for remote" hook is inserted in capt_seq.c.  Whatever it is needs to not care how long the shoot takes to complete - that will happen when the red wire in the USB cable opens, although neither the camera or PC should be aware that has happened (regular communication is maintained with my kbd.c hack)_.

Edit : it seems easy to do this with an on camera startup script that uses read_usb_msg() for example. The script starts shooting on a message and returns the current image name in response to another message. It never needs to start & stop that way if the ptp image transfer uses "-nolua". Perhaps something similar to the script downloaded by multicam.Lua?  If I spend anymore time on this, I might as well start a wikia page that combines most of the hardware & software recent posts on how to build and run a basic multi camera "bullet time" rig.
« Last Edit: 23 / June / 2014, 14:06:49 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

at the moment I am dealing with Rig fabrication
hope to finish it and go back to coding :)

at the moment I am dealing with Rig fabrication
hope to finish it and go back to coding :)
Nice !

I broke down and played with this tonight.  Attached is a simple Lua script that can be used on each camera on your rig.  If you select this script in the Script menu and then set Autostart to On,  it will
  • load when you turn the camera on
  • switch the camera to shooting mode
  • set the zoom position (optional)
  • enable the USB remote for sync operation
  • set a few camera specific things like turning the flash off and disabling image stablization
  • put a large yellow & red shot count in the center of the display so that you can see from a distance that the script is running
  • wait for messages to be received via ptp
  • act on those messages (see below)
  • if you press the shutter key to exit it will first clean up after itself,  and disable USB remote operation

Once the script is running,  it will respond to four messages sent over CHDK ptp. If you use chdkptp in command line mode then those are :
Code: [Select]
con> putm shoot
con> putm image?
con> getm
1:user:'A/DCIM/148___06/IMG_6586.JPG'
con> putm halt
con> putm shutdown

When you issue the shoot command,  the shooting sequence start and waits for the USB power to turn off before completing the shot ( SYNC ! ).  Naturally, this needs the hacked version of CHDK I made for you that has the necessary changes to kbd.c .  I suppose I should add a scripting function that can enable / disable this so that it can maybe go into the standard build.

Next step is to automate this at the chdkptp end for multiple cameras.
« Last Edit: 23 / June / 2014, 22:57:03 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline reyalp

  • ******
  • 14126
If you are using PTP, you don't need to autostart, you can just start the script from ptp as multicam does.

The only thing autostart would get you is ensuring the remote setting is correct to allow ptp access. That might be worthwhile.

If you want to interact with a bunch of cameras over PTP, you are probably better off re-using the multicam code (YMMV of course...). The camera side script can be extended relatively easily, it's in the string passed to rlibs:register. It sits in a loop waiting for messages, so adding your own commands should not be a big deal.

One advantage of having all the script sent over USB is you don't have to worry about keeping the right version on every camera.
Don't forget what the H stands for.

If you want to interact with a bunch of cameras over PTP, you are probably better off re-using the multicam code (YMMV of course...). The camera side script can be extended relatively easily, it's in the string passed to rlibs:register. It sits in a loop waiting for messages, so adding your own commands should not be a big deal.
That's where I was going next.  Baby steps first - I wanted to be sure I understood what needed to be on the camera and test with the kbd.c hack.

Quote
One advantage of having all the script sent over USB is you don't have to worry about keeping the right version on every camera.
Good point - the autostart script could just ensure the USB ports is setup correctly if we add script support for switching into "ptp & remote sync" mode.
Ported :   A1200    SD940   G10    Powershot N    G16

waterwings - I used your new code, but missed your point...
I  followed your command , and the script finished - I wasn't able to restart it by PTP command (from PC)
it required camera hard restart..

Also I could not download (d) the file to PC

I would appreciate your assistance


regards

 

waterwings - I used your new code, but missed your point...
I  followed your command , and the script finished - I wasn't able to restart it by PTP command (from PC)
it required camera hard restart..

Also I could not download (d) the file to PC
that's probably because I have not written the PC code yet
Ported :   A1200    SD940   G10    Powershot N    G16


waterwings - any progress with the code ?

 

Related Topics


SimplePortal © 2008-2014, SimplePortal