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
Resolved Resolved by Steve G!

How To Get Init Script To Go Slower Servo's?

am looking when i power jd on the pose he wil take goes slow.
as in the video he does it slow but not when the init script runs.







User-inserted image

United Kingdom
#2  
Also one peace of advice. When you want to share scripts in a post, it's better if you use the UBB code. That way it's easier to look at and easier for someone helping you to copy the code and make changes.

User-inserted image


Write or copy your script where it says "text" inbetween the [ code ] and [ /code ] UBB codes .

Hope that helps.;)
PRO
Belgium
#3  
it works perfect.

code text code dont understand how that works?
United Kingdom
#4  
No problem. Glad it's working the way you want it to.

In regards to posting a script, if you don't mind, I will try to teach you how..

1) First, you need to use this [ symbol

2) Then write the word Code

3) Then use this ] symbol

4) Write your script, for example, Servo(D5,90)

5) At the end of the script use this [ symbol

6)Then use this / symbol

7)Then write the word Code again

8) Then finally use this ] symbol

It should look like the following picture...

User-inserted image


Or you can write it like this...

User-inserted image


And you will end up with this when you post your response...

Code:


Servo(D5,90)


I hope that helps :). It just makes it easier to make changes or to test someone's script without having to re-write the whole thing. If you want, post a reply back and give it a try.
PRO
Belgium
#5  

Code:

servo(D2,0)

Code:

servo(D3,0)

Code:

(servo(D7,0)

Code:

servo(D4,0)

Code:

servo(D8,0)


the code you teach me
PRO
Belgium
#6  
how do i get this on one black page?
United Kingdom
#7  
Yeah, you got it.

A you need to do is put the first [ code ] at the start of the first line of the script, and the [/ code ] at the very end of the last line the script...

User-inserted image
PRO
Belgium
#9  

Code:


servo(d2, 2)
servo(d3,180)
servo(d7, 18)
servo(d8,77)
servo(d5,105)


:D:)
United Kingdom
#10  
:D:D:D You got it buddy. A job well done.:):):)
United Kingdom
#13  
Your more than welcome.;)
#14  
Good tutorial there SteveG! I'm sure other's have been confused about how to insert code as well. :)
United Kingdom
#15  
@Justin.

Thanks buddy. I must admit when I first started here I didn't know what the UBB codes were or how to use them myself, lol.;)
PRO
USA
#16  
Nomad,
How did it "work perfect" adding the 0 speed for your servos, initialize help you?
Did your robot move slower and not jump during the initialize startup process?
Did your robot movements actually move slower with running the 0 speeds set points during initialize start up process prior to running the servo set-start positions, and servo speeds?
I am just trying to understand.
Steve s
United Kingdom
#17  
@Steve S.

I'll try to explain it. You know how when you have a servo set to move at a certain speed, say ServoSpeed(D5,2), it will move at that speed no problem. Now close that project and open it again.

Without the servo speed init script, when you connect to the EZ-B the servos will twitch. No problem. But now, when you move that servo for the first time since connecting to the EZ-B, even with the servo set to "2", it will move at full speed. Move it again a second time and it will move at speed "2".

Setting the servos to "0" in a init script basically initalises the servo speed (like it moved the first time, mentioned above), then later in the same script, it sets the new speed (like it moves the second time, mentioned above). Now when you move that servo normally with a script, it will move at speed "2".

That's basicly it. I Think I explained that okay.:P

I hope that helps Steve.
PRO
Synthiam
#18  
Exactly as steve said - the servo does not know it's position until it is moved into a position. When you power on a robot, the software has no idea what position the servo is in because there is no feedback information. The servo jumps to position - which is why the learn section explains to always start your JD robot from lying on it's back and not having any objects around that it will knock over.

You can find out more how servos work using the activity in the learn section here: http://www.ez-robot.com/Tutorials/Lesson/48?courseId=6
PRO
USA
#19  
Thank you Steve G and D.J. for responding,
If I remember correcting we were told to set the actual servo positions first , then the speeds during initialize?

Code:


servo(d1,80)
servo(d2,90)
servo(d3,38)
servo(d4,141)
servo(d5,76)
servospeed(d1,3)
servospeed(d2,5)
servospeed(d3,2)
servospeed(d4,2)
servospeed(d5,5)


I appreciate your help, thank you.
Steve S
United Kingdom
#20  
No problem Steve. Glad it helped. You are right in what you are saying though as that's how I have always understood it, and how I write my scripts. Position first, then speed.

But in this instance it's not necessary as in the first part or the script where everything is 0 (see post #2) we are not setting a servo position, only speed. But in the second part we are asking for a position so as you say, it's position first then speed. Something like that anyway.;)
PRO
Belgium
#21  
steve S

yes the init works great with steve G script.