Sensor responded with the wrong function code:255


#1

Hello everyone,

I am a student working on a project to build the personal food computer 2.0 . Thus far, we have the everything hooked up. The issue we are facing is with the UI and displaying values captured by the sensors(Or just verifying if they are captured). We have used https://wiki.openag.media.mit.edu/contributors/rob.baynes/rpisetup , this instruction to build our workspace.

We are seeing the UI in this fashion right now.

We were able to see the image captured by the head camera earlier and that stopped working today. Yet to figure out a reason for that!

Our primary concern though is to have the values captured by the sensors displayed on the UI.

We are using rosrun openag_brain firmware -t upload to flash the arduino.

To test, we are running the following command.
rosrun openag_brain main personal_food_computer_v2.launch

Here is the log of the test run:

pi@raspberrypi:~/catkin_ws/src/openag_brain/firmware $ rosrun openag_brain main personal_food_computer_v2.launch
Initializing the database
Applying CouchDB configuration
Creating databases
Pushing design documents
Spawning software modules
… logging to /home/pi/.ros/log/c9739d6c-092a-11e8-bcfe-b827eb0361b3/roslaunch-raspberrypi-22996.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://raspberrypi:44173/

SUMMARY

PARAMETERS

  • /categories: [‘sensors’, 'actu…
  • /environments/environment_1/aerial_image/autofocus: False
  • /environments/environment_1/aerial_image/brightness: 32
  • /environments/environment_1/aerial_image/camera_frame_id: head_camera
  • /environments/environment_1/aerial_image/camera_info_url: /home/pi/.ros/cam…
  • /environments/environment_1/aerial_image/camera_name: head_camera
  • /environments/environment_1/aerial_image/contrast: 32
  • /environments/environment_1/aerial_image/focus: 51
  • /environments/environment_1/aerial_image/framerate: 1
  • /environments/environment_1/aerial_image/image_height: 1024
  • /environments/environment_1/aerial_image/image_width: 1280
  • /environments/environment_1/aerial_image/io_method: mmap
  • /environments/environment_1/aerial_image/pixel_format: mjpeg
  • /environments/environment_1/aerial_image/saturation: 32
  • /environments/environment_1/aerial_image/sharpness: 22
  • /environments/environment_1/aerial_image/video_device: /dev/video0
  • /environments/environment_1/air_flush_controller_1/variable: air_flush
  • /environments/environment_1/air_temperature_controller_1/Kd: 1.0
  • /environments/environment_1/air_temperature_controller_1/Ki: 0.0
  • /environments/environment_1/air_temperature_controller_1/Kp: 1.0
  • /environments/environment_1/air_temperature_controller_1/deadband_width: 0.5
  • /environments/environment_1/air_temperature_controller_1/lower_limit: -1.0
  • /environments/environment_1/air_temperature_controller_1/upper_limit: 1.0
  • /environments/environment_1/air_temperature_controller_1/variable: air_temperature
  • /environments/environment_1/air_temperature_controller_1/windup_limit: 1000.0
  • /environments/environment_1/arduino_handler/baud_rate: 115200
  • /environments/environment_1/arduino_handler/publisher_rate_hz: 1
  • /environments/environment_1/image_persistence_1/min_update_interval: 3600
  • /environments/environment_1/light_controller_blue_1/variable: light_intensity_blue
  • /environments/environment_1/light_controller_red_1/variable: light_intensity_red
  • /environments/environment_1/light_controller_white_1/variable: light_intensity_w…
  • /environments/environment_1/nutrient_flora_duo_a_controller_1/variable: nutrient_flora_duo_a
  • /environments/environment_1/nutrient_flora_duo_b_controller_1/variable: nutrient_flora_duo_b
  • /environments/environment_1/sensor_persistence_1/max_update_interval: 600
  • /environments/environment_1/sensor_persistence_1/min_update_interval: 5
  • /environments/environment_1/video_writer_1/timelapse_scaling_factor: 86400
  • /environments/environment_1/water_level_high_controller_1/variable: water_level_high
  • /environments/environment_1/water_potential_hydrogen_controller_1/Kd: 0.75
  • /environments/environment_1/water_potential_hydrogen_controller_1/Ki: 0.25
  • /environments/environment_1/water_potential_hydrogen_controller_1/Kp: 0.25
  • /environments/environment_1/water_potential_hydrogen_controller_1/deadband_width: 0.5
  • /environments/environment_1/water_potential_hydrogen_controller_1/lower_limit: -1.0
  • /environments/environment_1/water_potential_hydrogen_controller_1/upper_limit: 1.0
  • /environments/environment_1/water_potential_hydrogen_controller_1/variable: water_potential_h…
  • /environments/environment_1/water_potential_hydrogen_controller_1/windup_limit: 1000.0
  • /firmware_module: [{‘environment’: …
  • /firmware_module_type: [{‘description’: …
  • /rosdistro: indigo
  • /rosversion: 1.11.21
  • /var_types/camera_variables/aerial_image/description: Image from above …
  • /var_types/camera_variables/aerial_image/name: aerial_image
  • /var_types/camera_variables/aerial_image/units: png
  • /var_types/camera_variables/frontal_image/description: Image from in fro…
  • /var_types/camera_variables/frontal_image/name: frontal_image
  • /var_types/camera_variables/frontal_image/units: png
  • /var_types/environment_variables/air_carbon_dioxide/description: The amount of Car…
  • /var_types/environment_variables/air_carbon_dioxide/name: air_carbon_dioxide
  • /var_types/environment_variables/air_carbon_dioxide/type: std_msgs/Float64
  • /var_types/environment_variables/air_carbon_dioxide/units: ppm
  • /var_types/environment_variables/air_flush/description: Air flush a speci…
  • /var_types/environment_variables/air_flush/name: air_flush
  • /var_types/environment_variables/air_flush/type: std_msgs/Float64
  • /var_types/environment_variables/air_flush/units: CFM
  • /var_types/environment_variables/air_humidity/description: A measure of the …
  • /var_types/environment_variables/air_humidity/name: air_humidity
  • /var_types/environment_variables/air_humidity/type: std_msgs/Float64
  • /var_types/environment_variables/air_humidity/units: percent relative
  • /var_types/environment_variables/air_oxygen/description: Oxygen density in…
  • /var_types/environment_variables/air_oxygen/name: air_oxygen
  • /var_types/environment_variables/air_oxygen/type: std_msgs/Float64
  • /var_types/environment_variables/air_oxygen/units: percent
  • /var_types/environment_variables/air_temperature/description: Temperature of th…
  • /var_types/environment_variables/air_temperature/name: air_temperature
  • /var_types/environment_variables/air_temperature/type: std_msgs/Float64
  • /var_types/environment_variables/air_temperature/units: degrees C
  • /var_types/environment_variables/light_illuminance/description: The intensity of …
  • /var_types/environment_variables/light_illuminance/name: light_illuminance
  • /var_types/environment_variables/light_illuminance/type: std_msgs/Float64
  • /var_types/environment_variables/light_illuminance/units: lux
  • /var_types/environment_variables/light_intensity_blue/description: The intensity set…
  • /var_types/environment_variables/light_intensity_blue/name: light_intensity_blue
  • /var_types/environment_variables/light_intensity_blue/type: std_msgs/Float64
  • /var_types/environment_variables/light_intensity_blue/units: percent relative
  • /var_types/environment_variables/light_intensity_red/description: The intensity set…
  • /var_types/environment_variables/light_intensity_red/name: light_intensity_red
  • /var_types/environment_variables/light_intensity_red/type: std_msgs/Float64
  • /var_types/environment_variables/light_intensity_red/units: percent relative
  • /var_types/environment_variables/light_intensity_white/description: The intensity set…
  • /var_types/environment_variables/light_intensity_white/name: light_intensity_w…
  • /var_types/environment_variables/light_intensity_white/type: std_msgs/Float64
  • /var_types/environment_variables/light_intensity_white/units: percent relative
  • /var_types/environment_variables/nutrient_flora_duo_a/description: FloraDuo nutrient…
  • /var_types/environment_variables/nutrient_flora_duo_a/name: nutrient_flora_duo_a
  • /var_types/environment_variables/nutrient_flora_duo_a/type: std_msgs/Float64
  • /var_types/environment_variables/nutrient_flora_duo_a/units: ml/h
  • /var_types/environment_variables/nutrient_flora_duo_b/description: FloraDuo nutrient…
  • /var_types/environment_variables/nutrient_flora_duo_b/name: nutrient_flora_duo_b
  • /var_types/environment_variables/nutrient_flora_duo_b/type: std_msgs/Float64
  • /var_types/environment_variables/nutrient_flora_duo_b/units: ml/h
  • /var_types/environment_variables/water_dissolved_oxygen/description: A measure of the …
  • /var_types/environment_variables/water_dissolved_oxygen/name: water_dissolved_o…
  • /var_types/environment_variables/water_dissolved_oxygen/type: std_msgs/Float64
  • /var_types/environment_variables/water_dissolved_oxygen/units: mg/L
  • /var_types/environment_variables/water_electrical_conductivity/description: Electrical conduc…
  • /var_types/environment_variables/water_electrical_conductivity/name: water_electrical_…
  • /var_types/environment_variables/water_electrical_conductivity/type: std_msgs/Float64
  • /var_types/environment_variables/water_electrical_conductivity/units: uS/cm
  • /var_types/environment_variables/water_level_high/description: Is water above th…
  • /var_types/environment_variables/water_level_high/name: water_level_high
  • /var_types/environment_variables/water_level_high/type: std_msgs/Float64
  • /var_types/environment_variables/water_level_low/description: Is water below th…
  • /var_types/environment_variables/water_level_low/name: water_level_low
  • /var_types/environment_variables/water_level_low/type: std_msgs/Float64
  • /var_types/environment_variables/water_oxidation_reduction_potential/description: Oxidation-reducti…
  • /var_types/environment_variables/water_oxidation_reduction_potential/name: water_oxidation_r…
  • /var_types/environment_variables/water_oxidation_reduction_potential/type: std_msgs/Float64
  • /var_types/environment_variables/water_oxidation_reduction_potential/units: mV
  • /var_types/environment_variables/water_potential_hydrogen/description: Potential Hydroge…
  • /var_types/environment_variables/water_potential_hydrogen/name: water_potential_h…
  • /var_types/environment_variables/water_potential_hydrogen/type: std_msgs/Float64
  • /var_types/environment_variables/water_potential_hydrogen/units: pH
  • /var_types/environment_variables/water_temperature/description: Temperature of th…
  • /var_types/environment_variables/water_temperature/name: water_temperature
  • /var_types/environment_variables/water_temperature/type: std_msgs/Float64
  • /var_types/environment_variables/water_temperature/units: degrees C
  • /var_types/recipe_variables/recipe_end/description: Represents the en…
  • /var_types/recipe_variables/recipe_end/name: recipe_end
  • /var_types/recipe_variables/recipe_end/type: std_msgs/String
  • /var_types/recipe_variables/recipe_start/description: Represents the st…
  • /var_types/recipe_variables/recipe_start/name: recipe_start
  • /var_types/recipe_variables/recipe_start/type: std_msgs/String
  • /var_types/user_variables/marker/description: Marks some user-d…
  • /var_types/user_variables/marker/name: marker

NODES
/
api (openag_brain/api.py)
expand_diagnostics (openag_brain/expand_diagnostics.py)
sensor_info_publisher (openag_brain/sensor_info_publisher.py)
/environments/environment_1/
aerial_image (usb_cam/usb_cam_node)
air_flush_controller_1 (openag_brain/direct_controller.py)
air_temperature_controller_1 (openag_brain/pid.py)
arduino_handler (openag_brain/arduino_handler.py)
image_persistence_1 (openag_brain/image_persistence.py)
light_controller_blue_1 (openag_brain/direct_controller.py)
light_controller_red_1 (openag_brain/direct_controller.py)
light_controller_white_1 (openag_brain/direct_controller.py)
nutrient_flora_duo_a_controller_1 (openag_brain/direct_controller.py)
nutrient_flora_duo_b_controller_1 (openag_brain/direct_controller.py)
recipe_handler_1 (openag_brain/recipe_handler.py)
recipe_persistence_1 (openag_brain/recipe_persistence.py)
sensor_persistence_1 (openag_brain/sensor_persistence.py)
topic_filter_1 (openag_brain/topic_filter.py)
video_writer_1 (openag_brain/video_writer.py)
water_level_high_controller_1 (openag_brain/linear_controller.py)
water_potential_hydrogen_controller_1 (openag_brain/pid.py)

auto-starting new master
process[master]: started with pid [23027]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to c9739d6c-092a-11e8-bcfe-b827eb0361b3
process[rosout-1]: started with pid [23041]
started core service [/rosout]
process[environments/environment_1/water_level_high_controller_1-2]: started with pid [23058]
process[environments/environment_1/water_potential_hydrogen_controller_1-3]: started with pid [23059]
process[environments/environment_1/topic_filter_1-4]: started with pid [23060]
process[environments/environment_1/air_temperature_controller_1-5]: started with pid [23061]
process[environments/environment_1/recipe_handler_1-6]: started with pid [23062]
process[environments/environment_1/recipe_persistence_1-7]: started with pid [23067]
process[environments/environment_1/video_writer_1-8]: started with pid [23068]
process[environments/environment_1/image_persistence_1-9]: started with pid [23069]
process[environments/environment_1/light_controller_red_1-10]: started with pid [23072]
process[environments/environment_1/light_controller_blue_1-11]: started with pid [23075]
process[environments/environment_1/light_controller_white_1-12]: started with pid [23079]
process[environments/environment_1/nutrient_flora_duo_a_controller_1-13]: started with pid [23084]
process[environments/environment_1/nutrient_flora_duo_b_controller_1-14]: started with pid [23087]
process[environments/environment_1/air_flush_controller_1-15]: started with pid [23088]
process[environments/environment_1/sensor_persistence_1-16]: started with pid [23091]
process[environments/environment_1/aerial_image-17]: started with pid [23100]
process[environments/environment_1/arduino_handler-18]: started with pid [23108]
process[expand_diagnostics-19]: started with pid [23113]
process[api-20]: started with pid [23133]
process[sensor_info_publisher-21]: started with pid [23157]
[ERROR] [1517694027.995660145]: Invalid camera calibration URL: /home/pi/.ros/camera_info/head_camera.yaml
[WARN] [WallTime: 1517694029.034952] arduino_handler ERROR> AM2315 #1: Sensor responded with the wrong function code:255
[WARN] [WallTime: 1517694029.354618] arduino_handler WARN> MHZ16 #1: Initializing
[WARN] [WallTime: 1517694030.355926] arduino_handler ERROR> AM2315 #1: Sensor responded with the wrong function code:255
[mjpeg @ 0x29ca00] ignoring invalid SAR: 0/0
[swscaler @ 0x23c8c0] No accelerated colorspace conversion found from yuv422p to rgb24.
[mjpeg @ 0x29ca00] ignoring invalid SAR: 0/0
[swscaler @ 0x23c8c0] No accelerated colorspace conversion found from yuv422p to rgb24.
[WARN] [WallTime: 1517694031.356251] arduino_handler ERROR> AM2315 #1: Sensor responded with the wrong function code:255
[mjpeg @ 0x29ca00] ignoring invalid SAR: 0/0
[swscaler @ 0x2a36e0] No accelerated colorspace conversion found from yuv422p to rgb24.
[WARN] [WallTime: 1517694032.356230] arduino_handler ERROR> AM2315 #1: Sensor responded with the wrong function code:255
[mjpeg @ 0x29ca00] ignoring invalid SAR: 0/0
[swscaler @ 0x2a36e0] No accelerated colorspace conversion found from yuv422p to rgb24.
[WARN] [WallTime: 1517694033.355818] arduino_handler ERROR> AM2315 #1: Sensor responded with the wrong function code:255
[mjpeg @ 0x29ca00] ignoring invalid SAR: 0/0
[swscaler @ 0x2a36e0] No accelerated colorspace conversion found from yuv422p to rgb24.
[WARN] [WallTime: 1517694034.355808] arduino_handler ERROR> AM2315 #1: Sensor responded with the wrong function code:255
[mjpeg @ 0x29ca00] ignoring invalid SAR: 0/0
[swscaler @ 0x2a36e0] No accelerated colorspace conversion found from yuv422p to rgb24.
[WARN] [WallTime: 1517694035.356239] arduino_handler ERROR> AM2315 #1: Sensor responded with the wrong function code:255
[mjpeg @ 0x29ca00] ignoring invalid SAR: 0/0
[swscaler @ 0x2a36e0] No accelerated colorspace conversion found from yuv422p to rgb24.
[WARN] [WallTime: 1517694036.356012] arduino_handler ERROR> AM2315 #1: Sensor responded with the wrong function code:255
[mjpeg @ 0x29ca00] ignoring invalid SAR: 0/0
[swscaler @ 0x2a36e0] No accelerated colorspace conversion found from yuv422p to rgb24.
[WARN] [WallTime: 1517694037.356230] arduino_handler ERROR> AM2315 #1: Sensor responded with the wrong function code:255
[mjpeg @ 0x29ca00] ignoring invalid SAR: 0/0
[swscaler @ 0x2a36e0] No accelerated colorspace conversion found from yuv422p to rgb24.
[WARN] [WallTime: 1517694038.357482] arduino_handler ERROR> AM2315 #1: Sensor responded with the wrong function code:255
[mjpeg @ 0x29ca00] ignoring invalid SAR: 0/0
[swscaler @ 0x2a36e0] No accelerated colorspace conversion found from yuv422p to rgb24.
[WARN] [WallTime: 1517694039.356251] arduino_handler ERROR> AM2315 #1: Sensor responded with the wrong function code:255
[mjpeg @ 0x29ca00] ignoring invalid SAR: 0/0
[swscaler @ 0x2a36e0] No accelerated colorspace conversion found from yuv422p to rgb24.
[WARN] [WallTime: 1517694040.356291] arduino_handler ERROR> AM2315 #1: Sensor responded with the wrong function code:255
[mjpeg @ 0x29ca00] ignoring invalid SAR: 0/0
[swscaler @ 0x2a36e0] No accelerated colorspace conversion found from yuv422p to rgb24.
[mjpeg @ 0x29ca00] ignoring invalid SAR: 0/0
[swscaler @ 0x2a36e0] No accelerated colorspace conversion found from yuv422p to rgb24.
[mjpeg @ 0x29ca00] ignoring invalid SAR: 0/0
[swscaler @ 0x2a36e0] No accelerated colorspace conversion found from yuv422p to rgb24.
[WARN] [WallTime: 1517694043.614535] arduino_handler ERROR> AM2315 #1: Sensor responded with the wrong function code:255

Kindly let us know if this is because of the connection issue or something else.
Also, it would be great if anyone could help in understanding the error “No accelerated colorspace conversion found from yuv422p to rgb24.
[mjpeg @ 0x29ca00] ignoring invalid SAR: 0/0

Thanks!


Omaha Mavericks Food Computer 2.0 - (MavFC)
#2

@Webb.Peter @sllo @rbaynes Any inputs on this would be of great help!


#3

I would check your UI (second tab) and see if the sensors are logging - I am not sure about the arugula recipe either. You may be better off with “common greens” or a simpler one to just test.

If I remember correctly I was initially baffled by this persistent error as well. As it’s been explained to me though, I believe what we’re seeing is the service of the food computer running. The error you’re seeing is due to a calibration file that I believe is missing (it has something to do with the Computer Vision down the line) - this might be helpful:

@david @ferguman


#4

Unplugging/replugging the camera USB connection to Raspberry Pi worked! I am able to get image on the UI now.

The second tab on the UI looks something like this.

From what I understand, the number displayed next to the target is what is set in the recipe. Ideally I should see a reading next to the Air Temperature. Correct me if I am wrong on this.


#5

Thanks again for the reply! I was able to check the output format of the camera. Apparently, it was an issue with conversion of format from what was captured(yuyv) to what was provided in the usb_cam.yaml (fmpeg) file. I changed both to yuyv and works great.

Here is a snap of the UI now.


#6

Dear,
It seems you are building with V2 PFC Kits,am I right?

1.you are missing the headcam.yaml
2.the error from am2315 (i2c bus) code 255
3. MHZ16(i2c bus) take time to warm up
may be the above things aleady used up the time between updated of data so no data being put to system ie:no data show to ui
I have no suitable webcam as yours , I only use 640x480 webcam start PFC, plug in to /dev/video0 (and use /dev/vidoe1 ,pi_image_server to put to /www/var/html/img.jpg)

After I download and modify the 640x480 to /home/pi/.ros/camera_info/head_camera.yaml
and usbcam.yaml under “launch” the am2315 and MHZ16 can look more good then before.
MHZ16 need time to start up. so you can see it will give out some error then stop giving out error. If you are building with kits everything should goes right, give it some time to response/update to the UI.

ps: I am intresting on your usbcam: what model ? content of your usbcam.yaml and you headcam.yaml ?


#7

Dear,

what “both” means. one is usb_cam.yaml and …


#8

Hello @sllo I am working with @djantz on this project. By both I meant, the format specified in the usb_cam.yaml file and the format specified upon running v4l2-ctl --list-formats-ext which gives us the format in which the image is captured. Hope that answers your question.

Regards,
Vivek


#9

It looks like you’re running a pfc1-general_greens recipe. If I’m not mistaken they have updated the recipe format, so you’ll need to use one intended for the V2. Perhaps @sllo can recommend something, but I think this will work as the bare minimum: https://github.com/OpenAgInitiative/openag_recipe_bag/blob/master/pfc_stable_grow.json


#10

Thanks a lot @Webb.Peter for your response! We will give this a try tomorrow. I was curious to know if the readings come up on the UI if we do not start any recipe? Or starting a recipe is a must to have the readings come up?

We will get back to you on our proceedings! We hope that we will be make progress in this regards.


#11

Pretty sure you’re correct in that the UI needs a recipe to display sensors. Definitely impacts the “Target” I believe. If someone knows otherwise please speak up, I’m going off of memory here (@ferguman has both of our V2’s in his garage right now).

Also, you want to put your pH/EC into some water or solution as well to make sure it shows up.


#12

Awesome! Thanks a lot for the information @Webb.Peter. Appreciate your time.


#13

I saw a text about i2c bus, a good power V+ to i2c bus devices were needed. The pull-up resistor may use lower value ,from 4.7K to 1K but will lower the i2c bus speed. …OR may be bad soldering inside the AM2315 lead wire.


#14

Thanks @sllo for your reply. We will check on it for sure.

As of now, we are getting this in response:

Do you have an idea on the two warning messages that we are seeing?

pi@raspberrypi:~/catkin_ws/src/openag_brain $ rosrun openag_brain main --screen personal_food_computer_v2.launch
Initializing the database
Applying CouchDB configuration
Creating databases
Pushing design documents
Spawning software modules
… logging to /home/pi/.ros/log/4f1648d6-0c21-11e8-b293-b827eb0361b3/roslaunch-raspberrypi-4772.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://raspberrypi:35735/

SUMMARY

PARAMETERS

  • /categories: [‘sensors’, 'actu…
  • /environments/environment_1/aerial_image/autofocus: False
  • /environments/environment_1/aerial_image/brightness: 32
  • /environments/environment_1/aerial_image/camera_frame_id: head_camera
  • /environments/environment_1/aerial_image/camera_info_url: /home/pi/.ros/cam…
  • /environments/environment_1/aerial_image/camera_name: head_camera
  • /environments/environment_1/aerial_image/contrast: 32
  • /environments/environment_1/aerial_image/focus: 51
  • /environments/environment_1/aerial_image/framerate: 1
  • /environments/environment_1/aerial_image/image_height: 1024
  • /environments/environment_1/aerial_image/image_width: 1280
  • /environments/environment_1/aerial_image/io_method: mmap
  • /environments/environment_1/aerial_image/pixel_format: yuyv
  • /environments/environment_1/aerial_image/saturation: 32
  • /environments/environment_1/aerial_image/sharpness: 22
  • /environments/environment_1/aerial_image/video_device: /dev/video0
  • /environments/environment_1/air_flush_controller_1/variable: air_flush
  • /environments/environment_1/air_temperature_controller_1/Kd: 1.0
  • /environments/environment_1/air_temperature_controller_1/Ki: 0.0
  • /environments/environment_1/air_temperature_controller_1/Kp: 1.0
  • /environments/environment_1/air_temperature_controller_1/deadband_width: 0.5
  • /environments/environment_1/air_temperature_controller_1/lower_limit: -1.0
  • /environments/environment_1/air_temperature_controller_1/upper_limit: 1.0
  • /environments/environment_1/air_temperature_controller_1/variable: air_temperature
  • /environments/environment_1/air_temperature_controller_1/windup_limit: 1000.0
  • /environments/environment_1/arduino_handler/baud_rate: 115200
  • /environments/environment_1/arduino_handler/publisher_rate_hz: 1
  • /environments/environment_1/image_persistence_1/min_update_interval: 3600
  • /environments/environment_1/light_controller_blue_1/variable: light_intensity_blue
  • /environments/environment_1/light_controller_red_1/variable: light_intensity_red
  • /environments/environment_1/light_controller_white_1/variable: light_intensity_w…
  • /environments/environment_1/nutrient_flora_duo_a_controller_1/variable: nutrient_flora_duo_a
  • /environments/environment_1/nutrient_flora_duo_b_controller_1/variable: nutrient_flora_duo_b
  • /environments/environment_1/sensor_persistence_1/max_update_interval: 600
  • /environments/environment_1/sensor_persistence_1/min_update_interval: 5
  • /environments/environment_1/video_writer_1/timelapse_scaling_factor: 86400
  • /environments/environment_1/water_level_high_controller_1/variable: water_level_high
  • /environments/environment_1/water_potential_hydrogen_controller_1/Kd: 0.75
  • /environments/environment_1/water_potential_hydrogen_controller_1/Ki: 0.25
  • /environments/environment_1/water_potential_hydrogen_controller_1/Kp: 0.25
  • /environments/environment_1/water_potential_hydrogen_controller_1/deadband_width: 0.5
  • /environments/environment_1/water_potential_hydrogen_controller_1/lower_limit: -1.0
  • /environments/environment_1/water_potential_hydrogen_controller_1/upper_limit: 1.0
  • /environments/environment_1/water_potential_hydrogen_controller_1/variable: water_potential_h…
  • /environments/environment_1/water_potential_hydrogen_controller_1/windup_limit: 1000.0
  • /firmware_module: [{‘environment’: …
  • /firmware_module_type: [{‘description’: …
  • /rosdistro: indigo
  • /rosversion: 1.11.21
  • /var_types/camera_variables/aerial_image/description: Image from above …
  • /var_types/camera_variables/aerial_image/name: aerial_image
  • /var_types/camera_variables/aerial_image/units: png
  • /var_types/camera_variables/frontal_image/description: Image from in fro…
  • /var_types/camera_variables/frontal_image/name: frontal_image
  • /var_types/camera_variables/frontal_image/units: png
  • /var_types/environment_variables/air_carbon_dioxide/description: The amount of Car…
  • /var_types/environment_variables/air_carbon_dioxide/name: air_carbon_dioxide
  • /var_types/environment_variables/air_carbon_dioxide/type: std_msgs/Float64
  • /var_types/environment_variables/air_carbon_dioxide/units: ppm
  • /var_types/environment_variables/air_flush/description: Air flush a speci…
  • /var_types/environment_variables/air_flush/name: air_flush
  • /var_types/environment_variables/air_flush/type: std_msgs/Float64
  • /var_types/environment_variables/air_flush/units: CFM
  • /var_types/environment_variables/air_humidity/description: A measure of the …
  • /var_types/environment_variables/air_humidity/name: air_humidity
  • /var_types/environment_variables/air_humidity/type: std_msgs/Float64
  • /var_types/environment_variables/air_humidity/units: percent relative
  • /var_types/environment_variables/air_oxygen/description: Oxygen density in…
  • /var_types/environment_variables/air_oxygen/name: air_oxygen
  • /var_types/environment_variables/air_oxygen/type: std_msgs/Float64
  • /var_types/environment_variables/air_oxygen/units: percent
  • /var_types/environment_variables/air_temperature/description: Temperature of th…
  • /var_types/environment_variables/air_temperature/name: air_temperature
  • /var_types/environment_variables/air_temperature/type: std_msgs/Float64
  • /var_types/environment_variables/air_temperature/units: degrees C
  • /var_types/environment_variables/light_illuminance/description: The intensity of …
  • /var_types/environment_variables/light_illuminance/name: light_illuminance
  • /var_types/environment_variables/light_illuminance/type: std_msgs/Float64
  • /var_types/environment_variables/light_illuminance/units: lux
  • /var_types/environment_variables/light_intensity_blue/description: The intensity set…
  • /var_types/environment_variables/light_intensity_blue/name: light_intensity_blue
  • /var_types/environment_variables/light_intensity_blue/type: std_msgs/Float64
  • /var_types/environment_variables/light_intensity_blue/units: percent relative
  • /var_types/environment_variables/light_intensity_red/description: The intensity set…
  • /var_types/environment_variables/light_intensity_red/name: light_intensity_red
  • /var_types/environment_variables/light_intensity_red/type: std_msgs/Float64
  • /var_types/environment_variables/light_intensity_red/units: percent relative
  • /var_types/environment_variables/light_intensity_white/description: The intensity set…
  • /var_types/environment_variables/light_intensity_white/name: light_intensity_w…
  • /var_types/environment_variables/light_intensity_white/type: std_msgs/Float64
  • /var_types/environment_variables/light_intensity_white/units: percent relative
  • /var_types/environment_variables/nutrient_flora_duo_a/description: FloraDuo nutrient…
  • /var_types/environment_variables/nutrient_flora_duo_a/name: nutrient_flora_duo_a
  • /var_types/environment_variables/nutrient_flora_duo_a/type: std_msgs/Float64
  • /var_types/environment_variables/nutrient_flora_duo_a/units: ml/h
  • /var_types/environment_variables/nutrient_flora_duo_b/description: FloraDuo nutrient…
  • /var_types/environment_variables/nutrient_flora_duo_b/name: nutrient_flora_duo_b
  • /var_types/environment_variables/nutrient_flora_duo_b/type: std_msgs/Float64
  • /var_types/environment_variables/nutrient_flora_duo_b/units: ml/h
  • /var_types/environment_variables/water_dissolved_oxygen/description: A measure of the …
  • /var_types/environment_variables/water_dissolved_oxygen/name: water_dissolved_o…
  • /var_types/environment_variables/water_dissolved_oxygen/type: std_msgs/Float64
  • /var_types/environment_variables/water_dissolved_oxygen/units: mg/L
  • /var_types/environment_variables/water_electrical_conductivity/description: Electrical conduc…
  • /var_types/environment_variables/water_electrical_conductivity/name: water_electrical_…
  • /var_types/environment_variables/water_electrical_conductivity/type: std_msgs/Float64
  • /var_types/environment_variables/water_electrical_conductivity/units: uS/cm
  • /var_types/environment_variables/water_level_high/description: Is water above th…
  • /var_types/environment_variables/water_level_high/name: water_level_high
  • /var_types/environment_variables/water_level_high/type: std_msgs/Float64
  • /var_types/environment_variables/water_level_low/description: Is water below th…
  • /var_types/environment_variables/water_level_low/name: water_level_low
  • /var_types/environment_variables/water_level_low/type: std_msgs/Float64
  • /var_types/environment_variables/water_oxidation_reduction_potential/description: Oxidation-reducti…
  • /var_types/environment_variables/water_oxidation_reduction_potential/name: water_oxidation_r…
  • /var_types/environment_variables/water_oxidation_reduction_potential/type: std_msgs/Float64
  • /var_types/environment_variables/water_oxidation_reduction_potential/units: mV
  • /var_types/environment_variables/water_potential_hydrogen/description: Potential Hydroge…
  • /var_types/environment_variables/water_potential_hydrogen/name: water_potential_h…
  • /var_types/environment_variables/water_potential_hydrogen/type: std_msgs/Float64
  • /var_types/environment_variables/water_potential_hydrogen/units: pH
  • /var_types/environment_variables/water_temperature/description: Temperature of th…
  • /var_types/environment_variables/water_temperature/name: water_temperature
  • /var_types/environment_variables/water_temperature/type: std_msgs/Float64
  • /var_types/environment_variables/water_temperature/units: degrees C
  • /var_types/recipe_variables/recipe_end/description: Represents the en…
  • /var_types/recipe_variables/recipe_end/name: recipe_end
  • /var_types/recipe_variables/recipe_end/type: std_msgs/String
  • /var_types/recipe_variables/recipe_start/description: Represents the st…
  • /var_types/recipe_variables/recipe_start/name: recipe_start
  • /var_types/recipe_variables/recipe_start/type: std_msgs/String
  • /var_types/user_variables/marker/description: Marks some user-d…
  • /var_types/user_variables/marker/name: marker

NODES
/
api (openag_brain/api.py)
expand_diagnostics (openag_brain/expand_diagnostics.py)
sensor_info_publisher (openag_brain/sensor_info_publisher.py)
/environments/environment_1/
aerial_image (usb_cam/usb_cam_node)
air_flush_controller_1 (openag_brain/direct_controller.py)
air_temperature_controller_1 (openag_brain/pid.py)
arduino_handler (openag_brain/arduino_handler.py)
image_persistence_1 (openag_brain/image_persistence.py)
light_controller_blue_1 (openag_brain/direct_controller.py)
light_controller_red_1 (openag_brain/direct_controller.py)
light_controller_white_1 (openag_brain/direct_controller.py)
nutrient_flora_duo_a_controller_1 (openag_brain/direct_controller.py)
nutrient_flora_duo_b_controller_1 (openag_brain/direct_controller.py)
recipe_handler_1 (openag_brain/recipe_handler.py)
recipe_persistence_1 (openag_brain/recipe_persistence.py)
sensor_persistence_1 (openag_brain/sensor_persistence.py)
topic_filter_1 (openag_brain/topic_filter.py)
video_writer_1 (openag_brain/video_writer.py)
water_level_high_controller_1 (openag_brain/linear_controller.py)
water_potential_hydrogen_controller_1 (openag_brain/pid.py)

auto-starting new master
process[master]: started with pid [4783]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to 4f1648d6-0c21-11e8-b293-b827eb0361b3
process[rosout-1]: started with pid [4796]
started core service [/rosout]
process[environments/environment_1/water_level_high_controller_1-2]: started with pid [4813]
process[environments/environment_1/water_potential_hydrogen_controller_1-3]: started with pid [4814]
process[environments/environment_1/topic_filter_1-4]: started with pid [4815]
process[environments/environment_1/air_temperature_controller_1-5]: started with pid [4816]
process[environments/environment_1/recipe_handler_1-6]: started with pid [4819]
process[environments/environment_1/recipe_persistence_1-7]: started with pid [4820]
process[environments/environment_1/video_writer_1-8]: started with pid [4823]
process[environments/environment_1/image_persistence_1-9]: started with pid [4824]
process[environments/environment_1/light_controller_red_1-10]: started with pid [4827]
process[environments/environment_1/light_controller_blue_1-11]: started with pid [4830]
process[environments/environment_1/light_controller_white_1-12]: started with pid [4834]
process[environments/environment_1/nutrient_flora_duo_a_controller_1-13]: started with pid [4837]
process[environments/environment_1/nutrient_flora_duo_b_controller_1-14]: started with pid [4838]
process[environments/environment_1/air_flush_controller_1-15]: started with pid [4841]
process[environments/environment_1/sensor_persistence_1-16]: started with pid [4844]
process[environments/environment_1/aerial_image-17]: started with pid [4851]
process[environments/environment_1/arduino_handler-18]: started with pid [4867]
process[expand_diagnostics-19]: started with pid [4870]
process[api-20]: started with pid [4887]
process[sensor_info_publisher-21]: started with pid [4892]
[INFO] [WallTime: 1518019805.089195] Filtering topic light_intensity_blue/raw to topic light_intensity_blue/measured
[INFO] [WallTime: 1518019805.213459] Filtering topic water_oxidation_reduction_potential/raw to topic water_oxidation_reduction_potential/measured
[INFO] [WallTime: 1518019805.323916] Filtering topic air_oxygen/raw to topic air_oxygen/measured
[INFO] [WallTime: 1518019805.424084] Filtering topic water_electrical_conductivity/raw to topic water_electrical_conductivity/measured
[INFO] [WallTime: 1518019805.513439] Filtering topic nutrient_flora_duo_b/raw to topic nutrient_flora_duo_b/measured
[INFO] [WallTime: 1518019805.593813] Filtering topic water_potential_hydrogen/raw to topic water_potential_hydrogen/measured
[INFO] [WallTime: 1518019805.730051] Filtering topic air_flush/raw to topic air_flush/measured
[INFO] [WallTime: 1518019805.901225] Filtering topic nutrient_flora_duo_a/raw to topic nutrient_flora_duo_a/measured
[INFO] [WallTime: 1518019806.087393] Filtering topic water_dissolved_oxygen/raw to topic water_dissolved_oxygen/measured
[INFO] [WallTime: 1518019806.206556] Filtering topic water_level_high/raw to topic water_level_high/measured
[INFO] [WallTime: 1518019806.312653] Filtering topic air_temperature/raw to topic air_temperature/measured
[INFO] [WallTime: 1518019806.410254] Filtering topic water_level_low/raw to topic water_level_low/measured
[INFO] [WallTime: 1518019806.540017] Filtering topic light_illuminance/raw to topic light_illuminance/measured
[INFO] [WallTime: 1518019806.666868] Filtering topic air_humidity/raw to topic air_humidity/measured
[INFO] [WallTime: 1518019806.792976] Filtering topic light_intensity_white/raw to topic light_intensity_white/measured
[INFO] [WallTime: 1518019806.897465] Filtering topic air_carbon_dioxide/raw to topic air_carbon_dioxide/measured
[INFO] [WallTime: 1518019807.037444] Filtering topic light_intensity_red/raw to topic light_intensity_red/measured
[INFO] [WallTime: 1518019807.137172] Filtering topic water_temperature/raw to topic water_temperature/measured
[ INFO] [1518019812.240278543]: camera calibration URL: /home/pi/.ros/camera_info/head_camera.yaml
[ERROR] [1518019812.242759545]: Invalid camera calibration URL: /home/pi/.ros/camera_info/head_camera.yaml
[ INFO] [1518019812.244196739]: Starting ‘head_camera’ (/dev/video0) at 1280x1024 via mmap (yuyv) at 1 FPS
[INFO] [WallTime: 1518019812.287783] API now listening on http://0.0.0.0:5000
[WARN] [WallTime: 1518019815.242545] arduino_handler: Type conversion error, skipping.
[INFO] [WallTime: 1518019816.464716] Posting image
Traceback (most recent call last):
File “/home/pi/catkin_ws/src/openag_brain/nodes/video_writer.py”, line 283, in
server, environment, camera_var, timelapse_scaling_factor
File “/home/pi/catkin_ws/src/openag_brain/nodes/video_writer.py”, line 128, in init
self.append_video(row.value)
File “/home/pi/catkin_ws/src/openag_brain/nodes/video_writer.py”, line 237, in append_video
self.image_filepath, self.snippet_filepath, snippet_duration
File “/home/pi/catkin_ws/src/openag_brain/src/openag_brain/video_helpers.py”, line 47, in create_video_from_image
str(duration), “-pix_fmt”, “yuv420p”, video_path
File “/usr/lib/python2.7/subprocess.py”, line 522, in call
return Popen(*popenargs, **kwargs).wait()
File “/usr/lib/python2.7/subprocess.py”, line 710, in init
errread, errwrite)
File “/usr/lib/python2.7/subprocess.py”, line 1335, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
[WARN] [WallTime: 1518019819.776437] arduino_handler: Partial message: ><
[WARN] [WallTime: 1518019822.050626] arduino_handler: Partial message: ><
[WARN] [WallTime: 1518019833.352006] arduino_handler: serial_connection.readline() broken
[WARN] [WallTime: 1518019836.382091] arduino_handler: Partial message: ><
[WARN] [WallTime: 1518019841.002769] arduino_handler: Partial message: ><
[WARN] [WallTime: 1518019843.274010] arduino_handler: Partial message: ><
[WARN] [WallTime: 1518019854.577124] arduino_handler: serial_connection.readline() broken
[WARN] [WallTime: 1518019857.605727] arduino_handler: Partial message: ><
[WARN] [WallTime: 1518019868.908803] arduino_handler: serial_connection.readline() broken
[WARN] [WallTime: 1518019871.934176] arduino_handler: Partial message: ><
[WARN] [WallTime: 1518019883.235407] arduino_handler: serial_connection.readline() broken
[WARN] [WallTime: 1518019886.259953] arduino_handler: Partial message: ><
[WARN] [WallTime: 1518019897.564549] arduino_handler: serial_connection.readline() broken
[WARN] [WallTime: 1518019900.609701] arduino_handler: Partial message: ><
[WARN] [WallTime: 1518019911.913729] arduino_handler: serial_connection.readline() broken
[WARN] [WallTime: 1518019914.938105] arduino_handler: Partial message: ><
[WARN] [WallTime: 1518019926.238966] arduino_handler: serial_connection.readline() broken
[WARN] [WallTime: 1518019929.322033] arduino_handler: Partial message: ><
[WARN] [WallTime: 1518019931.591188] arduino_handler: Partial message: ><
[WARN] [WallTime: 1518019938.405687] arduino_handler: Partial message: ><
[WARN] [WallTime: 1518019949.708520] arduino_handler: serial_connection.readline() broken
[WARN] [WallTime: 1518019952.736601] arduino_handler: Partial message: ><
[WARN] [WallTime: 1518019964.038183] arduino_handler: serial_connection.readline() broken
[WARN] [WallTime: 1518019967.114051] arduino_handler: Partial message: ><


#15

Just to add to what I already mentioned, I ran this command to check if the sensors connected to I2C bus are detected. Nothing shows up!

pi@raspberrypi:~ $ sudo i2cdetect -y 1
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: – -- – -- – -- – -- – -- – -- –
10: – -- – -- – -- – -- – -- – -- – -- – --
20: – -- – -- – -- – -- – -- – -- – -- – --
30: – -- – -- – -- – -- – -- – -- – -- – --
40: – -- – -- – -- – -- – -- – -- – -- – --
50: – -- – -- – -- – -- – -- – -- – -- – --
60: – -- – -- – -- – -- – -- – -- – -- – --

Is this the issue?


#16

I am consistently getting this warning now.

[WARN] [WallTime: 1518026347.781946] arduino_handler: serial_connection.readline() broken


#17

Dear @Vivek, using Pi GPIO pins https://www.raspberrypi.org/documentation/usage/gpio/
Beware CO2 sensor ,AM2315, PH, EC are using the same i2c bus connection USING Pi GPIO pins
Must have pull-up resistors .Find i2c bus “images” on internet to see it.


#18

Thanks a lot @sllo for your inputs. We were wondering if having pull-up resistors is a must? It is not mentioned as part of the food computer v2 build so we were a little confused in this regards. Also, what is the value of resistors that are connected to the sensors?


#19

Dear @Vivek @djantz

your EZO PH and EZO EC, may still in UART mode.

If your are using the PFC 2, Signal broad, the pull resistors is aleady on PCB.

Eagle PCB format
OpenAg_Signals_V6.sch


#20

Thanks for your reply @sllo. We would have to check that. We would go ahead and try with steps suggested in this thread: “Reading sensor data

Also, let us know if you are aware of a better way to change it ti I2C mode from UART.