Welcome to Synthiam!

Program robots using technologies created from industry experts. ARC is our free-to-use robot programming software that makes features like vision recognition, navigation and artificial intelligence easy.

Get Started
Asked — Edited

Joystick/Movement Panel Question

So I am puzzled... I have my Movement Panel working and it works fine using arrow keys ... But when I use the joystick I can see the GU lighting up in corespondece with joystick movent and the Movement Panel GU even lights up same as if I was using the arrow keys... Only difference is nothing happens with robot.. but again if I put joystick down and hit arrow keys the bot will move. ?
Note: that sometimes within same instance periodically I will get movement from bot with joystick but that is only temp.. What puzzles me the most is I could see trouble shooting it if when the joystick is used nothing happens on the GU... But everything is lighting up

AI Support Bot
Related Content
Synthiam
Based on your post activity, we found some content that may be interesting to you. Explore these other tutorials and community conversations.
#7  
Not sure if this is relevant to your situation, but I had basically the same issue with my Lynxmotion Joystick... It has a analog button on the joystick... The joystick would only drive the Movement Panel if I pressed the analog button...
#8  
So i am at work and dont have my file... its on my thumb drive at home... but here is a video of the issue.

Rich I merged you ramp script to my R2 project .. and like I said it works as long as I hit the arrow keys..




#9  
Are you using a UART port in your project... I just tested my joystick again and it had nothing to do with the analog button being pressed or not.... In my Movement Panel when using forward it seems my bot would not go forward if I was using either UART send or receive calls at the same time (haven't determined which one might be causing the problem)... My program calls another script within forward movement command... This script is used to monitor sensors as the bot moved forward. Inside this script is a few uart read and writes... My joystick would only move my bot forward if I removed the call to run the sensor script... However, using the keyboard and directly clicking the Movement Panel everything worked perfectly....
PRO
Synthiam
#10  
Can you share your project?
#11  
I cant share it at the moment since I am not home and it is not in the cloud ( i know bad me.. I will not let that happen again)

But the code that is running in relation to that stuff is Rich's sabertooth ramp code and the joystick panel in ARC. ( I know that really does not help but it is all I can say right now *tired* ) I will upload my project when I get home however:)
United Kingdom
#12  
Which parts of my speed ramping project did you merge in to the project? And have you changed anything?

In my project I added two graphs (so I could test it without the sabertooth), do these show the speed values changing when using the joystick? (Sorry, I can't view the video right now).

I think we will need to check the project out so if you can, when you get home post the project and we will have a look and figure it out.
#13  
one last thing I did note if it is of any issue.. is that sometimes I have to double tap the arrow key on Movement Panel to get it to engage correctly... otherwise at times it will not engage the other motor...just one motor will move forward for example.
United Kingdom
#14  
@RichardR, is there any kind of initiation for the sabertooth to make it work as it should? I kind of recall you mentioning something needed to be done first before something else would work as it should but it's so vague I have no idea what it was, or even if it was real or a dream!:)
#15  
@DJ is $speed a reserved variable used with the joystick control? Because I used it for something else with other scripts in the same project... Could be what was causing my issues... When I have time later today I will change my $speed variable to another name and see if that makes any difference...
PRO
Synthiam
#16  
$speed is not a reserved variable
#17  
@Rich... Sort of... When I first power on the sabertooth I send it an initial stop command SendSerial(D0,38400,0)... If I don't do this then any other movement command initially doesn't respond correctly... In other words if I ask the bot to move forward, usually only one motor responds until I issue another command... After that it performs as expected....
#18  
Ok, looks like my issues were caused by my wireless Joystick... I plugged in my old wired one and everything works fine now....
@Jayutmb ... sorry about that man... Didn't mean to shift the focus off of your issues... I thought I had the same issue as you...
#19  
11815fullr2withramp.EZB


ok guys here is my current project that i am talking about (dont laugh it is far from done lol)
I was going to upload it after work yesterday... but I got pulled (not hard to convince me however) to happy hour... that turned into a few hours.. lol!

Anyhow here is project :)
And thanks again for helping this noob out:)
United Kingdom
#20  
I'll take a look in a sec.

Just to make it easier, what ports are you using for what? The port details hasn't been filled out on the project so rather than guess it all it would be easier if you could let us know.
#21  
ahh yes I guess that would be useful:)

d3 sabertooth to the two feet motors
d2 is syren for dome motor
d1 and d0 are servos for the robot utility arms
United Kingdom
#22  
It should be working. I just checked it out and, although I have no sabertooth to test it with, it should work fine. All commands are being sent as they should be, all variables are being adjusted as required by the scripts and the joystick is setting the direction and therefore triggering the ramping scripts with the desired speeds.

Is there any reason why it's on D3? The ramping script is proven to work on D7 as that's what Gwen was using it on. If you can use D7 it's simply a case of importing the joystick control, movement scripts control and the custom Movement Panel (no need to merge the test script or the graphs).

Or possibly change it around and start with the Sabertooth Ramping project and import your other controls in to that one by one. Try the Sabertooth Ramping project in it's vanilla state, make sure that works as desired and then bring each of your own controls in one at a time, testing afterwards to check it still works. This will pinpoint the problem control.
#23  
ok i will give that a try:)
but you can see how it is strange right ?
#24  
I just tested your project with a bot I have a sabertooth in... It works with my wired Joystick... I had to change some values for forward, reverse, left and right as my sabertooth is no doubt wired differently than yours, but my joystick works great with all four Movement Panel directions...

I am curious why in the left and right script of the Movement Panel you have only one motor set to move... The other motor you have issued a stop command for... Were you wanting a "swing turn" instead of a "pivot turn"?

@Rich, by the way your ramping script works perfectly dude...:)
#25  
@Rich, your ramping script should work on any port... I am running my sabertooth with @Jayutmb's project on port D23
#26  
@Richard R I see that my sloppy layout has not gone unnoticed LOL! that is for the Dome of the R2 unit, that is a syren 10 motor card running the one motor that controls the domes "spin" I have not gotten around to cleaning the dome stuff up until i fix this control issue ( and no sadly I have not had a chance to try any of yall's great ideas yet to fix it sadly)