More Docs: I wrote a PFC2 step-by-step software install guide (edit: these instructions are out of date now)


[update 17 Mar 2017: Gordon has been working lately on changing and simplifying the installation process for openag_brain on GitHub. I haven’t been following the changes closely, but at some point, these instructions may become obsolete.]

Hi folks,

Yesterday I got the PFC2 software stack running on a Raspberry Pi 3 and an Arduino Mega clone. I wrote up a detailed step-by-step procedure for how I did it as a gist on github. If you want to see screenshots of the PFC2 UI and the CouchDB administrative interface, scroll down to the bottom of the gist. In the “Review” and “Next steps” sections, I included links to the OpenAg documentation that I’ve found most helpful in the past few weeks.

Here’s the link to the gist: https :// [edit Feb 17, 2018: I took this gist down a while ago because my old procedure is totally out of date. It stopped working due to changes in the code on github.]

I’m hoping this will be useful to other developers who would like to experiment with the OpenAg software without spending a lot of time and money on hardware. I spent less than $100 USD on the Pi 3 and Arduino. The hardware setup was quick and easy–power up the Pi 3 and plug in the Arduino.


Thanks for the clear instructions!

I currently have a the rip v2, will it work on it or do I need the v3?


@Motty, I haven’t tried that, so I don’t know what would happen. One minor obstacle you’d need to overcome is that the Raspberry Pi 2 Model B doesn’t have built in wifi–you’d need to adapt the instructions to use the ethernet port.

If you want to build Docker images, the docs say you should use a Raspberry Pi 3 (scroll down to the list at the bottom).


Thanks! @wsnook I’ll try it out with the v2 and see if I can get the Dockers on it. If not will use the v2 for a different and get the v3 :wink:


I’ve been playing with this more and wrote up a couple more gists.

Part 1: Doing a better job of flashing the latest firmware

In my instructions from the the original post above, I said to just load the default fixture and start ROS like this:

rosrun openag_brain load_fixture default
rosrun openag_brain main

I’m not 100% sure, but I don’t think my original method loaded all the sensor firmware modules like I was hoping it would. Based on my experiments tonight, I think it’s more interesting to do this instead:

rosrun openag_brain load_fixture default
rosrun openag_brain load_fixture personal_food_computer_v2
rosrun openag_brain flash
rosrun openag_brain main

I’m not sure if it’s necessary to load the default fixture and personal_food_computer_v2, but when I did that, it pulled in firmware for a whole bunch of sensors, and that’s what I was aiming for.

Here’s a gist with a script I used to update my openag_brain and openag_python repos along with console logs from when I loaded and flashed both fixtures.

Part 2: Making ROS show sensor data

Tonight, I also figured out how to get ROS to show me something from the sensors. My output isn’t very interesting because I don’t actually have any sensors connected to the Arduino Mega.

Here’s the gist with console logs:


What do you think about using these to fill in the nonexistant section of the wiki?


@spaghet, If you want to put something on the getting started page, that’s fine by me. My inclination is to write mostly in github/gist form because they’re quick and easy, I’m familiar with them, and they’re reasonably secure. These http-only forum and wiki tools for OpenAg make me nervous–I’m not sure how they’re administered, but it seems like there’s an elevated risk here for hacking, vandalism, and perhaps data loss.


Hello @wsnook i followed your instructions (was very clear!) and everything went as you wrote (i had to reformat the memory card as looks like i missed a step on my first try and kept on getting errors:wink:) I’m at step #8 and (Load the OpenAg UI in your Mac’s browser by opening ) and when I input the IP address it tells me “uh oh, cannot reach the server” any idea what i might have missed?



If you(the computer accessing the UI) are on the same network as the Pi, whatever wlan0 is (192.168.1.x or 10.0.0.x or something similar) in IPv4 when you type the command ifconfig inside the RPi should be what you put in. In my case, it’s


@Motty, Since you say you’re at step 8, I assume that means you can load the CouchDB admin page at http://your-ipaddress:5984/_utils/. If that’s true, then CouchDB is working but the UI is having trouble talking to it. You might try making a few more attempts at reloading the UI page and entering the IP address again. For me, connecting with the UI doesn’t always work on the first try. Beyond that, I don’t know what might be wrong. Gordon is the one who knows the most about the UI.


@wsnook thanks! I"ll try reloading and if i get no luck I"ll ask Gordan.

Thanks for the quick response!


i tried it, no luck…


What type of network are you on? I am running things on a home network that has a dynamic IP address. My internal IPs are unknown from the outside (ie the UI).
There is a simple, multi step fix for this stuff:

See this post

Now I can access my FoodComputer from anywhere on the web.


Thank you for the great instructions! I was stuck because I missed your step 5 “Load the default fixture”.

My startup has an issue with the serial port, do you know why this happens?

process[expand_diagnostics-11]: started with pid [20893]
[ERROR] [WallTime: 1487019278.700384] Error opening serial: could not open port /dev/ttyACM0: [Errno 13] Permission denied: '/dev/ttyACM0'

I used the USB cable to connect my Raspberry Pi 3 model B to an “OSOYOO MEGA2560 R3 Arduino board”. Have I missed a connection for the serial port?

I also tried the revised instructions you had in a comment:
rosrun openag_brain load_fixture default
rosrun openag_brain load_fixture personal_food_computer_v2
rosrun openag_brain flash

This still gives me a serial port error:

BeforeUpload(["upload"], [".pioenvs/megaatmega2560/firmware.hex"])
Looking for upload port/disk...

Warning! Please install `99-platformio-udev.rules` and check that your board's PID and VID are listed in the rules.

Auto-detected: /dev/ttyACM0
scons: *** [upload] could not open port /dev/ttyACM0: [Errno 13] Permission denied: '/dev/ttyACM0'
========================= [ ERROR ] Took 29.18 seconds =========================
Error: Compilation failed

raspberrypi ~ > ls -als /dev/ttyACM0
crw-rw---- 1 root dialout 166, 0 Feb 10 13:04 /dev/ttyACM0

Update: I found my problem:
I am using a new user I created on the raspberry pi (not the default ‘pi’ user) and I was having permission problems flashing the arduino board. I ran this command to give my user the same groups as the ‘pi’ user and now everything works. Thank you wsnook.

sudo usermod -a -G adm,dialout,cdrom,sudo,audio,video,plugdev,games,users,input,netdev,gpio,i2c,spi <your user name>

Rob Baynes


@rbaynes Great, I’m glad you got it working.


Thanks for your work! Really help me!


@luooove You’re welcome–that’s great. Just so you know, Gordon has been working lately on changing and simplifying the installation process for openag_brain on GitHub. I haven’t been following the changes closely, but at some point, these instructions may become obsolete.


Hi folks,

This guide doesn’t work any more. Gordon has been doing a lot of great work to simplify the ROS configuration and setup procedure. I’m not sure if there’s current documentation for the new way of doing it yet.

@gordonb, do you have a link or recommendation for where people should go now to get the latest install procedure?


Over on this thread, Gordon said:


Thank you @wsnook I am working to get a system up and running now and having issues. Are there any updates here? I’ve been sucessful with a docker install (got the success at the end of firmware install) but now am having issues connecting with the brain through the webui to verify it works. Is there any update here? The “how to run using docker” is a dead link, what do we do after a successful docker install to get it working with the ui? Thanks all!!