Legohead259 / OlympianESC-Firmware

Firmware for a novel Micro-ROS based electronic speed controller (ESC)
MIT License
0 stars 0 forks source link

[Bug Report] : `SetMotorDirection` service does not change motor direction when going from CW to CCW #3

Closed Legohead259 closed 7 months ago

Legohead259 commented 7 months ago

Describe the bug When the motor is spinning clockwise and is commanded to start going counter-clockwise from the SetMotorDirection service, it maintains the same speed and direction of rotation. This bug is not present when commanded to go from CCW to CW however.

To Reproduce Steps to reproduce the behavior:

  1. Change to controller mode to Velocity (open loop) using the SetControllerMode service. Note mode=7.
  2. Set the target velocity to >0 rad/sec with the SetTarget service
  3. Use the SetMotorDirection to change the rotation to CW (direction=true)
  4. Try to change the rotation direction to CCW with the SetMotorDirection service (direction=false)

Expected behavior When the SetMotorDirection service is called with the value of direction=false, the motor is expected to switch rotation from CW to CCW

Legohead259 commented 7 months ago

Could be a logic issue within the SetMotorDirection callback. The target sign could not be getting set correctly

Legohead259 commented 7 months ago

Irrelevant #19