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

[Simulation] add ESC_Telemetry #620

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

Li-Jinjie
Copy link
Contributor

@Li-Jinjie Li-Jinjie commented Jul 31, 2024

What is this

Our real-world system has (partly, mainly beetle) supported ESC telemetry, but the simulation does not support. Thus, this PR adds a publisher and two msgs to pub the ESC data.

Details

Add a "krpm_rate" to yaml config with (kRPM)^2/N unit.

I find the original equation for rotor speed is "force_ * speed_rate_", which is incorrect, since the thrust is proportional to the square of the motor speed. However, when I change it to the correct equation, the robot may diverge in simulation and I don't know why.

Hence, I add an additional topic to convert the thrust directly to RPM.

TODO

  • Currently, ESC Telemetry msg is unable to contain any number of motors. Need to change this msg in the future.
  • The ESC Telemetry contains: temperature, voltage, current, consumption, rpm, and crc_error, which might be too many and require too much communication bandwidth. In the future, we may only need rpm for high-frequency bidirectional dshot.
  • The measure data from ESC is actually eRPM: (number of poles /2 * RPMs) = eRPM. The number of poles (magnets) is related to the specific motor type and should be configured in yaml config.

Li-Jinjie and others added 3 commits July 31, 2024 12:56
@Li-Jinjie Li-Jinjie changed the title [PR] [Simulation] add ESC_Telemetry [Simulation] add ESC_Telemetry Jul 31, 2024
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

Successfully merging this pull request may close these issues.

1 participant