Add traffic light adapter template#44
Conversation
Signed-off-by: Loke Ji Xian <loke_ji_xian@cgh.com.sg>
|
Hi @jixiancgh, thank you for PR. Will take a look and review, hopefully within these 2 weeks. |
|
Hi @jixiancgh, I have started evaluating While that is happening, in an effort for better code quality standardization, please include the following files under directory, Files To Include 📚
Note Replace Instructions 📘
Note There are no pytests included. This CI is purely for minimal linting, to keep things simple. act -v -j test --reuse --pull=false
Note If there are specific linting exceptions needed, please feel free to reach out. |
a23ae24 to
9d2abd9
Compare
Signed-off-by: Loke Ji Xian <loke_ji_xian@cgh.com.sg>
|
Hi @cardboardcode , I have fixed the formatting and added tests. |
|
Hi @jixiancgh, verified from my side that the minimal linting CI is fully passing with the changes made. ✅ See steps below to reproduce: Steps To Reproduce 📘git clone git@github.com:chart-sg/fleet_adapter_template.git --branch add_traffic_light_adapter_template --single-branch --depth 1 && cd fleet_adapter_templateact -v -j test --reuse --pull=falseVerify ✅You should see the following to know the CI is fully passing: ======================== 3 passed, 2 warnings in 0.64s =========================
| --- stderr: traffic_light_adapter_template
|
| =============================== warnings summary ===============================
| test/test_flake8.py::test_flake8
| test/test_flake8.py::test_flake8
| Warning: SelectableGroups dict interface is deprecated. Use select.
|
| -- Docs: https://docs.pytest.org/en/stable/warnings.html
| ---
| Finished <<< traffic_light_adapter_template [1.43s]
|
| Summary: 1 package finished [1.81s]
| 1 package had stderr output: traffic_light_adapter_template
| Summary: 3 tests, 0 errors, 0 failures, 0 skipped
[build_and_test/Minimal Linting Build (humble)-1 ] ✅ Success - Main Run colcon tests [2.410047773s]
[build_and_test/Minimal Linting Build (humble)-1 ] [DEBUG] skipping post step for 'Checkout repository': no action model available
[build_and_test/Minimal Linting Build (humble)-1 ] ⭐ Run Complete job
[build_and_test/Minimal Linting Build (humble)-1 ] Cleaning up container for job Minimal Linting Build (humble)
[build_and_test/Minimal Linting Build (humble)-1 ] [DEBUG] Loading revision from git directory
[build_and_test/Minimal Linting Build (humble)-1 ] [DEBUG] Found revision: 3921986d9231cfd5a558cadceebb54c5e2faacaf
[build_and_test/Minimal Linting Build (humble)-1 ] [DEBUG] HEAD points to '3921986d9231cfd5a558cadceebb54c5e2faacaf'
[build_and_test/Minimal Linting Build (humble)-1 ] [DEBUG] using github ref: refs/heads/add_traffic_light_adapter_template
[build_and_test/Minimal Linting Build (humble)-1 ] [DEBUG] Found revision: 3921986d9231cfd5a558cadceebb54c5e2faacaf
[build_and_test/Minimal Linting Build (humble)-1 ] ✅ Success - Complete job
[build_and_test/Minimal Linting Build (humble)-1 ] 🏁 Job succeeded
Managed to evaluate So far the implementation looks good and working as expected in its participation of traffic deconfliction with the See below for working proof:
Warning Based on the inherent API design of Reference(s) 📚
Follow-up Actions ⬇️@jixiancgh Will suggest a few more minor changes before merging in. |
Signed-off-by: Loke Ji Xian <loke_ji_xian@cgh.com.sg>
Signed-off-by: Loke Ji Xian <loke_ji_xian@cgh.com.sg>
Signed-off-by: Loke Ji Xian <loke_ji_xian@cgh.com.sg>
Signed-off-by: Loke Ji Xian <loke_ji_xian@cgh.com.sg>

New feature implementation
Implemented feature
This PR aims to add a traffic_light_adapter_template package for medium compliance robots. It fills a gap for fleets whose robots self-navigate (the robot's own fleet manager plans and drives the path) but still need RMF for traffic deconfliction with other RMF robots.
Implementation description
fleet_adapter.pyregisters each robot viaAdapter.add_easy_traffic_light. The adapter then polls the robot each update cycle and reports its position and movement state to RMF. RMF responds with Resume, WaitAtNextCheckpoint, or PauseImmediately, which the adapter translates into pause / resume / pause_at_checkpoint robot commands.The main difference is in
traffic_light_command_handle.py:update_state_locked_handle_moving,_handle_waiting_atand_handle_waiting_afterlogicsGenAI Use
We follow OSRA's policy on GenAI tools
Generated-by: