I’m using the OS 8.2.3 on Genesis v1.4. I’m getting an error when trying to execute a sequence involving taking more than one picture.
I can make a sequence moving the FB to a certain position, take a picture, and then send it back to home. No problems with that.
But when I try adding a second step involving moving the FB to a different position and try to take a new picture, I’m getting weird pop-up messages which don’t show up on the log just before the “take picture” command gets executed. (see image below)
I’ve tried making the FB wait >40 seconds in the sequence so the Farmware can receive the image and “save” it, but I’m still getting the same problem.
Has anyone been through this before? Any comment would be greatly appreciated!
For me, even a simple TAKE PHOTO on the FARMWARE page ( PHOTOS link ) is not completely reliable and will sometimes error out at the finish ( even after a good image capture ).
I get the same "farmware catchall :exit: {:normal, { . . . }" that you posted.
This error would stop a running sequence at that point.
Here’s what I’m seeing on the IEx console . . note the Terminating farmware process log just after the 2nd take-photo Farmware execution.
@NicoMolnar Thanks for reporting this issue. My suspicion is that it is indeed a problem on our end rather than a local configuration issue. I will forward this to our team so they can take a look on Monday.
I have just ‘upgraded’ to the new Farmbot software and I am having the same issue as described here. I can take one photo and the farmbot continues on in the sequence. It stops at the second photo and goes no further. This sequence was working just fine on Farmbot V7.0.1.
Also, my logs are not giving the sort of information that they did previously so I can’t tell whether the farmbot is moving without viewing it in person.
Just tested it with a new sequence that includes take a photo, move relative, take a photo, move relative. It stopped at the second take a photo command and never went to the move relative command.
I’m having the same exact problem. The sequence will stop at the second “take a photo” command.
No error is recorded in the log and that’s why I had to print the screen to register the type of error.
Thanks @connor. I’m running now on v8.2.4-rc1 from CI but the 2 big issues in this thread still exist. ( In a sequence, 2nd take-photo always fails. Simple take-photo will very intermittently exit with an uncaught throw ( but does capture an image ))
I’ll dig deeper and see what I can uncover.
Hey Connor . . I’ve made an attempt at “reverse-engineering” the Farmware runner code . . I’m in dire need of some diagrams of how Sequences run other Farmwares as steps, where those individual Farmware steps have asynch. completion ( e.g. take-photo )
Are there sequence diagrams or process interaction maps that I can refer to ?
I’ve tried making diagrams that maps the relationship between sequence and farmware but I’ve yet to find a way to make it presentable. Unfortunately it’s just too complex to put into a diagram that can be easily understood. Here’s the gist of how it works:
celery script is sent to Farmbot
Farmbot parses it and turns it into an AST that can be executed
Farmbot loops over AST until it completes, hits a sub sequence call, or a farmware call.
if it was a farmware, the sequence runner is paused
Farmbot opens a Unix socket that farmware will communicate over
Farmbot executes the farmware, while also monitoring the pipe
if any commands come over the pipe, Farmbot pauses the farmware, then goto(1)
repeat steps 3-7 until completion of farmware
Repeat steps 3-8 until completion
This issue being presented in this thread is during step 7. What happens is there is a race condition in the way Linux handles pipes. There could be one of a few things that could happen while executing the farmware:
it could not send anything. I think the pipe protocol requires at least one command every X seconds to be considered alive still.
the farmware could send a malformed command
the farmware could exit
the pipe could close
Basically the error that is happening is a race condition between options 3 and 4 in that list. I’ve been working on a refactor to fix this but got distracted by the holidays
Step 7 seems to imply that there can be, e.g., 1+ pausedtake-photo in parallel with one runningtake-photo . . would that be right ? In that case, the Farmware runner context would need to be self-contained and without side-effects ( ? idempotent )
Maybe best if I quietly back away while you consider your refactoring
Was this fix included in the December 3 update by any chance?
Because I’m still getting the Problem sending RPC command… error when trying to execute a sequence with two Take photo commands in it, so I wanted to know if the issue is now mine or if I should wait for a new release.
a) because I’m intrigued how so much real functionality can be packed into a Nerves+Elixir-based package running on a Raspberry Pi 3 !!
b) I haven’t contributed much to possible solutions of this issue ( )
I genuinely wish this FarmBot enterprise a long and prosperous life . . albeit, when I have my own bot hardware, I will attempt to speed up the movements enough to scare the snails