neurogears / vestibular-vr

Closed-loop VR setup for Rancz Lab
2 stars 0 forks source link

Bonsai workflows #12

Open ederancz opened 1 year ago

ederancz commented 1 year ago

Hi @RoboDoig. There are 2 example workflows below.

In general, all workflows should have the following:

  1. Some sort of lab-book / metadata (time/date, animal ID, various experiment parameters e.g. gain in open loop).
  2. Save processed optical sensor signals as styrofoam ball position. If using 1 optical sensor, then cumulative forward travel of the animal (say in cm) and rotation (0-360 degrees). This will of course need to be calibrated. In the future, we may want to use 2 sensors and average them for the rotation measure.
  3. Trigger and save from 1 camera. In the future, online deepLabCut analysis would be sweet and perhaps only record pupil diameter and position.
  4. A homing function. Currently using a hall-effect sensor and a magnet and rotate the platform until we activate it.

Workflow 1. Closed loop Inputs: Target position, speed, max acceleration Outputs: motor command, styrofoam ball position, video For the future: follow arbitrary waveform as a positional command

Workflow 2. Open loop Inputs: optical sensor signal, gain (between optical sensor and motor movement)
Outputs: motor command, styrofoam ball position, video

Regarding motor command, we should discuss motion control fairly soon. It is a big field, and I am not well-versed in it.

RoboDoig commented 1 year ago

Hi @ederancz that's great, thanks!

I'll start building some templates based on those specs and then test once we have our hands on the new HARP boards.

Agreed re: motor command. Our working assumption is that we will be driving something similar to the stepper motor / driver setup in the current vestibular platform docs. The motor HARP board should be flexible enough to control a different driver, but would be good to know any further requirements.

@glopesdev

RoboDoig commented 1 year ago

Initial workflows done in bonsai-workflows branch. Need to implement proper proportional control + HARP timestamps for camera frames in next iteration.

ederancz commented 1 year ago

Some further feature requests. For shortcuts, it would be cool to be able to use either command keys or the ONIX breakout board buttons.

RoboDoig commented 2 months ago

Can I assume that this issue is superseded by #49 ? Is there anything mentioned in this issue that is missing from the more recent workflow specs?

EleonoraAmbrad commented 2 months ago

yes, this issue can be closed!

Can I assume that this issue is superseded by #49 ? Is there anything mentioned in this issue that is missing from the more recent workflow specs?

I think we can close this issue, thank you !