Welcome to Synthiam!

The easiest way to program the most powerful robots. Use technologies by leading industry experts. ARC is a free-to-use robot programming software that makes servo automation, computer vision, autonomous navigation, and artificial intelligence easy.

Get Started
Asked — Edited
Resolved Resolved by Rich!

Movement Scripting Help Please?≫

Can anyone help with scripting? I need to be able to have the speed of the G-Bot be ramped up and down rather than full on/off or there is a serious risk it will topple.
Right now I have the sabertooth control set up as in the attached photo. I have joystick 1 of the joystick control controlling it but I only get full on or off or full clockwise or counterclockwise rotation. Also, the joystick is 90 degrees off what I'd like( '3 o'clock' = forward, '9 o'clock' = reverse, '12 o'clock' = clockwise in place, '6 o'clock' = counterclockwise in place - but I can live with that for now if I have too).
I've been reading and watching tutorials and it seems like the movement scripting control is designed to do this but the input lines are different between the movement script control and the sabertooth control(stop, forward, reverse, left right versus 'left forward', 'right forward', 'left turn left', 'right turn left', 'left turn right', 'right turn right', 'left reverse', 'right reverse') and I have no idea how to write a script command to appropriately include a variable to do what I'm trying to do (OMG, that high school curse had come true! It comes down to algebra! doesn't it? Oh noooo!)
Can anyone take mercy on us and our Halloween plans and suggest some script to try and tell me which lines should go where?


Thank you, Gwen
User-inserted image


Upgrade to ARC Pro

Become a Synthiam ARC Pro subscriber to unleash the power of easy and powerful robot programming

AI Support Bot
Related Content
Based on your post activity, we found some content that may be interesting to you. Explore these other tutorials and community conversations.
United Kingdom
I need a sabertooth, there's much I don't know about it:)

So a relay which switches between straight through connection to the motors from the battery (for normal operation) and switches to the same but with diodes to only allow flow from sabertooth to battery to happen for when emergency shut off?

Quick and dirty schematic time:)

User-inserted image

When energised it works as normal. When power is cut it allows current flow in only one direction (i.e. regenerative)
I realise I have the relay backwards and I may even have the diode backwards, it's not meant as a proper schematic but an aid to my description above;) Honest...

P.S. Don't judge me on the schematic, I did say it was quick and dirty:)


I need a sabertooth, there's much I don't know about it

If you are short of discretionary cash, but are serious about wanting to get one, I have two thoughts for you.

1) The 2x12 is functionally identical to the 2x25 but costs about 1/3 less.

2) If you want either, and still have copious EZ-Robot credit, you could order me some EZ bits that I need and I'll order you a Sabertooth, so you get the Sabertooth as a thank you for answering so many questions, and I still get the bits I would be buying anyway.

United Kingdom
It's not so much the lack of funds, there are a few things holding me off (the main one being the sabertooth would mean I need decent motors, then encoders, then the kangaroo, then a robot to put it all in... it's a vicious cycle, kind of like drugs lol)

I also have a large pile of things I have been wanting to get through for a while now and it's getting bigger. BlinkM, TellyMate (all variants), LCD displays, I2C communication with other controllers, JD, Six, a bunch of EZ-Bits... I think I need to clear at least some of that pile before I add more to it:)

Thanks for the offers and advice as always though.
OMG, took him outside for the first time with him full built up... Nerve racking to say the least...

The bad new: He ended up off the driveway in a ditch tipping JUUUUSSSST shy of going over... wheww... The control is a bit unnatural due to the lag and the way the ramping seems to continue for a time after input stops. Add to that my driveway is uneven and mildly inclined plus, my notebook seemed to be working hard. There seemed to be a com delay too.

Note to self: Do not wear flip flops while experimenting with a 300 lb robot and NEVER get the front of one under a tread...

Note to self two: Get a wireless game controller and NEVER let the cord of the current one get under a tread... Very bad...

It was much better when I got him into our street which is level. One of my neighbors drove by and stopped next to him. The G-Bot escorted him down the street for a short bit... very cool.

The good news: He DIDN'T go over and my and my neighbors had some great fun!

I'll do some more practice with him tomorrow when my Son will be home. That should be fun and hopefully we'll figure out enough to get a few Trick or Treaters going on Friday...

I'll put up a short vid later tonight
Very exciting. Looking forward to seeing the video.

Fell asleep last night...

Here is the video from yesterday's testing...
@Richard R

More next week after the dust from Halloween settles...


Thanks for all your help guys!

What's more impressive than that amazing b9 is the way you casually dematerialized at the 10:19 mark. Forget EZ-Robot, how'd you do that ;)
@pacowang.... EZ Robot did that too.... Yes, it's that good....
@Rich Had a chance to try your mods to the code. Works great as far as slowing to a stop sooner. Its definitely an improvement.

Not sure if its the code or com or my cpu but sometimes there is a long lag, like several seconds before the robot begins to move again.

either way its definitely an improvement and its ingestion merged into the rest of the Halloween routine!

Thanks again Rich!
Oops maybe not, just got the error in the screencapture bellow. The console is scrolling the message ; "Control named 'Motor 2 speed' does not exist; Cannot send command 'SetValue'
User-inserted image
Have no idea what the script is doing. After reloading after the bug, the joystick seems to do nothing for a long time (15 20 seconds or more) then after a while it will briefly begin to move then no response then it begins to respond...

I think it doesn't like multiple joystick inputs. Seems to paralyze it. Not really sure though.
United Kingdom
Just remove the graphs and graph script, take the ControlCommand() for the hraph our of the on connection script. You dont need the graphs.

I would do it but I'm away now until the end of the weekend.
I think if you hit the start buttons in the two scripts in the "movement controls" object, it will set up the missing variables (I know you need the first one, I think the second one).

I didn't know to initialize both. Works great now! Thanks!
Gwen, I'm glad you have this working to your liking. These guys are wonderful with helping to find a way to get ezb to work for you. I'm sure the script they provided is the way to go to get the controller to work. However as far as the ramping issue I really believe that you are going to have to use the DESCRIBE software and use it to get into the Sabertooth to change some settings. Sabertooth has built in ramping control that you can adjust and fine tune. You can also set it to respond to either RC or analog signal. I think you'll get better and smoother control if you can figure out how to make these adjustments work for you.
Sounds like an area to research for sure @Dave
Well, actually the new script isn't working. Something about a 'motor 2 endspeed not defined' I didnt notice before. I don't even know where to look.

No worries though, I have the G-Bot set up with v1 of the ramping code and am ready to go...

The G-Bot's Halloween 2014 development phase if officially closed. Its showtime!
Have fun and don't forget to give us a front seat for the show!
@gwen Good luck... and try not to kill any of the trick or treaters with that thing.... LOL
No dead children tonight (at least not by the treads of the G-bot) Lol... I'll post a nice update late tomorrow and video as soon as I have some time tom put something together.

Lots of lessons learned ... Lots of fun...

Scared the heck out of my grandson... ;)