Need help setting up the development environment?


WoW, the hounds are loose !!! Just been catching up a little and using some of your changes to the .yaml file for the v1 sensors and saw that you were wanting to get the src.ino code generated, into the arduino,

Maybe try rosrun openag_brain firmware -t upload -p ros launch/personal_food_computer_v1.yaml?

I don’t know if this will make a difference but it would be worth a shot,

I found It works if you use; the full path,

rosrun openag_brain firmware --target upload /home/pi/catkin_ws/src/openag_brain/launch/personal_food_computer_v1Mrb.yaml

Didn’t get rid of the contents of, firmware/lib, system comes up but or my sensor config, even with dht22 not connected it’s continually unable to read the data from the arduino Eveybody appears to have some form of timing issue ???

So how does the, UI, see the data from the sensors and usb_cam now it’s not stored in the database. ???


Ah hA! I did edit the file but I did not run the installer script.

So that works now! Much nicer than having a keyboard plugged into the unit!

Thank you @wsnook!


Hi @JohnB!

Yep, full path makes it happy for the flash. Here’s the command I use:

rosrun openag_brain firmware -t upload /home/pi/catkin_ws/src/openag_brain/launch/personal_food_computer_v1.yaml -p ros

Not a timing issue, the arduino / pi pairing won’t work up a full upload is done. It took me 3 or so tries with the command above to get arduino flashed. You’ll know it’s good when you type rosrun openag_brain main --screen personal_food_computer_v1.launch in to launch the app and you don’t see sync (groovy) errors at the end of the log.

I’m still fuzzy on the whole DB vs YAML roles thing. It appears that data IS getting written into the DB so I recommend using the pfc1_default.json file in my repo to make it match the yaml files.

Keep us posted!



So it’s working!!!

You can see the PID on the humidity needs tuning. Also it would help if the humidifier wasn’t right next to the sensor. HAHA! Heat seems to build up in the unit. It’s running about 3 degrees C higher than it’s supposed to. No chiller on this unit so I need to figure out how to use air_flush to cool it down.

Here’s a shot of heat, humidity and light being maintained by a recipe and openag_brain!!

She’s alive!!!

This video shows the humidifier working via openag_brain / ROS actuation!

I need to clean some stuff up and then I will document this whole build / process for getting this running.

It is important to note that to get this running I had to ditch the docker setup and build a local “global” install of the app. It’s pretty easy to do tho and is nice to keep closer to the dev updates @gordonb @rbaynes @spaghet and all are doing every day! Thanks for your great work guys!

Also special thanks to @wsnook who HAZ ALL THE GOOD tips!




Cool! Glad you got it working. The lights will generate a lot of heat if they’re bright enough to do anything useful for growing plants. If you’ve got 10W of LEDs, that means you’ve got a 10W heater in your insulated box. If you’ve got a 3W air pump in there too, then you’ve effectively got a 13W heater, etc.


Briliant, hadn’t occured to me that the arduino needed a few tries to be fully flashed as I was getting output from my arduino ide serial port monitor, albeit corrupted which led me to think it had been flashed. Great work.


Installing and running openag_brain on your PFC1 Hardware

I debated whether to start a new thread for this but landed on keeping the thread to completion here. I will likely, after some discussion, post this on the wiki but for now here’s how to get a basic PFC1 running openag_brain and maintaining a recipe.

This guide assumes you’ve already flashed your SD card with Raspbian Jessie Lite and installed the optional touchscreen and wifi configurations and are now able to ssh / terminal into the Pi.
In addition you should’ve used raspi-config to set your YOUR_HOSTNAME to something you like (defaults to raspberrypi)

Clone in brain software

  • sudo apt-get install git
  • git clone ~/catkin_ws/src/openag_brain

Increase Swap Space

  • sudo nano /etc/dphys-swapfile
  • Change CONF_SWAPSIZE=100 to CONF_SWAPSIZE=1024
  • Restart your pi - sudo reboot

Download PFC1 configuration files

  • git clone ~/catkin_ws/src/openag_brain_pfc1_config

Remove PFC2 files and add PFC1 config files

  • rm ~/catkin_ws/src/openag_brain/launch/personal_food_computer*
  • rm ~/catkin_ws/src/openag_brain/launch/usb*
  • cp ~/catkin_ws/src/openag_brain_pfc1_config/pfc1* ~/catkin_ws/src/openag_brain/launch/
  • cp ~/catkin_ws/src/openag_brain_pfc1_config/openag_brain_run_service ~/catkin_ws/src/openag_brain/scripts/
  • ~/catkin_ws/src/openag_brain/scripts/install_openag_brain_service

Erase unused Firmware Libs (This requirement should go away but is currently required to prevent a bug from stopping the process)

  • rm -rf ~/catkin_ws/src/openag_brain/firmware/lib/openag_am2315
  • rm -rf ~/catkin_ws/src/openag_brain/firmware/lib/openag_atlas*
  • rm -rf ~/catkin_ws/src/openag_brain/firmware/lib/openag_bh1750
  • rm -rf ~/catkin_ws/src/openag_brain/firmware/lib/openag_doser_pump
  • rm -rf ~/catkin_ws/src/openag_brain/firmware/lib/openag_ds18b20*
  • rm -rf ~/catkin_ws/src/openag_brain/firmware/lib/openag_mhz*

Build Catkin and init workspace and DB

  • cd ~/catkin_ws/src/openag_brain
  • ./scripts/install_dev
    ^^^ takes a LOOOOOOONG TIME! Have a meal with a loved one or possibly finish that novel.
  • source ~/catkin_ws/devel_isolated/setup.bash
  • openag db init

Import PFC1 fixtures into CouchDB

  • openag db load_fixture ~/catkin_ws/src/openag_brain_pfc1_config/pfc1_default.json

Flash Arduino

  • rosrun openag_brain firmware -t upload /home/pi/catkin_ws/src/openag_brain/launch/pfc1.yaml -p ros

Test system

  • rosrun openag_brain main --screen pfc1.launch
  • No errors? ctrl-c to exit

Install Openag_UI

  • curl -sL | sudo -E bash -
  • sudo apt-get install -y nodejs
  • git clone ~/catkin_ws/src/openag_ui
  • cp ~/catkin_ws/src/openag_brain_pfc1_config/openag_ui/openag-config.json ~/catkin_ws/src/openag_ui/
  • cd ~/catkin_ws/src/openag_ui
  • npm install
  • ./node_modules/grunt-cli/bin/grunt couchapp_deploy --app_db_url="http://localhost:5984/app"

Start Openag_brain service

  • sudo service openag_brain start

Congratulations! Go to this link to see your PFC1 running

  • http://YOUR_HOSTNAME.local:5984/app/_design/app/_rewrite

You can copy this recipe into the UI and start it to see your system start working.

It was so cool watching my PFC1 shut down lights after 18hrs and restart at 24!!!

Error with docker-compose up
Rosserial tool-avrdude build failing with not-matching SHA?
Rosserial tool-avrdude build failing with not-matching SHA?