Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   C/C++ (http://www.chiefdelphi.com/forums/forumdisplay.php?f=183)
-   -   More motors cause joystick to get slow (http://www.chiefdelphi.com/forums/showthread.php?t=103257)

Batman 19-02-2012 02:29

More motors cause joystick to get slow
 
When we try to create more than 5 motor objects (RobotDrive, Jaguar, Victor using C++), our joystick starts responding very slowly so the ArcadeDrive doesn't move the robot until a half second or more after the joystick is moved. This is only our second year, so we could easily be doing things wrong, but we can't find a problem like this mentioned anywhere else. We've tried increasing the Wait time in our main and task loops to 20 and 50 ms but that hasn't helped much. We've seen teams talk about using 10 or more drives, so it seems like we shouldn't be having these problems.

Any help with be greatly appreciated!

Garten Haeska 19-02-2012 02:34

Re: More motors cause joystick to get slow
 
Are your motors too close to you radio? Are you tethered or wireless? Does it still lag when tethered?

Batman 19-02-2012 02:38

Re: More motors cause joystick to get slow
 
Yes it was still lagging while we were tethered, and no our motors aren't too close to the radio

DjScribbles 19-02-2012 13:49

Re: More motors cause joystick to get slow
 
Are you using any Wait()s in your code? as any time you spend waiting is time that you aren't reading your inputs and updating your outputs.

Also, if you have image processing running continuously that can cause alot of processing to take place which needs to finish when before you process inputs and outputs again.

Batman 19-02-2012 18:30

Re: More motors cause joystick to get slow
 
Were not using the axis camera or image processing at all. We are going to check the wait statements, but I don't think that's the problem.

Does it cause a problem creating a new Jaguar or Victor object for a motor that is not yet connected to the robot?

DjScribbles 20-02-2012 09:01

Re: More motors cause joystick to get slow
 
It shouldn't add any more load than actually having that Jaguar present, unless perhaps you use CAN to connect your Jaguars (but I don't know much about CAN); but the standard case is using PWMs to drive the motor, which is not a bidirectional communication, so it has no way to know if you have the Jag present or not.


All times are GMT -5. The time now is 13:32.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi