Delay on robot's controller

Hello everyone.
Could you please help me to solve this issue?
We are testing since February and the robot never failed like this time. Today the driver reports me the robot is presenting a huge delay when trying to turn left. Considering that the joystick is okay, do you belive this a programming issue?
The robot code now has the arcadeDrive function and I’m just thinking if the arcadeDrive is not precise enough to accomplish with drivers needs.

Our robot is using RobotPy for base code.

My best regards

In the future, recommend you post in the Programming/Python forum.

It is likely that this is a programming issue, but without looking at your code it’s hard to speculate what the issue might be. Are there error messages in netconsole? Is your code posted online on github, or can you post the relevant snippets here? Does it exhibit the same behavior in simulation?

1 Like

Thanks for the tip! I changed the category of the post.

Our team has a repository on GitHub. The main branch is the code on the robot.

In the simulation, there are no problems with the control axes.

No errors appear

I’m thinking change arcadeDrive to tankDrive, because it appears to have more precision in the controls.

The code looks pretty straightforward to me, so it seems unlikely to be the issue. Two suggestions for diagnosing this:

  • Disable cameraserver and see if the issue goes away? Always worth a shot.
  • Have you checked that all the wheels are spinning the correct direction when the joystick is moved?
    • Furthermore, you might try putting the robot on blocks so that the wheels can spin freely, and then move the joystick around. Does the problem still happen? If it doesn’t, it might be a broken motor controller and/or mechanical issue.
1 Like

So…
In the last few days, I tested these possibilities, and don’t work. I disabled cameraserver from the main robot code. The motor controllers are blinking normally and even isolating the motors to make them free, there was no problem with the delay.
I looked at the wheels and couldn’t find any errors.
The mechanisms are the same of 2020 season, and if we had made the mechanisms this year from the beginning, maybe it could be this problem, but as this problem in control started last week and we stopped working on the mechanics of the robot before the date of the detection of the problem, I believe it is another one related to the programming and not joystick, because in the dashboard, the joystick axis changes without any problem.
I decided to increase the speed of the arcade drive’s z rotation by 20% to see if it improved, and despite fixing the problem with small curves, there is still a problem with large curves.
Is there any way to improve the axes programmatically? Through the same arcadeDrive, since our driver is used to this drive.

Just making sure I understand correctly: the issue does not occur when the motors are spinning free?

If that’s the case, it seems likely that it’s a mechanical issue. Potentially your motors are stalling because there’s too much friction?

I know my team always makes the center wheels dropped a little bit so that the motors aren’t fighting the friction against the ground. You can use the Driver Station Log viewer to look at the Amps that your motor controllers are drawing. If the Amps for the motors spike excessively when you try to turn, that’s probably what the issue is.

1 Like

Not sure I understand what you are experiencing but if it is mechanical put the robot up on blocks and let the wheels spin freely and see if you notice anything mechanically wrong… perhaps rubbing… perhaps dual motors and one is inverted or not following? I like to have the team put the drive system through its initial paces this was to not damage things!

If it is lag between the controls and the drive station we have noticed that shuffleboard on the drive station can be a culprit if it has been open for a long time. Try closing it and see if the problem persists.

Just a few suggestions! Good luck!

2 Likes

@megarubber another test you can do is try driving it on carpet and on tile/wood/cement. If I’m right about the mechanical issue, it will likely turn much easier (or perhaps as expected) on the tile/wood/cement, but exhibit the issue you’re having on carpet.

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.