Comments (16)
Thanks for opening the issue! CC @Erol444 @saching13
from esp32-spi-message-demo.
@VanDavv I believe @themarpe will handle this ticket.
from esp32-spi-message-demo.
After some changes to my code I am receiving an error message when clogging up.
at 'req_success = mySpiApi.spi_pop_message(METASTREAM);'
from esp32-spi-message-demo.
I do receive IMU metadata (SPI_IMU_OUT stream), but then this is what shows up when camera stops receiving messages from custom Stream (METASTREAM)
from esp32-spi-message-demo.
Hi @elblogbruno
Just to summarize - after around 2-3 seconds no more messages are coming from the OAK to the ESP32?
Can you try develop
(and make sure to update the submodules git submodule update --init --recursive
) as well as try changing the SPI speed from 16MHz to 1MHz (in components/depthai-spi-api/common/esp32_spi_impl.c
):
diff --git a/common/esp32_spi_impl.c b/common/esp32_spi_impl.c
index 7046fe7..2e6e80d 100644
--- a/common/esp32_spi_impl.c
+++ b/common/esp32_spi_impl.c
@@ -55,7 +55,7 @@ void init_esp32_spi(){
.command_bits=0,
.address_bits=0,
.dummy_bits=0,
- .clock_speed_hz=16000000,
+ .clock_speed_hz=4000000,
// TODO(themarpe) - enable .clock_speed_hz=20000000
.duty_cycle_pos=128, //50% duty cycle
.mode=1,
from esp32-spi-message-demo.
Just to summarize - after around 2-3 seconds no more messages are coming from the OAK to the ESP32?
Great summary.
Can you try
develop
(and make sure to update the submodulesgit submodule update --init --recursive
)
I just made sure
try changing the SPI speed from 16MHz to 1MHz (in
components/depthai-spi-api/common/esp32_spi_impl.c
)
Just made that change and the problem still occur.
from esp32-spi-message-demo.
@elblogbruno
Does the time till "clog" change if you modify the queue sizes of the SPIOut nodes?
from esp32-spi-message-demo.
If I do set the queue size to 1 it took like two minutes and 30 seconds.
changing it to 5 is reduced to 40 seconds.
So I feel like yes it does change!
from esp32-spi-message-demo.
setting it to 10 made the esp32 crash after 30 seconds
from esp32-spi-message-demo.
@elblogbruno if the queue sizes change the behavior, make sure to set them to correct type (eg. blocking / non-blocking) and to pop messages as they are incomming to not fill up the queues.
If it always crashes after filling up the queues, it seems like it might be an out of memory issue, by the looks of the stacktrace.
(Also, can you share what the rest of the queue size issues looks like?)
Add the following in spi_api.cpp:492 - it tries guarding for that case:
bool SpiApi::send_message(const RawBuffer& msg, const char* stream_name){
bool req_success = false;
SpiStatusResp response;
uint32_t total_send_size;
std::vector<uint8_t> metadata = serialize_metadata(msg);
// Add the following check
if(metadata.empty()){
return false;
}
...
Let me know how it goes.
from esp32-spi-message-demo.
make sure to set them to correct type (eg. blocking / non-blocking)
All SPIOut nodes are set to non_blocking (spiOut.input.setBlocking(False))
Add the following in spi_api.cpp:492 - it tries guarding for that case:
Will check out any memory leaks
Also, can you share what the rest of the queue size issues looks like?
These are other issues I have received
from esp32-spi-message-demo.
Sorry if It is a dumb question, currently I was running the pipeline from the host, I mean I did not flash it to the camera.
Does this make any kind of influence?
Aswell, how can I read node.warn messages from a flashed pipeline?
from esp32-spi-message-demo.
@elblogbruno then it seems like there are some issues with allocation / some other issue that causes a null dereference or something similar.
currently I was running the pipeline from the host, I mean I did not flash it to the camera.
Does this make any kind of influence?
No difference for the most part (just XLink nodes are disabled)
Aswell, how can I read node.warn messages from a flashed pipeline?
For now you'll have to send it via an alternative means (SPI, UART...) - If you have USB connected, you can run the same app again from host. Otherwise its not possible to connect to a running app using USB and read out logs, etc... (for now, might change in the future)
from esp32-spi-message-demo.
Thanks!
I will look at my code!
Cordially,
Bruno
from esp32-spi-message-demo.
I was not deleting my CJSon parsing of the message and so had memory leaks. Now it seems to work ok.
I have another question about IMU parsing but I will do a second issue.
from esp32-spi-message-demo.
Great, in that case, I'll close this issue :)
from esp32-spi-message-demo.
Related Issues (16)
- [FeatureRequest] People tracking decoding and publishing to cloud
- failed to allocate 0 bytes HOT 11
- `gen2-spi`/`device-yolo-parsing` running error HOT 1
- Build error: GPIO_PIN_INTR_NEGEDGE undeclared HOT 4
- Build error when running mjpeg-streaming-wifi HOT 6
- Failed to resolve component 'depthai-spi-api'. HOT 2
- Raw IMU Data metadata parsing fails HOT 21
- SPI output stops while XLink and the rest of the pipeline keep running HOT 2
- SPIOut blocking the pipeline HOT 2
- how can upload dap file via wifi
- Cannot build the depthai-spi-api under ESP-IDF in Windows HOT 1
- sync problem HOT 1
- Cannot build due to '#include "esp_wifi.h" issues HOT 1
- Missing `mobilenet-ssd.blob` HOT 1
- Questions: Enabling SPI peripheral mode HOT 4
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 esp32-spi-message-demo.