Move function not working under certain conditions #2292
Unanswered
DilithiumHydroxide
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
This might be a bit convoluted so bear with me. I have 4 2 axis robots moving on a grid - so X and Y in both directions at any point. To move said bots, I have a function, move().
Using it looks like this:
Each of the coordinate pairs corresponds to one of the four robots, and depending on what the ID is set to (line at the top of the script), it will move the robot to the first pair, etc.
This works fine in most conditions, but for whatever reason, when the robot is at either 50, 0 or 50, 10 and I try to move it to 50, 10 or 50, 0, the robot moves at around at 1/4 the speed it should be moving, and for no apparent reason (even when I explicitly set the speed to 100). Is there anything that could be causing this?
Note: this code is not mine, so there may just be something I'm not understanding. If anything else is needed for clarification, please let me know!
(thanks dlech for editing the code so it doesn't look goofy - I'm new to GitHub lol)
EDIT: Strangely, it only happens when the robot ID is 1 - swapping between 50,10 and 50,0 for the 2nd set of coordinates has no issue
EDIT 2: Tested the EXACT same set of movement commands before the robot tries the 50,10 and 50,0 swaps, and on multiple robots. No matter the hardware, when the coordinates are in slot 1, it moves slower.
EDIT 3: the entire script is here at cfg_05 https://github.com/akiyuki-k/OmniDirectionalVehicle
Beta Was this translation helpful? Give feedback.
All reactions