Skip to content

Commit

Permalink
module run, camera not found
Browse files Browse the repository at this point in the history
  • Loading branch information
caseystone committed Aug 28, 2024
1 parent 858b4c2 commit 275d192
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 12 deletions.
21 changes: 15 additions & 6 deletions applications/example_app/src/example_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,24 @@ def main() -> None:
"wait_time": 5,
"file_name": "experiment_output.jpg",
},
blocking=True,
simulate=False,
)
print(json.dumps(run_info, indent=2))

#print(json.dumps(run_info, indent=2))

# TODO Non-hardcoded paths only!
output_dir = Path("/Users/cstone/Documents/RapidPrototypingLab/GitRepos/MYC212_workcell/applications/example_app/src/tests")
output_dir.mkdir(parents=True, exist_ok=True)
datapoint_id = run_info.get_datapoint_id_by_label("image_result")
exp.save_datapoint_value(datapoint_id, output_dir / f"image_result.jpg")

# The below line can be used to fetch the result and save it in our local directory
exp.get_wf_result_file(
run_id=run_info["run_id"],
filename=run_info["hist"]["Take Picture"]["action_msg"],
output_filepath="experiment_output.jpg",
)
# exp.get_wf_result_file(
# run_id=run_info["run_id"],
# filename=run_info["hist"]["Take Picture"]["action_msg"],
# output_filepath="experiment_output.jpg",
# )


if __name__ == "__main__":
Expand Down
6 changes: 6 additions & 0 deletions applications/example_app/workflows/example_workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,9 @@ flowdef:
action: take_picture
args:
file_name: "payload.file_name"
data_labels:
image: image_result




6 changes: 3 additions & 3 deletions docker/wei.compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
services:
wei_server:
image: ghcr.io/ad-sdl/wei
container_name: wei_server
container_name: myc212_wc_server
ports:
- 8000:8000
volumes:
Expand All @@ -19,7 +19,7 @@ services:

wei_engine:
image: ghcr.io/ad-sdl/wei
container_name: wei_engine
container_name: myc212_engine
volumes:
- ./workcell_defs:/workcell_defs
- ${WEI_DATA_DIR}:/home/app/.wei
Expand All @@ -34,7 +34,7 @@ services:

wei_redis:
image: redis
container_name: wei_redis
container_name: myc212_redis
ports:
- 6379:6379
volumes:
Expand Down
13 changes: 10 additions & 3 deletions workcell_defs/example_workcell.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
name: Example_Workcell
name: MYC212_Workcell

# Configuration info and parameters for the workcell and WEI
# All of these values can be overridden via CLI arguments
config:
# This is the name of the container running the WEI server,
# or the hostname/IP of the machine running the WEI server if not using Docker (or addressing from another machine)
server_host: wei_server
server_host: myc212_wc_server
server_port: 8000
redis_host: wei_redis
redis_host: myc212_redis
redis_port: 6379
reset_locations: false
update_interval: 1.0
Expand All @@ -26,6 +26,13 @@ modules:
interface: wei_rest_node
config:
rest_node_address: "http://camera_node:2001"

# - name: camera_module
# model: camera
# interface: wei_rest_node
# config:
# rest_node_address: "http://parker.cels.anl.gov:3001"
# workcell_coordinates: [0,0,0,1,0,0,0]

locations:
webcam:
Expand Down

0 comments on commit 275d192

Please sign in to comment.