Closed dominikheinz closed 5 years ago
Hi @dominikheinz ,
The typical solution to solve TRACKS_LOCKED
issues is to pass in a parameter of 0 for the track that was previously being controlled.
A few related forum posts follow: https://forums.anki.com/t/action-failed-due-to-tracks-locked/17367 https://forums.anki.com/t/action-failed-failure-reason-action-failed-due-to-tracks-locked/2543 https://forums.anki.com/t/animationtrigger-fails-due-to-tracks-locked-but-which-track-is-it/13674
Hopefully this helps. I'm closing this issue for now but please feel free to post again. Also, the forums are the best way to get help from the community and Anki as well.
Thank you!
Michelle
Hello,
I am currently working on a university project involving Cozmo. We are implementing lane-tracking/autonomous driving. Every time Cozmo's camera receives a new frame, different analyzing steps are made to decide where he should drive. When it is detected that he is about to face a cross road, he is supposed to drive straight for a given amount, then turn left. As long as there is no crossing, Cozmo is driving using the
robot.drive_wheel_motors
function, which works fine. Here is our code:Within the
process_frame
method the following code is executed:Where as
handle_crossing
is simply calling the following method:We are prompted with the following exception:
We are wondering why this happens, mainly because the example scripts
02_drive_and_turn.py
is doing pretty much the same thing. Isn't cozmo supposed to wait until thedrive_straight
routine finished executing before he is starting to do theturn_in_place
?Furthermore we are wondering if we are using the event system as it is supposed to be used? Are we missing something?
EDIT1: After further investigation (we logged all action & behavior events) we managed to find out that
turn_in_place
fails with the following failure reason:Action Stopped: <TurnInPlace state=action_failed angle=<Angle 1.57 radians (90.00 degrees)>, speed=None, accel=None, tolerance=None is_absolute=False failure_reason='Action failed due to tracks locked' failure_code=tracks_locked result=ActionResults.TRACKS_LOCKED>
This is really surprising because we are not performing any action on this track beforehand.