NEW! - Recipes not starting/stopping


Hi @gordonb @spaghet @rbaynes @bob.davis

I’m seeing an errant problem in my PFC1 running openag_brain. A bit ago (like a week) the UI stopped showing the current recipe and now I can’t start or stop recipes.

I suspect it has to do with me pulling in the most recent master revisions with the new recipe changes. Here are a couple of other clues:

When I hit http://tangerine.local:5984/_openag/api/0.0.1/service/environments/environment_1/stop_recipe I get "error": "No such service exists"

If I enter rosservice call /environment_1/start_recipe pfc1-potted-tomatoes-72days i get ERROR: Service [/environment_1/start_recipe] is not available.

So, I’m feeling like I am getting cut by the cutting edge of development progress. :smiley:

Can you share some documentation on the new recipe system? I may be able to post ui fixes based on it.



V2 Food Computer Kit Build

Another clue:

When I hit: http://tangerine.local:5984/_openag/api/0.0.1/service

I get:

    "results": [

No recipe anythings?

Do I need to specify a recipe handler in yaml?


I did a complete rebuild overnight of the build starting on May 24 (earlier release) and am still not able to get it to run.

Traceback (most recent call last):
  File "/opt/ros/indigo/lib/openag_brain/", line 53, in <module>
    for variable in VALID_VARIABLES
  File "/opt/ros/indigo/lib/openag_brain/", line 53, in <dictcomp>
    for variable in VALID_VARIABLES
  File "/opt/ros/indigo/lib/python2.7/dist-packages/rospy/", line 812, in __init__
    super(Publisher, self).__init__(name, data_class, Registration.PUB)
  File "/opt/ros/indigo/lib/python2.7/dist-packages/rospy/", line 136, in __init__
    raise ValueError("topic parameter 'data_class' is not initialized")
ValueError: topic parameter 'data_class' is not initialized
[ INFO] [1496404025.965949055]: Saved image /var/www/html/img.jpg
[environments/environment_1/recipe_handler_1-5] process has died [pid 5993, exit code 1, cmd /opt/ros/indigo/lib/openag_brain/ __name:=recipe_handler_1 __log:=/home/pi/.ros/log/2e920210-4789-11e7-92f5-b827eb13f57f/environments-environment_1-recipe_handler_1-5.log].
log file: /home/pi/.ros/log/2e920210-4789-11e7-92f5-b827eb13f57f/environments-environment_1-recipe_handler_1-5*.log
 [ INFO] [1496404026.938380311]: Saved image /var/www/html/img.jpg
Traceback (most recent call last):
  File "/opt/ros/indigo/lib/openag_brain/", line 281, in <module>
    server, environment, camera_var, timelapse_scaling_factor
  File "/opt/ros/indigo/lib/openag_brain/", line 126, in __init__
  File "/opt/ros/indigo/lib/openag_brain/", line 235, in append_video
    self.image_filepath, self.snippet_filepath, snippet_duration
  File "/opt/ros/indigo/lib/python2.7/dist-packages/openag_brain/", line 47, in create_video_from_image
    str(duration), "-pix_fmt", "yuv420p", video_path
  File "/usr/lib/python2.7/", line 522, in call
    return Popen(*popenargs, **kwargs).wait()
  File "/usr/lib/python2.7/", line 710, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/", line 1335, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory
[ INFO] [1496404027.943474464]: Saved image /var/www/html/img.jpg

You can see the recipe writer is dying.


Sorry @juhnke that would be my fault. We are rewriting the recipe handler
now. I am currently adding ros tests for it. I will try to reproduce the
problem you are seeing.

Thanks for the heads up (and testing)!

Rob Baynes


It’s cool @rbaynes. I rolled back the repo and it’s up and running again.

git checkout 9bd7bd6b870a833c4c0cc52d3b0eff7a551716d6

Please let me know when the recipe handler is stable again and I’ll test it for you.



Will do. Sorry for the hassle.

Rob Baynes


Hi @juhnke,

In your rosservice call, you need to start the path with /environments

Below you can see I stop and start a recipe (using the code on the master

curl -X POST -H “Content-Type:application/json” http:/*/environments*
“message”: “There is no recipe running”,
“success”: false

rosservice call /environments/environment_1/stop_recie
success: False
message: There is no recipe running

rosservice call /environments/environment_1/start_recipe blue_on_15_sec
success: True
message: Success

Rob Baynes


One other thing I forgot to mention: we are changing the format of recipes. Currently on the master branch, only the “simple” format is supported. The “phased” format (e.g. what is used in general_greens.json) has been removed. We are creating a new, better, more flexible format to replace phased.

V2 Food Computer Kit Build

Cool! That’s great to know.

Hey do you have a slack channel or something that we can talk less publicly? I’m thinking it’s time to start a develop/dev branch on openag_brain and do releases to master when testing is complete. Maybe it doesn’t make sense if there are only a few units running it, but if more adopt, we’ll (the consuming public) get pinched by breaking changes.

Food for thought.




Hi Joe @juhnke,

I posted the ways we can communicate here: New Resources! Contributing to OpenAg

If you go to the wiki page linked in that post about communications, it has a link to our public gitter channel you can join.

I like your plan of a release branch. That is on my plate to do also. I was just sticking with master for dev/releases now because what is on master still has some issues that prevent the PFC 2.0 from working. Also in that forum post you will find our software roadmap for this summer, and the critical issues we are working on.