mirror of
https://github.com/odriverobotics/ODrive.git
synced 2026-02-06 07:01:52 +08:00
Reset trajectory_done_ during homing to fix #634
This commit is contained in:
@@ -3,6 +3,7 @@ Please add a note of your changes below this heading if you make a Pull Request.
|
||||
|
||||
* CANSimple messages which previously required the rtr bit to be set will now also respond if DLC = 0
|
||||
* Ensure endstops update before being checked for errors, to prevent [#625](https://github.com/odriverobotics/ODrive/issues/625)
|
||||
* Reset trajectory_done_ during homing to ensure a new trajectory is actually computed [#634](https://github.com/odriverobotics/ODrive/issues/634)
|
||||
|
||||
# Releases
|
||||
## [0.5.4] - 2021-10-12
|
||||
|
||||
@@ -421,6 +421,10 @@ bool Axis::run_homing() {
|
||||
controller_.pos_setpoint_ = pos_estimate_local.value();
|
||||
controller_.vel_setpoint_ = 0.0f;
|
||||
controller_.input_pos_updated();
|
||||
|
||||
// Synchronization issue. Ensure trajectory_done is false prior to the while loop, so that
|
||||
// the controller has time to run move_to_pos() on the next update()
|
||||
controller_.trajectory_done_ = false;
|
||||
|
||||
while ((requested_state_ == AXIS_STATE_UNDEFINED) && motor_.is_armed_ && !(done = controller_.trajectory_done_)) {
|
||||
osDelay(1);
|
||||
|
||||
Reference in New Issue
Block a user