Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions nexus_demos/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@ ros2 launch nexus_demos workcell.launch.py workcell_id:=workcell_2 ros_domain_id

`place_on_conveyor` work order:
```bash
ros2 action send_goal /system_orchestrator/execute_order nexus_orchestrator_msgs/action/ExecuteWorkOrder "{order: {work_order_id: '23', work_order: '$(cat config/place_on_conveyor.json)'}}"
ros2 action send_goal /system_orchestrator/execute_order nexus_orchestrator_msgs/action/ExecuteWorkOrder "{order: {work_order_id: '23', work_order: '$(cat config/place_on_conveyor.yaml)'}}"
```

`pick_from_conveyor` work order:
```bash
ros2 action send_goal /system_orchestrator/execute_order nexus_orchestrator_msgs/action/ExecuteWorkOrder "{order: {work_order_id: '24', work_order: '$(cat config/pick_from_conveyor.json)'}}"
ros2 action send_goal /system_orchestrator/execute_order nexus_orchestrator_msgs/action/ExecuteWorkOrder "{order: {work_order_id: '24', work_order: '$(cat config/pick_from_conveyor.yaml)'}}"
```

## Debugging
Expand Down
29 changes: 0 additions & 29 deletions nexus_demos/config/pick_and_place.json

This file was deleted.

15 changes: 15 additions & 0 deletions nexus_demos/config/pick_and_place.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
workInstructionName: "Pick and Place"
steps:
- processId: "place_on_conveyor"
outputItems:
- guid: "productA"
metadata:
quantity: 1
state: "state_1"
- processId: "pick_from_conveyor"
inputItems:
- guid: "productA"
metadata:
quantity: 1
state: "state_1"

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
state: "state_1"
state: "state_1"

EOF lines cannot have white spaces

17 changes: 0 additions & 17 deletions nexus_demos/config/pick_from_conveyor.json

This file was deleted.

9 changes: 9 additions & 0 deletions nexus_demos/config/pick_from_conveyor.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
workInstructionName: "Pick from conveyor"
steps:
- processId: "pick_from_conveyor"
inputItems:
- guid: "productA"
metadata:
quantity: 1
state: "state_1"

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
state: "state_1"
state: "state_1"

EOF lines cannot have white spaces

17 changes: 0 additions & 17 deletions nexus_demos/config/place_on_conveyor.json

This file was deleted.

9 changes: 9 additions & 0 deletions nexus_demos/config/place_on_conveyor.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
workInstructionName: "Place on conveyor"
steps:
- processId: "place_on_conveyor"
outputItems:
- guid: "productA"
metadata:
quantity: 1
state: "state_1"

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
state: "state_1"
state: "state_1"

EOF lines cannot have white spaces

3 changes: 3 additions & 0 deletions nexus_demos/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@
<test_depend>ament_index_cpp</test_depend>
<test_depend>rcpputils</test_depend>

<!-- json2yaml edit -->
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove stale comment

<exec_depend>python3-yaml</exec_depend>

<export>
<build_type>ament_cmake</build_type>
</export>
Expand Down
2 changes: 1 addition & 1 deletion nexus_demos/test_invalid_place_on_conveyor.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ async def test_abort_invalid_place_on_conveyor_wo(self):
self.action_client.wait_for_server()
goal_msg = ExecuteWorkOrder.Goal()
goal_msg.order.work_order_id = "1"
with open(f"{os.path.dirname(__file__)}/config/place_on_conveyor.json") as f:
with open(f"{os.path.dirname(__file__)}/config/place_on_conveyor.yaml") as f:
goal_msg.order.work_order = f.read()
feedbacks: list[ExecuteWorkOrder.Feedback] = []
fb_fut = Future()
Expand Down
4 changes: 2 additions & 2 deletions nexus_demos/test_parallel_duplicated_wo.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ async def test_reject_jobs_over_max(self):
"""
goal_msg = ExecuteWorkOrder.Goal()
goal_msg.order.work_order_id = "1"
with open(f"{os.path.dirname(__file__)}/config/pick_and_place.json") as f:
with open(f"{os.path.dirname(__file__)}/config/pick_and_place.yaml") as f:
goal_msg.order.work_order = f.read()
goal_handle = cast(
ClientGoalHandle, await self.action_client.send_goal_async(goal_msg)
Expand All @@ -75,7 +75,7 @@ async def test_reject_jobs_over_max(self):

goal_msg_2 = ExecuteWorkOrder.Goal()
goal_msg_2.order.work_order_id = "2"
with open(f"{os.path.dirname(__file__)}/config/pick_and_place.json") as f:
with open(f"{os.path.dirname(__file__)}/config/pick_and_place.yaml") as f:
goal_msg_2.order.work_order = f.read()
goal_handle_2 = cast(
ClientGoalHandle, await self.action_client.send_goal_async(goal_msg_2)
Expand Down
2 changes: 1 addition & 1 deletion nexus_demos/test_parallel_pick_and_place_rmf.py.disabled
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class ParallelPickAndPlaceRmfTest(NexusTestCase):
self.action_client.wait_for_server()

goal_msg = ExecuteWorkOrder.Goal()
with open(f"{os.path.dirname(__file__)}/config/pick_and_place.json") as f:
with open(f"{os.path.dirname(__file__)}/config/pick_and_place.yaml") as f:
goal_msg.order.work_order = f.read()

# First goal
Expand Down
4 changes: 2 additions & 2 deletions nexus_demos/test_parallel_wo.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ async def test_reject_jobs_over_max(self):
"""
goal_msg = ExecuteWorkOrder.Goal()
goal_msg.order.work_order_id = "1"
with open(f"{os.path.dirname(__file__)}/config/place_on_conveyor.json") as f:
with open(f"{os.path.dirname(__file__)}/config/place_on_conveyor.yaml") as f:
goal_msg.order.work_order = f.read()
goal_handle = cast(
ClientGoalHandle, await self.action_client.send_goal_async(goal_msg)
Expand All @@ -75,7 +75,7 @@ async def test_reject_jobs_over_max(self):

goal_msg_2 = ExecuteWorkOrder.Goal()
goal_msg_2.order.work_order_id = "2"
with open(f"{os.path.dirname(__file__)}/config/pick_from_conveyor.json") as f:
with open(f"{os.path.dirname(__file__)}/config/pick_from_conveyor.yaml") as f:
goal_msg_2.order.work_order = f.read()
goal_handle_2 = cast(
ClientGoalHandle, await self.action_client.send_goal_async(goal_msg_2)
Expand Down
2 changes: 1 addition & 1 deletion nexus_demos/test_pick_and_place.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ async def test_pick_and_place_wo(self):
self.action_client.wait_for_server()
goal_msg = ExecuteWorkOrder.Goal()
goal_msg.order.work_order_id = "1"
with open(f"{os.path.dirname(__file__)}/config/place_on_conveyor.json") as f:
with open(f"{os.path.dirname(__file__)}/config/place_on_conveyor.yaml") as f:
goal_msg.order.work_order = f.read()
feedbacks: list[ExecuteWorkOrder.Feedback] = []
fb_fut = Future()
Expand Down
2 changes: 1 addition & 1 deletion nexus_demos/test_pick_and_place_rmf.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ async def test_pick_and_place_wo_with_rmf(self):
self.action_client.wait_for_server()
goal_msg = ExecuteWorkOrder.Goal()
goal_msg.order.work_order_id = "1"
with open(f"{os.path.dirname(__file__)}/config/pick_and_place.json") as f:
with open(f"{os.path.dirname(__file__)}/config/pick_and_place.yaml") as f:
goal_msg.order.work_order = f.read()
feedbacks: list[ExecuteWorkOrder.Feedback] = []
fb_fut = Future()
Expand Down