Comments (8)
Hi @abhatikar, thanks for submitting the issue and sorry for my late response, I must have missed the notification.
I've updated the data collecting script, and it should work much better now, the issue you've posted should also be fixed.
Could you try the latest version if it works on your side?
from depthai-experiments.
If it still does occur please reopen this issue - thanks!
from depthai-experiments.
I tried to run this but got the same error I think.
Is it perhaps the API version in the requirement.txt file that is old or something?
upon running python main.py (after installing requirements etc)
I got the following output.
XLink initialized.
Sending internal device firmware
Successfully connected to device.
Loading config file
Attempting to open stream config_d2h
watchdog started
Successfully opened stream config_d2h with ID #0!
Closing stream config_d2h: ...
Closing stream config_d2h: DONE.
EEPROM data: valid (v5)
Board name : BW1098OBC
Board rev : R0M0E0
HFOV L/R : 71.86 deg
HFOV RGB : 68.7938 deg
L-R distance : 7.5 cm
L-RGB distance : 3.75 cm
L/R swapped : yes
L/R crop region: center
Rectification Rotation R1 (left):
0.999864, 0.016232, 0.002884,
-0.016238, 0.999866, 0.002230,
-0.002848, -0.002277, 0.999993,
Rectification Rotation R2 (right):
0.999999, 0.000080, -0.001562,
-0.000084, 0.999997, -0.002253,
0.001561, 0.002253, 0.999996,
Calibration intrinsic matrix M1 (left):
859.917786, 0.000000, 645.017822,
0.000000, 860.377319, 406.043121,
0.000000, 0.000000, 1.000000,
Calibration intrinsic matrix M2 (right):
859.195618, 0.000000, 645.630066,
0.000000, 859.641479, 410.341980,
0.000000, 0.000000, 1.000000,
Calibration rotation matrix R:
0.999860, 0.016145, 0.004445,
-0.016165, 0.999859, 0.004484,
-0.004372, -0.004555, 0.999980,
Calibration translation matrix T:
-7.468040,
-0.000597,
0.011661,
Calibration Distortion Coeff d1 (Left):
-5.557055, 19.712475, -0.001085, -0.000592, -22.634150, -5.610113, 19.916449,
-22.829298, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000,
Calibration Distortion Coeff d2 (Right):
-4.775003, 15.271010, -0.001516, -0.001070, -16.158022, -4.832639, 15.489353,
-16.363111, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000,
Traceback (most recent call last):
File "/home/jonititan/Projects/DepthAI/depthai-experiments/collecting-training-data/main.py", line 19, in
device.request_af_mode(getattr(depthai.AutofocusMode, args.autofocus, depthai.AutofocusMode.AF_MODE_AUTO))
TypeError: getattr(): attribute name must be string
Stopping threads: ...
Stopping threads: DONE 0.000s.
Closing all observer streams: ...
Closing all observer streams: DONE.
Reseting device: 0.
Reseting: DONE.
Camera seems to work fine with most of the other experiment examples.
from depthai-experiments.
Thanks for checking @jonititan, indeed I incorrectly handled the None
case of the -af
flag. This PR should resolve this issue, tested it on my side and it works now
from depthai-experiments.
Thanks for that it does run now that autofocus flag issue is sorted but doesn't capture frames. Some sort of write error.
cv2.imshow never triggers and no frames get displayed.
See a section of the output.
CNN to depth bounding-box mapping: start(318, 38), max_size(643, 643)
Host stream start:left
Opening stream for read: left
Attempting to open stream left
Successfully opened stream left with ID #1!
Starting thread for stream: left
Host stream start:right
Opening stream for read: right
Attempting to open stream right
Started thread for stream: left
Successfully opened stream right with ID #2!
Starting thread for stream: right
Host stream start:color
Started thread for stream: right
Opening stream for read: color
Attempting to open stream color
Successfully opened stream color with ID #3!
Starting thread for stream: color
Started thread for stream: color
Opening stream for read: disparity
Attempting to open stream disparity
Successfully opened stream disparity with ID #4!
Starting thread for stream: disparity
Started thread for stream: disparity
depthai: INIT OK!
color
5.230357994 1
E: [global] [ 160302] [EventRead00Thr] handleIncomingEvent:563 handleIncomingEvent() Read failed -4
E: [global] [ 160302] [python] addEvent:262 Condition failed: event->header.flags.bitField.ack != 1
E: [global] [ 160302] [python] addEventWithPerf:276 addEvent(event) method call failed with an error: 3
E: [global] [ 160302] [python] XLinkReadData:156 Condition failed: (addEventWithPerf(&event, &opTime))
Device get data failed: 7
E: [global] [ 160302] [python] addEvent:262 Closing stream right: ...
E: [global] [ 160302] [python] addEvent:262 Condition failed: event->header.flags.bitField.ack != 1
E: [global] [ 160302] [python] addEventWithPerf:276 addEvent(event) method call failed with an error: 3
Condition failed: event->header.flags.bitField.ack != 1
E: [global] [ 160302] [python] addEventWithPerf:276 addEvent(event) method call failed with an error: 3
E: [global] [ 160302] [python] XLinkReadData:156 Condition failed: (addEventWithPerf(&event, &opTime))
Device get data failed: 7
E: [global] [ 160302] [python] XLinkReadData:156 Closing stream disparity: ...
E: [global] [ 160302] [Scheduler00Thr] dispatcherEventSend:53 Closing stream right: DONE.
Thread for right finished.
Condition failed: (addEventWithPerf(&event, &opTime))
Device get data failed: 7
Closing stream color: ...
Write failed (header) (err -4) | event XLINK_CLOSE_STREAM_REQ
E: [global] [ 160302] [python] addEvent:262 Condition failed: event->header.flags.bitField.ack != 1
E: [xLink] [ 160302] [Scheduler00Thr] sendEvents:1027 Event sending failed
E: [global] [ 160302] [python] addEventWithPerf:276 addEvent(event) method call failed with an error: 3
E: [global] [ 160302] [python] XLinkReadData:156 Condition failed: (addEventWithPerf(&event, &opTime))
Device get data failed: 7
Closing stream disparity: DONE.
Thread for disparity finished.
Closing stream left: ...
E: [global] [ 160302] [Scheduler00Thr] dispatcherEventSend:53 Write failed (header) (err -4) | event XLINK_CLOSE_STREAM_REQ
E: [xLink] [ 160302] [Scheduler00Thr] sendEvents:1027 Event sending failed
E: [global] [ 160302] [Scheduler00Thr] dispatcherEventSend:53 Write failed (header) (err -4) | event XLINK_CLOSE_STREAM_REQ
E: [xLink] [ 160302] [Scheduler00Thr] sendEvents:1027 Event sending failed
Closing stream color: DONE.
Closing stream left: DONE.
Thread for left finished.
Thread for color finished.
E: [global] [ 160302] [Scheduler00Thr] dispatcherEventSend:53 Write failed (header) (err -4) | event XLINK_CLOSE_STREAM_REQ
E: [xLink] [ 160302] [Scheduler00Thr] sendEvents:1027 Event sending failed
watchdog triggered
=== New data in observer stream host_capture, size: 4
Writing 4 bytes to host_capture
E: [global] [ 165244] [Scheduler00Thr] dispatcherEventSend:53 Write failed (header) (err -4) | event XLINK_WRITE_REQ
!!! XLink write successful: host_capture (4)
Stopping threads: ...
E: [xLink] [ 165244] [Scheduler00Thr] sendEvents:1027 Event sending failed
Stopping threads: DONE 0.000s.
Closing all observer streams: ...
Closing stream host_capture: ...
Closing stream host_capture: DONE.
Closing all observer streams: DONE.
Reseting device: 0.
E: [global] [ 165244] [Scheduler00Thr] dispatcherEventSend:53 Write failed (header) (err -4) | event XLINK_RESET_REQ
E: [xLink] [ 165244] [Scheduler00Thr] sendEvents:1027 Event sending failed
from depthai-experiments.
@jonititan Seems like a device issue, could you try to unplug the device and plug it back again, with USB cable attached directly to the host (not via e.g. USB hub)
And CC @themarpe in case you see something relevant here
from depthai-experiments.
You're quite correct.
Moved from hub and it started logging perfectly for a little while and then had segfault. Apologies thats probably an unrelated issue.
Edited to add: I ran it a couple more times and it hasn't segfaulted again so far. I'll continue testing but i think that may be unrelated.
Thanks for your help
right
33.46965762 357
left
33.502950631 358
color
33.20561807 349
right
33.50296578 358
disparity_color
33.702839108 364
left
33.569578191 360
color
33.238946441 350
right
33.602907667 361
left
33.669523174 361
color
33.338933184 353
disparity_color
33.802784162 367
right
33.702850508 364
left
33.702839108 364
color
33.405393445 355
right
33.736178624 364
disparity_color
33.869414392 369
left
33.802784162 367
color
33.47205097 357
right
33.802809852 367
disparity_color
33.969356452 370
color
33.505380647 358
left
33.836098981 368
right
33.86943725 369
color
33.571842095 360
left
33.869414392 369
right
33.902754054 370
color
33.605170511 361
disparity_color
34.102617955 375
left
33.969356452 370
right
33.969364655 370
color
33.705157555 364
left
34.0026728 373
right
34.069310597 375
color
33.804750881 367
left
34.102617955 375
disparity_color
34.202562401 379
right
34.102649088 375
color
33.838079475 368
left
34.135930554 375
right
34.169271937 378
color
33.871212532 369
left
34.202562401 379
right
34.20258762 379
color
33.904541238 370
left
34.335819527 380
right
34.369142192 380
disparity_color
34.502397968 388
color
34.004527515 373
left
34.435765905 386
right
34.46909646 387
disparity_color
34.56902529 390
color
34.070994218 375
E: [global] [ 109839] [EventRead00Thr] handleIncomingEvent:563 handleIncomingEvent() Read failed -4
E: [global] [ 109847] [Scheduler00Thr] dispatcherEventSend:53 Write failed (header) (err -4) | event XLINK_READ_REL_REQ
E: [xLink] [ 109847] [Scheduler00Thr] sendEvents:1027 Event sending failed
E: [global] [ 109847] [python] addEvent:262 Condition failed: event->header.flags.bitField.ack != 1
E: [global] [ 109847] [python] addEventWithPerf:276 addEvent(event) method call failed with an error: 3
E: [global] [ 109847] [python] XLinkReadData:156 Condition failed: (addEventWithPerf(&event, &opTime))
E: [global] [ 109847] [python] addEvent:262 Condition failed: event->header.flags.bitField.ack != 1
E: [global] [ 109848] [python] addEventWithPerf:276 addEvent(event) method call failed with an error: 3
E: [global] [ 109848] [python] XLinkReadData:156 Condition failed: (addEventWithPerf(&event, &opTime))
Device get data failed: 7
Device get data failed: 7
Closing stream left: ...
Closing stream right: ...
E: [global] [ 109848] [Scheduler00Thr] dispatcherEventSend:53 Write failed (header) (err -4) | event XLINK_CLOSE_STREAM_REQ
E: [xLink] [ 109848] [Scheduler00Thr] sendEvents:1027 Event sending failed
E: [global] [ 109848] [Scheduler00Thr] dispatcherEventSend:53 Write failed (header) (err -4) | event XLINK_CLOSE_STREAM_REQ
E: [xLink] [ 109848] [Scheduler00Thr] sendEvents:1027 Event sending failed
Closing stream left: DONE.
Thread for left finished.
Closing stream right: DONE.
Thread for right finished.
E: [global] [ 109848] [python] addEvent:262 Condition failed: event->header.flags.bitField.ack != 1
E: [global] [ 109849] [python] addEventWithPerf:276 addEvent(event) method call failed with an error: 3
E: [global] [ 109849] [python] XLinkReadData:156 Condition failed: (addEventWithPerf(&event, &opTime))
Device get data failed: 7
Closing stream disparity: ...
E: [global] [ 109849] [Scheduler00Thr] dispatcherEventSend:53 Write failed (header) (err -4) | event XLINK_CLOSE_STREAM_REQ
E: [xLink] [ 109849] [Scheduler00Thr] sendEvents:1027 Event sending failed
E: [global] [ 109849] [python] addEvent:262 Condition failed: event->header.flags.bitField.ack != 1
E: [global] [ 109849] [python] XLinkCloseStream:115 Condition failed: (addEvent(&event))
Segmentation fault (core dumped)
from depthai-experiments.
Thanks, both!
from depthai-experiments.
Related Issues (20)
- Running YOLOv8 model on OAK D Pro Wide camera. I keep getting a not enough memory error. HOT 2
- OAK-D-SR Camera save color image and depth image by record.py HOT 3
- [gen2-yolo/device-decoding] Visualization doesn't show camera footage or detections HOT 2
- To add mesh generation for gen2-pointcloud and Multiple camera HOT 2
- How to visualize when I record data with gen2-record-replay?
- Why pylance is complaining about NNData(), node, and ImageManipConfig() call in script.py from gen2-gaze-estimation project?(Solved) HOT 2
- Head posture estimation module HOT 2
- segmentation with yolov5
- Head pose estimation HOT 2
- How to load external video or webcam feed and process it on device side HOT 1
- New recommendations on head pose estimation model. HOT 1
- Support for YOLOP HOT 2
- Depth information in deep learning model HOT 3
- Camera extrinsic parameter HOT 1
- Issue with installing requirements for RTSP streaming HOT 1
- Deploy yolov8 on OAK-D HOT 6
- Challenges Installing PyGObject for OKA Camera RTSP Streaming HOT 1
- Can we specify the layers you are interested in for a custom nn ? HOT 8
- Yolo v8 on OAK-D camera HOT 1
- gen2-pedestrian-reidentification freezes while person is detected HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from depthai-experiments.