b-robotized / b-robotized/battery_state_broadcaster

Batttery State Broadcaster Refactor

Open
#1 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
1
Forks
1
PR merge metrics
No merged PRs in 30d

Description

# parameter descriptions

- [x] Should I make battery voltage mandatory (always expected?)
- [x] Should i add 2 parameters of lists for interface name for cell voltage and cell temperature?
- [x] Should i have a parameter interface for present, or just do logic for it all the time (if any state interfaces enabeled from that joint, set to true?)
- [x] Should i add these parameters for each joint separately or configured once for the controller (all joints)?
- [x] minimum_voltage
- [x] maximum_voltage
- [x] capacity
- [x] design_capacity
- [x] power_supply_technology
- [x] location
- [x] serial_number

# Initial values for battery states msg:

- [x] std_msgs/Header header -> no set
string frame_id -> joint name
- [x] float32 voltage -> kUninitializedValue
- [x] float32 temperature -> kUninitializedValue
- [x] float32 current -> kUninitializedValue
- [x] float32 charge -> kUninitializedValue
- [x] float32 capacity -> param value
- [x] float32 design_capacity -> param value
- [x] float32 percentage -> kUninitializedValue
- [x] uint8 power_supply_status -> unknown enum
- [x] uint8 power_supply_health -> unknown enum
- [x] uint8 power_supply_technology -> param value
- [x] bool present -> true bc voltage always exists.
- [x] float32\[\] cell_voltage -> empty
- [x] float32\[\] cell_temperature -> empty
- [x] string location -> param value
- [x] string serial_number -> param value

# Initial Values for battery state msg:

- [x] std_msgs/Header header -> no set
string frame_id -> empty
- [x] float32 voltage -> kUninitializedValue
- [x] float32 temperature -> kUninitializedValue
- [x] float32 current -> kUninitializedValue
- [x] float32 charge -> kUninitializedValue
- [x] float32 capacity -> sum of all capacities
- [x] float32 design_capacity -> sum of all design capacities
- [x] float32 percentage -> kUninitializedValue
- [x] uint8 power_supply_status -> unknown enum
- [x] uint8 power_supply_health -> unknown enum
- [x] uint8 power_supply_technology -> if they all same, then this value. otherwise unknown
- [x] bool present -> true
- [x] float32\[\] cell_voltage -> empty
- [x] float32\[\] cell_temperature -> empty
- [x] string location -> append all
- [x] string serial_number -> append all

# Update values for individual battery states

- [x] std_msgs/Header header -> current time
- [x] float32 voltage -> always enabeled
- [x] float32 temperature -> if interface enabeled
- [x] float32 current -> if interface enabeled
- [x] float32 charge -> if interface enabeled
- [x] float32 percentage
- [x] if interface enabeled: read
- [x] else: if voltage & min & max volt not nan, calculate
- [x] uint8 power_supply_status -> if interface enabeled
- [x] uint8 power_supply_health -> if interface enabeled
- [x] bool present -> if interface enabeled otherwise according to joint's voltage value.

# Update values for battery state:

- [x] std_msgs/Header header -> current time
- [x] float32 voltage -> average all
- [x] float32 temperature -> average all if cnt>0
- [x] float32 current -> average all if cnt>0
- [x] float32 charge -> sum
- [x] float32 percentage -> average all if cnt>0
- [x] uint8 power_supply_status -> highest number
- [x] uint8 power_supply_health -> highest number

Contributor guide

No contributing guide indexed for this repository

Research direction

The issue defines parameter decisions and initial and update values for individual and aggregate battery state messages, but names no files, tests, or entry points. Start by locating the battery state broadcaster implementation and its tests, then compare the current behavior with the checked requirements; done means the listed parameter handling and message values are implemented and verified.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
robotics
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.