JARVIS-MoCap / JARVIS-AcquisitionTool

AcquisitionTool to record multi-camera recordings for the JARVIS 3D Markerless Pose Estimation Toolbox

Home Page:https://jarvis-mocap.github.io/jarvis-docs/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

arduino acquisition sometimes captures no frames

timsainb opened this issue · comments

It's a bit hard to describe this bug because I don't know exactly what's going on.

Sometimes when starting AcquisitionTool up, I am unable to get the arduino acquisition working. Terminal says it is starting acquisition, but no frames are captured. When I switch over to non-arduino acquisition, the cameras work fine. To fix the problem, I unplug all of the USBs as well as the arduino, reboot the computer, and re-create the camera settings defaults. I haven't been able to localize the problem to any one component so I just reinitialize them all.

I also have had trouble with the cameras continuing to acquire after pressing pause or stop, which freezes the GUI. Maybe these two are related, and the arduino gets stuck in a loop and needs to be rebooted to communicate with the GUI again.

I think what you are describing are two different issues, so I'll try to answer them separately.

  1. Capture not starting: Does stopping and restarting the acquisition a few times fix the issue? I'm asking because sometimes after restarting the computer (and especially after reflashing the firmware) the Arduino seems to be in a weird state that makes it require a few attempts to get it to start streaming. The fact that using the cameras in non-trigger mode works fine suggests that it is an issue with the Arduino not the cameras. I will do some testing on my side to see if I can reproduce this issue and let you know if I have any updates.
  2. Capture not stopping: This is very likely due to one of your cameras Trigger Mode not being configured correctly. The problem is that when an external Trigger is connected the software waits until there are no more frames being streamed from all cameras. This is to make sure that any buffered frames get transmitted before the capture is stopped. The problem occurs when a cameras Trigger Mode is set to Off, in that case it will capture frames indefinitely and the capture never stops, causing the GUI to freeze.
    TLDR: Can you double check that all cameras are in Trigger Mode: ON before you start the acquisition and check if the issue still persists.

Writing this I realize that the software should definitely check the Trigger Mode configuration of all cameras at the start of a recording, I'll add that to the TODO list for the next release.

As always, thanks for all the detailed bug reports and please let me know if this helps in resolving those two issues.

Ok, for the capture not starting, I think you are right, it is an arduino issue. All I had to do was unplug and replug and then reinitialize the trigger in the GUI and things work fine again.

For posterity and anyone in the future having this issue, here is a sample of the readout I get when this is happening:

[Acquisition is running w/o trigger]

T: 371
FL: 478
FR: 523
T: 355
FR: 309
FL: 383
T: 457
FR: 303
FL: 514
T: 356
FR: 400
T: 382

[press pause]

Trying to stop Acquisition
FL: 1700
stopped Worker
FL: 415
FR: 827
FL: 414
FR: 748
FR: 339
FL: 376
FR: 375
FL: 398
FR: 389
FL: 376
FR: 1007
FR: 394
FL: 773
FR: 456
FL: 418
FR: 460
FL: 477
FR: 513
FL: 541
FR: 563
FL: 434
FR: 465
FL: 399
FR: 315
FL: 507
FR: 443
FL: 534
FR: 542
FL: 643
FR: 1894
FR: 417
FL: 552
FR: 416
FL: 555
Trying to stop Acquisition
FR: 411
stopped Worker
FL: 599
FL: 534
FL: 770
FL: 392
FL: 657
FL: 358
FL: 386
FL: 333
FL: 359
FL: 388
FL: 526
FL: 519
FL: 368
FL: 384
Trying to stop Acquisition
stopped Worker

[Switch to arduino trigger]

VALUE: FrameBurstStart
VALUE: Off
VALUE: On
VALUE: Line3
VALUE: ReadOut
VALUE: Off
VALUE: On
VALUE: Line3
VALUE: ReadOut
VALUE: On
VALUE: Off
VALUE: Line3
VALUE: ReadOut
VALUE: Off
VALUE: On
VALUE: Line3
VALUE: ReadOut
VALUE: Off
VALUE: On
VALUE: Line3
VALUE: ReadOut
VALUE: Off
ttyACM0
VALUE: Default
VALUE: On
VALUE: FrameStart
VALUE: Line3
VALUE: Off
VALUE: BayerRG8
VALUE: Off
VALUE: Off
VALUE: Default
VALUE: On
VALUE: FrameStart
VALUE: Line3
VALUE: Off
VALUE: BayerRG8
VALUE: Off
VALUE: Off
VALUE: Default
VALUE: On
VALUE: FrameStart
VALUE: Line3
VALUE: Off
VALUE: BayerRG8
VALUE: Off
VALUE: Off
VALUE: Default
VALUE: On
VALUE: FrameStart
VALUE: Line3
VALUE: Off
VALUE: BayerRG8
VALUE: Off
VALUE: Off
VALUE: Default
VALUE: On
VALUE: FrameStart
VALUE: Line3
VALUE: Off
VALUE: BayerRG8
VALUE: Off
VALUE: Off
2
acquisitionSpecs2

[Try playing and pausing a few times]

Trying to stop Acquisition
stopped Worker
Trying to stop Acquisition
stopped Worker
Trying to stop Acquisition
stopped Worker
Trying to stop Acquisition
stopped Worker
Trying to stop Acquisition
stopped Worker

The not stopping issue hasn't happened to me again but I'll try to dig deeper next time it does.

I haven't reproduced this issue in a while so I'll close this.