Replies: 3 comments 9 replies
-
|
Is the robot perhaps quite heavy, or has the weight primarily off center? It sounds like the robot is not always able to complete the move near the end. If you have a spare robot, perhaps you can test the same code on the standard small drive base to confirm. There are ways to increase the power levels for heavy robots and add a bit more flexibility in completing moves. This comes up every once in a while, so we should probably add a tutorial. |
Beta Was this translation helpful? Give feedback.
-
|
Here should be enough of the code. When we want to execute the first run we call "Run 1", aka Run_1. The first thing each run does is call "Back Against Wall". That moves backwards 10 mm at a speed of 50. It will wait 200ms as a safe guard against the backing up never completing. Run 1 then moves 340 mm. But, when we run into the situation I described, it doesn't do that move, instead it rotates left about 30 degrees and stops, async def Run_1():
global Program_Running
await wait(1)
await _2('Change shipping lanes, release quadropus, and raise crusty crab')
Program_Running = True
await Back_Against_Wall()
await Drive_Base.straight(340, Stop.BRAKE)
async def Back_Against_Wall():
await wait(1)
Drive_Base.settings(straight_speed=50)
await multitask(Drive_Base.straight(-10, Stop.BRAKE), wait(200), race=True)
await Reset_Speed() |
Beta Was this translation helpful? Give feedback.
-
|
We borrowed a hub from a team that hadn't moved on to the next competition. They were a brand new team, brand new coaches. We substituted their hub onto our robot which was having issues, because we assumed it was an issue with the hub. Tried our first run, and it failed. Must be the left motor. It is stopping spinning, causing the robot to turn abruptly to the left. Not a hub problem and certainly not a PyBricks problem. Is there a way in PyBricks to detect a problem like this? Haven't looked into the documentation, is there one that goes over tracking down issues like this? I had talked my co-coach into trying PyBricks instead of the spike prime development environment. I've really like it. Seems more accurate than spike prime, and like not needing a my block for acceleration, it is built in. We didn't look at the underlying Python code much, maybe next year we'll do that. Thanks for all the help. |
Beta Was this translation helpful? Give feedback.

Uh oh!
There was an error while loading. Please reload this page.
-
We are using Spike Prime and Pybricks for FLL and we periodically have the robot stop right after starting a run. For example, one of the runs starts with the robot going straight a couple hundred mm. This works fine most of the time, but sometimes, instead of going straight the robot goes slow a few mm, turns to the left, and just stops. But it hasn’t really stopped. If we pick it up and rotate it in or hands to the left or right, the the wheels start spinning. We have several runs and this behavior happens randomly in other runs. One of the runs the robot is supposed to go straight, then turn about 45 degrees to the right. Instead it does the same failure, it goes a short distance, turns left and stops. And again, it we lift the robot and turn it, the wheels spin. As if it was waiting for a turn.
Could there be a memory leak, or memory corruption?
Any suggestions on what to try?
Beta Was this translation helpful? Give feedback.
All reactions