
Ellis

I appreciate any help in understanding what I am doing wrong. I have a modified servo panel and a logitech joystick control installed. I have the wheels on d0 and d1. I have two servos with one on d3 and d4. The wheels are running correctly on the joystick but the two servos are running totoally intermittent on the second stick on the joystick controller. I have tried to program joystick 2 and 3 and actually both at the same time. I am all over the place. Sometimes the X servo works sometimes the Y servo works. Sometimes neither and sometimes both work. I am at a loss at what I am doing wrong. Can anyone help.
Also when I got them both running one time using joystic 2 and 3. I tried to first locate the servos with the Servo(d2, 50) and Servo(d3, 50) and then slow them down with ServoSpeed(d2, 25) and ServoSpeed(d3, 25). I put this script in the initiation File. It slowed down the servos to a crawl and they wouldn't work until I used the joystick. They also did not seem to want to find position I requested. I know this is something I am doing but to the life of me I cannot figure it out according to the ARC manual or the EZ-Script manual. Do I need to add ControlCommand script? Any advice you can give would be greatly appreciated. Thanks Ellis
Oh.. regrading proportional movement on stick 2, or at least speed control, I'll look into that tomorrow as well. My Roli battery just died, and by the time it is charged I will need to be going out on some errands, and have plans with friends tonight, so won't have any more time to look at this today.
Alan
@Alan... my Lynxmotion PS2 controller works for both pan and tilt off the right stick... However, I had to switch it to analog to get it to do that... Also, as mentioned it's not proportional ... I get a "light" switch type servo movement....
Alan
What you are getting is exactly what I am getting. If I set up both 3 and three I get both X and Y to work but I don't think that it is working as designed. Also when I try to set the speed it is not proportional as Richard stated. Scripting servo speeds with ServoSpeed Script in initiation file seems to work but very jerky and non proportional.
Rich, As far as setting the joystick two to analog, do you know how is that done on a Windows G710 Logitech game controller. I would like to have the 2 joystick work correctly.
Thanks again for all the help. It seems looking at yours and my results it is a controller programming problem. I will also keep trying to find the answer.
Ellis
Sorry, I have a windows F710 game controller not a G710. I guess the F710 is a keyboard.
OK, we are using the same controller, and I have had some success tonight.
If you switch from Xinput to DirectInput (the little slider switch on the front from X to D), and install the Logitech drivers, Joystick 2 works like it should and drives both servos. Also, the LT and RT buttons become visible to ARC, where they were not (just drove the X-Axis) in Xinput mode.
As far as having slower/better control of the servos, either in your initialization script or in a separate script you run before using the joystick, set the servo speeds to 1 or higher (0 is fastest, and is too twitchy for joystick control. My pan and tilt is working well with it set to 1). You don't get proportional speed, but do get proportional position (the further you push the stick the further the servo moves, which I think in a pan and tilt is what you would be looking for).
Keep in mind that a servo needs to receive a position command at least once before ServoSpeed() script command will work, so you should have your initialization script set the position of the pan/tilt servos to 90, then set the speed, then the joystick should work.
There is one glitch I have found in DirectInput mode though. Randomly, the debug window throws an error "Already Running Joystick" repeated about 6 times, and when the error is being written the movement is a little jerky. Seems totally random when it hits. I thought I had it reproducing just on going left with the x axis, and then it stopped doing it and hasn't repeated for about 10 minutes.
Tomorrow I'll look into proportional speed on modified servos. I am suspecting we'll need some scripting there, but maybe the DirectInput mode will fix that too.
Alan
DirectInput mode did not add proportional speed for the modified servo movement panel. I started to experiment with having Joystick 1 drive the servos directly instead of a movement panel. Problem there is that the center position of my servos is 89, not 90, so in the stop position, the bot turns very slowly rather than stopping completely, but I was having some success with proportional control before the batteries dies, but I think I am going to need to go with a custom Movement Panel and scripting.
I am now waiting for the boxbot batteries to charge. I thought I had a charged set, but I was mistaken, so it will be several hours before I can continue, so I may not get to it today.
I think I can begin to work with the system now. I set up joystick2 and joystick3 with one for x and one for y. They now both work. I do not get it. It just does. I am going to use that until it doesn't work for some reason.
thetechguru did over the top help on this. I really appreciate the help.