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

Discrepancy in battery current sign between gz and ROS 2 for discharging state #2685

Open
Tacha-S opened this issue Nov 20, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@Tacha-S
Copy link

Tacha-S commented Nov 20, 2024

Environment

  • OS Version: Ubuntu 24.04
  • binary build version: 8.6.0

When using a ROS 2 bridge to convert battery state from gz to sensor_msgs/BatteryState in ROS 2,
sensor_msgs/BatteryState expects the current to have a negative value during discharge.
However, the gz-sim-linearbatteryplugin-system plugin does not behave this way.
Is it correct for the current in the gz message to remain positive even during discharge?

Description

  • Expected behavior:

current value is negative value.

  • Actual behavior:

current value is positive value.

Steps to reproduce

Output

header:
  stamp:
    sec: 47
    nanosec: 885000000
  frame_id: ''
voltage: 22.915739059448242
temperature: 0.0
current: 21.886171340942383
charge: 1.7268285751342773
capacity: 2.0
design_capacity: .nan
percentage: 86.3414306640625
power_supply_status: 2
power_supply_health: 0
power_supply_technology: 0
present: true
cell_voltage: []
cell_temperature: []
location: ''
serial_number: '
@Tacha-S Tacha-S added the bug Something isn't working label Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Inbox
Development

No branches or pull requests

1 participant