Asked — Edited
Resolved Resolved by Dave Schulpius!

Kangaroo / Sabertooth Help

0I have been working on this for 4 days in this cave.

This question is for anyone that uses:

EZBv4 Kangaroo & Sabertooth (2x25) combo Uart0 2 DC motors w/Encoders Sabertooth Kangaroo plugin (selected Uart0 & 9600 baud - same as in Describe)

If you could share your S & K dip switches with me?

I can get a good tune from what I can see in the DeScribe software. BUT When using the plugin and clicking on the arrows, they highlight but nothing happens? Writing a small script to move the motors forward nothing happens either?

Please, I need to see the light of day!


Related Hardware EZ-B v4

ARC Pro

Upgrade to ARC Pro

Unleash your creativity with the power of easy robot programming using Synthiam ARC Pro

PRO
Synthiam
#1   — Edited

Maybe you didn't select the correct EZB UART port in the robot skill settings?

I recommend getting it to work without the kangaroo so you can familiarize yourself with the setup. Start small and move up.

#2   — Edited

Funny, just getting ready to call it a night and remembered I didn't mention I selected Uart0 & 9600 baud, same selected in Describe. Edited it in post.

I did have the Sabertooth working on a older robot, bought a Kangaroo to work with new motors with encoders.

#3   — Edited

Hi Herr Ball! Good to see ya.

I'm currently upgrading my robot and have been working with several ST/Roo's in the process. These things can be quite temperamental. It's good that you have gotten a successful tune. Once that is done you're almost there.

If you got a successful tune then you have your dip switches set on the Sabertooth properly. However it's a good idea to double check. When adding a Kangaroo your Sabertooth dips should be set to: Dips 1&2: OFF Dips 3-6: ON

The dips on the Roo would be set to how you are going to use it.

I have several with some using pots for feedback and other using encoders. They all are used in independent mode to control two different motors and used for position and speed.

With that said, the the 4 dips on the Roo's I use with an encoder are set to ON.

Here's a snip from the Kangaroo manual showing the dip settings:

User-inserted image

I have not used the Sabertooth Kangaroo plugin so I do not know how it works to set up the system to be ready to accept commands. I have always written EZ Scripts to make my independent motors move to certain positions at different speeds. When not using the Sabertooth Kangaroo plugin here are a few things I have to do to start a successful move with a script (Please forgive if you already know this stuff): *Make sure the proper EZB is being called in the script (I use several in one robot) *Make sure the Proper Uart port is being called in the script (The EZB had 3 of them numbered 0, & 2) *Make sure the Uart port on the EZB you are connected to and using has been initialized with the proper port and Baud rate using the proper Command. In EZ Script is looks like this: UARTInit(0, 0, 9600 ). This is very important because if the port is not initialized the EZB will lock up. You only have to do this once. From then on the UART port will be ready. I do this in my INT script when I first start up ARC.

UARTInit( boardIndex, port, baudRate )
         Initialize the Peripheral UART on the EZ-B v4 with the specified baud rate. The UART will stay initialized until the EZ-B v4 is power cycled, and therefore this command only needs to be called once.
         The Board Index is the EZ-B index starting at 0.
         The port can be 0, 1 or 2.
         The baud rate can be between 1 and 3750000 bps. The UART receive buffers on the EZ-B v4 are 5,000 bytes.
         Look near at the UART Port section lower in this document for the EZ-B Pin’s associated with each UART Port.

*Make sure the proper Channel(s) on the Roo that your motor is attached to is started. The roo will not accept any commands until the channel(s) you want to use is started. You only have to do this once. From then on every properly formatted command will be accepted. I do this in my INT script when I first start up ARC. *Make sure the command line going through the UART port is properly written and has a "Return" at the end. I think the EZB may lock up and need to be rebooted if you send a bad command through the UART.  *At start up, make sure you have the your system home to the type of stop you had during your successful tune (limit switch, physical stop or a taught stopping point) or it will not accept commands. This only needs to be done once at system start up.

If you have everything in your system connected and set up like it was when you did your successful tune, then when you first start up the ST/Roo the led will not be lit on the ROO. After you start up the UART and then send the command to start your Roo Channel(s) you will see one quick flash of the LED on the Roo and then the LED will stay on and with a low and slow pulsing light. Each time you successfully send a command to the Roo, it's LED will flash once.

Watch the Roo's LED during and after you start the system and send commands. If there is an error at any stage it will start repeatedly blinking an error code.These codes are kind of cryptic but they will give you an idea of what is or isn't happening. 

User-inserted image

I hope this helps. I'll post a couple examples of my script asap.

#4  

OH, I forgot one very important step. Your system needs to home to some type of stop (limit switch, physical stop or a taught stopping point) at start up or it will not accept commands. This only needs to be done once at system start up.

I'll edit my above post with this info.

#5   — Edited

Here are the commands needed to get the system ready to accept a position and speed command. Change numbers to reflect your system, These only have to be sent once per session. I've listed different EZB's, UART Ports and Roo Channels for this example:  UARTInit(0, 0, 9600 )  #Turn on EZB 0, Uart #0 port uartWrite(0, 0, "1, start", 0x0d)  #EZB 0, Uart #0 port, Start Kangaroo channel 1. Notice the Return key at end of command, 0x0d uartWrite(2, 2, "1, Home", 0x0d)  #EZB 2, Uart #2 port, Home motor attached to Roo channel 1

Now you can send the position and speed command: uartWrite(2, 2, "2, p0 s400", 0x0d) #EZB 2, Uart #2 port, Motor on Roo Channel 2 move to Position 0 at a speed of 400

Notice the Return key at end of the Kangaroo command, 0x0d. All commands sent to the Kangaroo through the EZB UART port needs a Return.

As a last recommendation, Make sure your Describe software and the Kangaroo's firmware are up to date.

#6  

Ah, one more suggestion. You mentioned you used the Describe software to set up your roo. The program has a very nice Live Test feature. You can use this feature to test your roo and how your setting interact with your motors. I'd highly recommend trying this just to make sure your system motors are responding properly. Once you confirm this (and make any needed adjustments) you have ruled out the roo/ST rig. All that is left to check is your ARC commands and wiring.

I didn't mention checking your wiring and connections before. This simple thing has really messed me up in the past. A broken wire, bad connection or something plugged in wrong really makes things look broken.

Sorry for all the long posts. I hope this helps somehow.

#7  

Wow Dave, you certainly gave me a lot to work with. I'm grateful for your input and will give it a close going over. I will report back soon.

Thanks Again!

PRO
Synthiam
#8   — Edited

Dave is the kangaroo sabertooth man! That does sound like a superhero name. Or, maybe the villain:D

User-inserted image

#9  

Lol, DJ. Ya, just call me Snidley Wiplash. Or maybe even Dudley Doright of the Royal Canadian Mounties.

#10  

Dave!!!

To bad you were not here to watch me do my Happy Dance! You did it brother, without your help I would have NEVER gotten this thing to work. Days and days were spent working on this only to be disappointed each time. You know what I mean ... lol. First off what I thought was a good tune, well, wasn't! Some of the encoder wiring was wrong. A stupid mistake on my part . Since the motors were bolted down I didn't see my mistake until starting everything over, a fresh start. You would think that in the Describe software if it seen the encoder ticks the wiring would be ok? Finally a good tune! Now I know what it should be like. The Describe program is and excellent piece of software, ToyMaker stated, the developer was a genius. Only trouble, too much to take in. I continued to try different things but STILL no love. You know how it is, changing this , changing that, after awhile who knows what you did ... lol. Just couldn't get everything to work with the Kangaroo/Sabertooth skill. After trying your program I left it alone and just focused on the K/S skill. That's where I went wrong! Some how changing this and that everything was in it's proper place. Tried the K/S skill but nothing. Tried your program and BAM, it started working! Tried the K/S skill and it worked now. Wait, wait, what? I was afraid to touch anything as it might break again! lol Powered everything down and tried again. The skill did not work but your program did. Found out that the skill would ONLY work after running yours. Tested this 4 times same out come. You mentioned that nothing would work until "start" and "home" is set. I believe that's the case here why the skill does not work (for me anyway). Would like to know how the skill works right off the bat for others? I don't usually give up on problems, in fact I always see it as a challenge. This one was a tough one.

Dave, thank you again my friend. You are a true asset to this forum!

#11   — Edited

Hey thanks brother! I appreacheate the credit. I'm so happy you were able to figure it all out and to get your system working.

The Kangaroo/Sabertooth is a wonderful solution if a person can stick with it. However, once it's working the way you want, it is rock solid with a lot of safety features built in.

I found everything has to be built and wired properly before it will even start working. I don't know why your Roo was able to finish a tune with your wiring messed up on the encoder. My guess is that it has something to do with the wiring being backwards. In the Discribe software there's a check box (under the Control tab). This tells the software that your system is wired in reverse. If it sees that you have your system wired in reverse during a tune that box will be automatically checked.

The other thing is in the Limit Switch section and Homing side selection in Discribe. You can change the direction that the motor moves by selecting "Inverted". However, if the Non-Homing side selection (Under the Position Tab) is set to the wrong limit switch relative of the Inverted motor setting the system will never move. This is because the Sabertooth only sends DC power in one direction at a time relative to how the Non-Homing side selection is set. I think. LOL. I know it's a lot to take in. I'll give you an example of a problem much like yours that I was having:

You're familiar with my B9 robot I think. I have a Kangaroo/Sabertooth controlling the two (car power window) motors that move the arms in and out of the robot's torso. Like I explained in an earlier post, I need to Start the roo channels first and then Home these motors before I can command them to move. Now, remember, the parked and resting position of my arms are all the way in and parked inside of the torso when the robot powers down and also after any arm animation move (just like the Hero Robot on TV's Lost In Space). After I got a successful tune, Roo had set these motors to move out of the torso to find it's first Homing limit switch at start up. Everything worked nice and I could command the moves. However I didn't want the arms to move out of the torso to find the homing side limit switch at robot start up. I wanted to keep the arms inside the torso at start up and home backwards into the torso. So, in the Discribe software I set both Roo channels to Inverted (in the Control/Advanced tab) so the system would run opposite of how it was tuned. After restarting nothing worked!! I think this was because it was now trying to home in the direction I wanted (back into the torso) but the DC power was still running the other direction?? Once I changed the Non-Homing side limit switch to L2 (Under the Position Tab. You have two choices, L1 and L2) the system homed in the direction I wanted and I had proper control.

It was hard to wrap my head around all that I had to do to get my system to work the way I wanted. Like you, I think it was a lot of trial and error along with some luck. I agree that this is a genius design but the documentation on all of the setting and what they do is limited and sometimes hard to understand. I think someone has to really understand how the Kangaroo fully works and how all the setting interact with each other to really take full advantage of all it can do. I contacted DE's Customer Support a few times asking questions about these issues I was having and how I could set the Roo up to overcome them. They were very quick to reply and tried to help but some of the advice I was given was completely wrong and didn't work. For example; the system will not move if it is shut down with the Non-Homing side limit switch depressed and is still in that position at start up. The system will however Home and move if the Homing side limit switch is depressed. I asked CS if there was a way to command the system to move the load off the Non-Homing side Limit Switch if it was depressed at system startup before homing. She said the roo will accept Simple Serial Incremental Position commands with the Non-Homing side Limit Switch depressed. I tried this and it would not move off the switch. So, my point is that there is so much here that even the experts that work with this little board don't know it all. LOL.

Sorry about the long post. Have fun now that your rig is running. BTW, what are you building?