Skip to content
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

The robot consumes battery #14

Open
gabrielsr opened this issue Sep 11, 2020 · 0 comments
Open

The robot consumes battery #14

gabrielsr opened this issue Sep 11, 2020 · 0 comments

Comments

@gabrielsr
Copy link
Collaborator

gabrielsr commented Sep 11, 2020

As a simulation creator
I want to be able to add battery consumption in the simulation
so I can check for consumption in different strategies, the management of battery during a simulation (the robot decides to go to a recharge station), and the failure event of the robot completely depleting its battery.
__

Battery Consumption
This issue of implementation should include creating :

  • a BatteryComponent with the remaining energy in joules.
  • An EnergySystem to decrement the remaining energy on the BatteryComponent.
  • A way of relating actions and movements with a table/function of consumption.
  • A way of binding Movement and Actions to the EnergySystem (events?)

--
Recharge

This issue of implementation should include creating :

  • A RechargeStation component
  • A charging handle in the EnergySystem that progressively recharges the battery when the entity is in the station (further discussion about what is 'to be in the station' should follow).
    __

Test scenario.
Create some test scenarios where some robots are created with battery and do some actions and movements in the scene, then assert the final state of the battery.
Scenarios:
Robots should consume the battery partially.
Robots should consume the battery partially then go to the recharge station and fully recharge.
Robots should consume the battery partially then go to the recharge station and partially recharge.
Robots should consume the battery totally, try to execute some movement and action but it is unable.

__
Nice to have:
A visual indication of the robot battery. Could be a label that follows the robot or fixed in the side of the screen (game HUD style).

Gguidini added a commit that referenced this issue Sep 20, 2020
- Add BatteryComponent
- Add EnergyConsumption system
- Can change actions reactively
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant