... | ... | @@ -21,10 +21,24 @@ GUI is used to operate the robot and define the state machine of the different t |
|
|
6. Run `ros2 run lhw_intelligence ai_core `
|
|
|
7. In GUI: Add behaviours and press "START"
|
|
|
|
|
|
## An easy state machine example:
|
|
|
This example shows ghow to build a state machine that will follow the first person that the robot sees. By not defining any ID (see step 2) it will stop this behaviour on the first person it sees. By defining person ID as "from 1" in step 4, it will follow the person ID that was found in the behaviour-ID 1 (displayed in the center of the blocks).
|
|
|
|
|
|
1. Click on "Add next"
|
|
|
2. To the left define the first behaviour:
|
|
|
- **Behaviour:** Find person
|
|
|
- **person ID:** _(leave this field empty)_
|
|
|
3. Click on "Add next" on the "Find Person" block
|
|
|
4. To the left define the next behaviour:
|
|
|
- **Behaviour:** Follow person
|
|
|
- **person ID:** from 1
|
|
|
- **Max time in sec:** 5
|
|
|
|
|
|
## Trouble shooting:
|
|
|
> Response: {"op":"status","level":"error","msg":"subscribe: Error: The message required does not exist: lhw_interfaces, msg, BehaviourResultMsg","id":"subscribe:/sm_result:2"}
|
|
|
|
|
|
Solution:
|
|
|
1. Run `colcon build`
|
|
|
2. Run `source install/setup.zsh`
|
|
|
2. Remove generated directory using `rm -rf src/lhw_gui/node_modules/rclnodejs/generated`
|
|
|
4. Run `sh gui.sh` again. |
|
|
4. Run `sh gui.sh` again. |
|
|
\ No newline at end of file |