Instantly share code, notes, and snippets.

Embed
What would you like to do?
Fixture with DHT11 and heater
{
"environment": [
{
"_id": "environment_1",
"name": "Environment 1"
}
],
"firmware_module_type": [
{
"_id": "dht11",
"repository": {
"type": "git",
"url": "https://github.com/aguadopd/openag_dht11.git"
},
"header_file": "openag_dht11.h",
"class_name": "Dht11",
"description": "",
"repository": {
"type": "git",
"url": "https://github.com/aguadopd/openag_dht11.git"
},
"arguments": [
{
"name": "pin",
"type": "int"
}
],
"outputs": {
"air_temperature": {
"type": "std_msgs/Float32"
},
"air_humidity": {
"type": "std_msgs/Float32"
}
},
"dependencies": [
{"type": "git", "url": "https://github.com/OpenAgInitiative/openag_firmware_module.git"}
]
},
{
"_id": "binary_actuator",
"repository": {
"type": "git",
"url": "https://github.com/OpenAgInitiative/openag_binary_actuator.git"
},
"header_file": "openag_binary_actuator.h",
"class_name": "BinaryActuator",
"description": "Driver for an actuator that can only be set ot binary values",
"arguments": [
{
"name": "pin",
"type": "int"
},
{
"name": "is_active_low",
"type": "bool",
"default": false
}
],
"inputs": {
"cmd": {
"type": "std_msgs/Bool",
"categories": ["actuators"]
}
},
"dependencies": [
{"type": "git", "url": "https://github.com/OpenAgInitiative/openag_firmware_module.git"}
]
}
],
"firmware_module": [
{
"_id": "dht11_1",
"type": "dht11",
"environment": "environment_1",
"arguments": [5],
"outputs": {
"air_temperature": {"variable": "air_temperature"},
"air_humidity": {"variable": "air_humidity"}
}
},
{
"_id": "heater_1",
"arguments": [25, true],
"environment": "environment_1",
"type": "binary_actuator",
"inputs": {
"cmd": {
"variable": "air_temperature"
}
}
}
],
"software_module_type": [
{
"_id": "openag_brain:api.py",
"package": "openag_brain",
"executable": "api.py",
"description": "HTTP API for interacting with ROS. Should be accessible at `<hostname>:5984/_openag/`"
},
{
"_id": "openag_brain:handle_arduino.py",
"package": "openag_brain",
"executable": "handle_arduino.py",
"description": "Handles generating code for, flashing, and reading from the Arduino",
"arguments": [
{
"name": "serial_port",
"type": "str",
"default": "/dev/ttyACM0"
}
],
"parameters": {
"should_flash": {
"type": "bool",
"description": "Whether to flash the Arduino during setup",
"default": true
}
}
},
{
"_id": "openag_brain:image_persistence.py",
"package": "openag_brain",
"executable": "image_persistence.py",
"description": "Listens for image data for a specific environment and stores it in CouchDB",
"parameters": {
"min_update_interval": {
"type": "int",
"description": "Minimum amount of time (in seconds) that must pass from the time one image from a given camera is written to the database to the time the next image from the same camera is written to the database.",
"default": "3600"
}
}
},
{
"_id": "openag_brain:pid.py",
"package": "openag_brain",
"executable": "pid.py",
"description": "A Python implementation of a Proportional-Integral-Derivative controller for ROS",
"parameters": {
"Kp": {
"type": "float",
"description": "Proportional control gain",
"default": 0
},
"Ki": {
"type": "float",
"description": "Integral control gain",
"default": 0
},
"Kd": {
"type": "float",
"description": "Derivative control gain",
"default": 0
},
"upper_limit": {
"type": "float",
"description": "The maximum limit for control_effort",
"default": 1
},
"lower_limit": {
"type": "float",
"description": "The minimum limit for control_effort",
"default": -1
},
"windup_limit": {
"type": "float",
"description": "The maximum limit for error integral",
"default": 1000
},
"deadband_width": {
"type": "float",
"description": "Control efforts with an absolute value below this values will be ignored and a 0 will be sent instead",
"default": 0
},
"variable": {
"type": "str",
"description": "The variable on which this loop operates. This parameter is used to rename the input and outputs of this module for easy integration for the inputs and outputs of firmware modules. For example if the `variable` were `air_temperature`, `desired` would become `air_temperature_desired`, `state` would become `air_temperature`, `cmd` would become `air_temperature_cmd`, `up_cmd` would become `air_temperature_up_cmd`, and `down_cmd` would become `air_temperature_down_cmd"
}
},
"inputs": {
"desired": {
"type": "std_msgs/Float64",
"description": "The message data element must contain the desired value of the state measurement of the controlled process. This topic can be renamed by the variable parameter"
},
"state": {
"type": "std_msgs/Float64",
"description": "The message data element must contain the current value of the controlled plant property. The controller publishes std_msgs/Float64 messages on the control_effort topic each time it receives a message on the state topic. Thus the rate at which the plant publishes state governs the control-loop rate - the plant should publish state at the desired loop rate. This topic can be renamed by the topic_from_plant parameter"
}
},
"outputs": {
"cmd": {
"type": "std_msgs/Float64",
"description": "The control_effort message data element contains the control effort to be applied to the process to drive state/data to equal setpoint/data. This topic can be renamed by the topic_from_controller parameter"
}
}
},
{
"_id": "openag_brain:direct_controller.py",
"package": "openag_brain",
"executable": "direct_controller.py",
"description": "A simple control loop that just interprets the set point as a direct command to the actuator",
"parameters": {
"variable": {
"type": "str",
"description": "The variable on which this loop operates. This parameter is used to rename the input and outputs of this module for easy integration for the inputs and outputs of firmware modules. For example if the `variable` were `air_temperature`, `desired` would become `air_temperature_desired`, `state` would become `air_temperature`, `cmd` would become `air_temperature_cmd`, `up_cmd` would become `air_temperature_up_cmd`, and `down_cmd` would become `air_temperature_down_cmd"
}
},
"inputs": {
"desired": {
"type": "std_msgs/Float64",
"description": "The message data element must contain the desired value of the state measurement of the controlled process. This topic can be renamed by the variable parameter"
}
},
"outputs": {
"state": {
"type": "std_msgs/Float64",
"description": "A copy of the cmd output under a different name. The makes explicit the assumption that applying the desired value as a command to the actuator sets the measured value of the relevant environmental variable to the same value."
},
"cmd": {
"type": "std_msgs/Float64",
"description": "The control_effort message data element contains the control effort to be applied to the process to drive state/data to equal setpoint/data. This topic can be renamed by the topic_from_controller parameter"
}
}
},
{
"_id": "openag_brain:on_off_controller.py",
"package": "openag_brain",
"executable": "on_off_controller.py",
"description": "A simple control loop that just interprets boolean set points as a direct commands to the actuator",
"parameters": {
"variable": {
"type": "str",
"description": "The variable on which this loop operates. This parameter is used to rename the input and outputs of this module for easy integration for the inputs and outputs of firmware modules. For example if the `variable` were `air_temperature`, `desired` would become `air_temperature_desired`, `state` would become `air_temperature`, `cmd` would become `air_temperature_cmd`, `up_cmd` would become `air_temperature_up_cmd`, and `down_cmd` would become `air_temperature_down_cmd"
}
},
"inputs": {
"desired": {
"type": "std_msgs/Bool",
"description": "The message data element must contain the desired value of the state measurement of the controlled process. This topic can be renamed by the variable parameter"
}
},
"outputs": {
"state": {
"type": "std_msgs/Bool",
"description": "A copy of the cmd output under a different name. The makes explicit the assumption that applying the desired value as a command to the actuator sets the measured value of the relevant environmental variable to the same value."
},
"cmd": {
"type": "std_msgs/Bool",
"description": "The control_effort message data element contains the control effort to be applied to the process to drive state/data to equal setpoint/data. This topic can be renamed by the topic_from_controller parameter"
}
}
},
{
"_id": "openag_brain:recipe_handler.py",
"package": "openag_brain",
"executable": "recipe_handler.py",
"description": "Runs recipes and outputs set points for a given environment"
},
{
"_id": "openag_brain:sensor_persistence.py",
"package": "openag_brain",
"executable": "sensor_persistence.py",
"description": "Listens for measurements of environmental conditions for a specific environment and writes them to CouchDB",
"parameters": {
"max_update_interval": {
"type": "int",
"description": "Maximum amount of time that can pass between data point post events for an individual environmental variable and environment",
"default": 600
},
"min_update_interval": {
"type": "int",
"description": "Minimum amount of time that must pass between data point post events for an individual environmental variable and environment",
"default": 5
}
}
},
{
"_id": "openag_brain:topic_connector.py",
"package": "openag_brain",
"executable": "topic_connector.py",
"description": "Connects topics between the /sensors, /actuators and /<environment_id> namespaces in intuitive ways"
},
{
"_id": "openag_brain:topic_filter.py",
"package": "openag_brain",
"executable": "topic_filter.py",
"description": "Filters the /raw sensor outputs with an Exponentially Weighted Moving Average filter and creates /filtered topics with the filtered data"
},
{
"_id": "openag_brain:video_writer.py",
"package": "openag_brain",
"executable": "video_writer.py",
"description": "Watches the DB for aerial images of the environment and makes a timelapse from them"
},
{
"_id": "usb_cam:usb_cam_node",
"package": "usb_cam",
"executable": "usb_cam_node",
"description": "The usb_cam_node interfaces with standard USB cameras (e.g. the Logitech Quickcam) using libusb_cam and publishes images as sensor_msgs::Image. Uses the image_transport library to allow compressed image transport.",
"parameters": {
"video_device": {
"type": "str",
"description": "The device the camera is on",
"default": "/dev/video0"
},
"image_width": {
"type": "int",
"description": "Image width",
"default": 640
},
"image_height": {
"type": "int",
"description": "Image height",
"default": 480
},
"pixel_format": {
"type": "str",
"description": "Possible values are mjpeg, yuyv, uyvy",
"default": "mjpeg"
},
"io_method": {
"type": "str",
"default": "mmap",
"description": "Possible values are mmap, read, userptr"
},
"camera_frame_id": {
"type": "str",
"description": "The camera's tf frame",
"default": "head_camera"
},
"framerate": {
"type": "int",
"description": "The required framerate",
"default": 1
},
"contrast": {
"type": "int",
"default": 32,
"description": "Contrast of video image (0-255)"
},
"brightness": {
"type": "int",
"default": 32,
"description": "Brightness of video image (0-255)"
},
"saturation": {
"type": "int",
"default": 32,
"description": "Saturation of video image (0-255)"
},
"sharpness": {
"type": "int",
"default": 22,
"description": "Sharpness of video image (0-255)"
},
"autofocus": {
"type": "bool",
"default": false,
"description": "Enable camera's autofocus"
},
"focus": {
"type": "int",
"default": 51,
"description": "If autofocus is disabled, the focus of the camera (0=at infinity)"
},
"camera_info_url": {
"type": "str",
"default": "",
"description": "An url to the camera calibration file that will be read by the CameraInfoManager class"
},
"camera_name": {
"type": "str",
"default": "head_camera",
"description": "The camera name. This must match the name in the camera calibration"
}
}
}
],
"software_module": [
{
"_id": "arduino_handler",
"type": "openag_brain:handle_arduino.py"
},
{
"_id": "topic_filter",
"type": "openag_brain:topic_filter.py"
},
{
"_id": "topic_connector",
"type": "openag_brain:topic_connector.py"
},
{
"_id": "sensor_persistence_1",
"type": "openag_brain:sensor_persistence.py"
},
{
"_id": "image_persistence_1",
"type": "openag_brain:image_persistence.py",
"parameters": {
"min_update_interval": 3600
}
},
{
"_id": "video_writer_1",
"type": "openag_brain:video_writer.py",
"environment": "environment_1"
},
{
"_id": "recipe_handler_1",
"type": "openag_brain:recipe_handler.py",
"environment": "environment_1"
},
{
"_id": "api",
"type": "openag_brain:api.py"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment