-
Notifications
You must be signed in to change notification settings - Fork 10
add examples folder and add an example for a charging station poc #198
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
1b24115 to
be29f3f
Compare
|
Thanks! I'll look into the PR later but FYI, there's already the rest.py for exact same purpose at dotbot_api.py. Also just name the directory "examples". |
|
Ok! will update to use rest.py. Also will update the name! |
fd6c20b to
d497917
Compare
aabadie
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you move the charging station code into its own examples subdirectory, e.g "examples/charging_station" ?
Maybe the term charging station is too specific, it's more a "collision avoidance" example, no?
Also remove "poc" suffix from file and function names.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #198 +/- ##
==========================================
+ Coverage 79.27% 80.15% +0.88%
==========================================
Files 21 25 +4
Lines 2157 2535 +378
==========================================
+ Hits 1710 2032 +322
- Misses 447 503 +56 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@aabadie I split the charging station into 2 parts and added tests for them. Let me know if you need explanation or the testcases are not thoroughly enough
Also added testcases for new functions and renamed some functions/files. |
dotbot/examples/charging_station.py
Outdated
| params: OrcaParams, | ||
| client: RestClient, | ||
| ) -> None: | ||
| dotbots = await client.fetch_active_dotbots() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we use websockets to fetch the active dotbots instead of HTTP polling?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea, I am testing on another branch too see if makes sense on the scalability or the gains are low
|
This needs a rebase now that #199 is merged |
Thanks! That looks really good. In the charging station example module, the queue_and_charge function is not tested (while queue and charge are, individually). Do you really need that function? Can you address the remaining comments so we can move forward and merge this? |
and add tests
d4110b9 to
0acdef2
Compare
|
I removed the function and moved to main, but I don't know if this makes a difference. Everything is rebased on the new main!
|
aabadie
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's gooo
This PR adds a one folder for experimental scripts to prototype and validate experiments DotBot simulator. Also it adds one experiment as an example.
The new folder has 4 files:
dotbot_api.py: Exposes a small REST-based API used to control and move DotBots via HTTP.vec2.py: A lightweight collection of basic 2D vector operations, used byorca.py.orca.py: Implements Optimal Reciprocal Collision Avoidance (ORCA) to compute collision-free velocities for each robot.charging_station_poc.py: The main entry point that ties everything together. It defines the high-level behavior, it splits in 2 big loops (queueing, charging + parking) and drives the robots toward their goals using ORCA and the DotBot Waypoint API.let me know if you guys have any question!