Asked — Edited
Resolved Resolved by WBS00001!

Adventure Bot Auto Position Movement Panel

Hello,

I performed the calibration procedure that DJ made up for the continuous rotation servos of the Adventure Bot using a test continuous rotation movement panel. All worked out great.

I then opened my main project for Adventure Bot that uses the Auto Position Movement Panel and it acts differently. When I click forward, reverse, left and right the servos move at different speeds depending on what I select? it appears that the speed of each direction of movement is controlled by the step setting in the script for the given directions. How do you make the forward, reverse, left and right speeds be the same instead of some real fast and some real slow (meaning forward, reverse, left and right)?

I looked at the scripts for each of the movements and the speed is set to -1 for forward, reverse, left and right scripts. The only thing that changes between them is the steps. Why is the speed set to -1 for all movements and when you activate them they all go at different speeds. The only thing that is different between the scripts for forward, reverse, left and right is the number of steps. Is this the way that the actual speed is set and by setting the step setting for forward, reverse, left and right to the same value will this make the speed the same for each direction?

It appears that using the Auto Position Movement Panel is a more graceful way of controlling the Adventure Bot Servos versus the continuous rotation movement panel. Just trying to understand how the Auto Position Movement Panel actually work.

Thanks in advance for all the help ! Rick


ARC Pro

Upgrade to ARC Pro

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

#1  

Hello,

I experimented with the script settings in the Auto Position Movement Panel for the adventure bot. I changed each one of the variables in the action scripts for forward, reverse, left and right commands and ran into a brick wall getting forward, reverse, left and right to operate at the same speed like the continuous servo control does? I have looked over the Auto Position write up but doesn't make a lot of sense right now especially for the adventure robot.

Alan - Just wondering what Movement Panel you use for your adventure bot?

Thanks much for the clarification in advance ! confused

PRO
Synthiam
#2  

Servos move into positions. A continuous rotation servo moves direction based on the position. The calibration video explains that, as well as the calibration tutorial.

The Auto Position moves servos between two positions (start frame and end frame)

The Auto Position is used in the adventure bot to make speed ramping.

The -1 is documented in the Auto Position manual.

#3  

DJ,

Why does forward go really fast, reverse goes slower and right and left go real slow? After looking at tutorial still no sure how the ramping is done in Auto Position panel. I see why you would want to ramp to gracefully start up and slow down but I would think forward, reverse, left and right would settle at the same speed after ramping up. I tried changing the delay, steps and speed (always -1 in adventure bot) for the various directions with no change or really weird and unexpected changes. Can you tell me how to get them all (forward, reverse, left and right to ramp up fairly fast and go at same speed? I don't have issues with the continuous rotation control and everything worked perfectly according to your calibration video and forward, reverse, left and right all went at same speed. After looking at tutorials for Auto Position Movement Panel I am more confused than ever. If you could steer me in the right direction on how to set ramp up and speed with say forward then I will be able to grasp what is going on. Not sure why adventure bot was set up with all of the directions (forward, reverse, left and right set at all different speeds? Your help is much appreciated....Rick tired;)

PRO
Synthiam
#4  

As the tutorial states, the number further away from the calibration point is faster speed. Have you looked at the calibration tutorial or did you skip right to the video? The video does explain it, but maybe reading will make more sense.

also, have you updated your adventurebot app in the last few months? Or are you running an out of dated version?

#5  

DJ,

I assume when you mention calibration procedure that you are referring to the Auto Position movement panel. Again if you are referring to the continuous rotation calibration procedure I have done it and it works great !. I need to know how to control the speed of the directions in the Auto Position movement panel. It appears that to increase the speed of the movement actions, you need to to change the speed setting from -1 to some positive number that suits your fancy. Would this be a correct assumption? I believe I already tried this. I will check again.

Not sure what you mean by updating the adventure bot app? I have the latest ARC software and have made changes to the app with hardware and scripts. It is the adventure bot app from the cloud from quite some time ago and I added to it. Are you saying you have changed the adventure bot app lately and in particular its movement panel? If that is the case, I will check it out and compare the two movement panels to see what has changed.

I will take your good advice and go back and read the tutorial and take a look see at the video ! The more I get into the capabilities the more I am impressed and amazed !

Any news on when the new EZB Controller will be released. Not just the update but the hole unit? Also when will the new display and sensors be available? Sorry for sneaking this into this thread.

Thanks as always DJ for your help ! Rick :)

#6  

@rbonari Hi; I don't have an Adventure Bot, but I do have a couple of continuous rotation servos. I hooked one up to see how it worked and have a bit of information which you may find useful.

With a usual type of servo (lever or rotary) the servo moves to a certain position depending on the number of degrees you tell it to move. It goes there and stops. With the servos here, that is from 1 to 180 degrees. And those are absolute positions, not relative. You tell it to go to 20 degrees and it goes to 20 degrees (absolute), not move 20 degrees from where it currently is (relative).

Thing is, there is no such thing with a continuous rotation servo. When you send what would normally be a position number to it, you are actually telling it what speed to go. Not only that, but you are also telling it what direction to turn. If everything were perfect, numbers from 1 to 89 would say turn in one direction and numbers 91 to 180 would say to turn the other way. Dead at 90 degrees the servo would stop. And that is what the calibration procedure is all about. You are trying to get it as perfect as possible with adjustments to the mechanical set screw on the servo itself. That's also why you set the number to 90 when you make that adjustment.

The other part of the calibration procedure video showed how to set up a min and max range for the speed. In theory, the maximum speed in one direction would be 0 and the max speed in the other direction would be 180, but that's not really the practical limits.

To see all this in simpler form, turn the robot upside down. We just want to spin the wheel. Add a Vertical servo control to your project. In the settings, adjust the Min value to 1 and the Max value to 180. Now, set the port number to the same number as one of the continuous rotation servos is connected to. Click Save. Then click Center. That will put the number shown to 90.

Now, when you adjust the number in one direction, the wheel will turn. The more you adjust the number the same way, the faster the wheel will turn (up to a point). As you adjust the number back toward 90, the wheel will slow and eventually stop at 90. Of course, if you adjust the number the other way, the wheel will turn the other direction, going faster and faster.

And that is how you adjust the speed (and direction). It will be the same in the Auto Position control. 90 will be stop and anything else will turn a given wheel in one direction or the other at some speed.

I found that the servo did not keep getting faster and faster all the way through the range, but stopped going faster before reaching 1 or 180.

Hope that helps clear things up a bit.

#7  

@rbonari I forgot I was going to add something about the Step setting as well, since you asked about it.

To understand what step does, it might help to understand what the program does where the steps are concerned. The step setting basically relates to the smoothness of the robot's movement. However, since many operations have a certain degree of interaction, there is more to it than that. What the program does when you execute a movement is send many individual instructions to the servos. Not just one that says "move here." It moves a given servo in increments. How fine those increments are depends on the step setting. For example, if you tell the robot's servo to move 20 degrees at a step of 1, the program sends out many commands, causing the servo to move ever so slightly each time. The instructions you see when you hover the mouse pointer over the question mark next to the Step setting indicates each step is 1 degree (at a setting of 1). If you do the same but at a step of 5, it will move the servo in much larger increments per command. So the motion will not be as smooth. It's like counting by 1's and then by 5's. Step = 1, increment by 1 degree. Step = 5, increment by 5 degrees and so on.

As I said there is an interaction of effects from all this. At a step of 1, the action is smoother than at a step of 5, but it is also slower. And that's the trade-off. The higher the step, the faster the movement, but the less smooth it is. That, of course, is also where the speed variation comes from. It simply takes longer for the robot to go through all those tinier steps.

How does this relate to the continuous rotation servo? As far as I can tell, it has to do with the Acceleration. The smaller the step number, the longer will be the acceleration time it takes to get up to speed. It's not very much time, even at a step of one, however. At least not from what I saw with my simple test setup.

The Speed and Delay setting play into all this as well and there is a degree of interaction with those too, but I'll not go there right now as I may have already have muddied the waters enough for one post. :) Plus I haven't played with them in relation to this servo.

#8  

WBS00001,

Thanks for the information ! It was very helpful. After reading the complete Auto Position tutorial, the servo calibration procedure and watching the videos Everything makes much more sense. However, I think the Auto Position control makes more sense when talking about the JD Robot.

The one thing I'm not sure of still is the relationship between delay, steps and speed (-1) in the actions setup panel in relation to rotational servos? Also nothing really mentioned about "script: false" use in the actions command? When and how would you want to use this?

I can definitely see why you must calibrate the continuous rotation servos for the Auto Position panel to work correctly.

The speed -1 portion of the actions command is somewhat puzzling and not sure how and when to use it? The speed looks like it is controlled in the frames panel for the continuous rotation servos. Also it appears that the numbers above 90 degrees move the servo in one direction and below 90 degrees in the other direction. Also this controls speed it appears?.

Any other thoughts on this are much appreciated ! Rick :):)

#9  

@rbonari I want to start off this post by pointing out a correction I made to my post on steps. I had said the program sends out several commands per step when the Step is set to 1, but I believe this is incorrect. Looking at the instructions associated with the step adjustment again, it appears the program moves the servo 1 degree per step at the setting of 1. This correction is reflected in the post itself now. My apologies.

Quote:

I think the Auto Position control makes more sense when talking about the JD Robot.
Generally speaking, this is true. The Continuous Rotation servo is a special case in some respects. However, the Auto Position control is also applicable to this servo as well. Especially where more and more complicated movements are concerned. You can do the same thing in a script, but many of the associated tasks which you would have to place in a script yourself are taken care of automatically when using the Auto Position control. Once you get the hang of it you will find it is much easier to use than trying to script it all out yourself. Something to keep in mind is all of the controls are designed to save you from having to actually program anything to begin with. That's the whole point of the controls and ARC. The controls let the user make the robot do things by simply "filling in the blanks". The control takes care of the rest of the code you would otherwise have to write yourself.

Quote:

it appears that the numbers above 90 degrees move the servo in one direction and below 90 degrees in the other direction. Also this controls speed it appears?.
Correct. Keep in mind, however, that the servos, in relation to each other, turn in opposite directions for the same number setting. This is because they are positioned 90 degrees apart. Therefore, a number that causes one to turn in a given direction will not work for both when going straight forward or straight reverse. It's the same for all the bi-symmetrical robots.

Quote:

nothing really mentioned about "script: false" use in the actions command?
It appears that it relates to presence of a filled in script setting for a given Frame. You fill it in by selecting the Edit box just to the right of the Frames that are being used box. Then clicking on the pencil icon in the window that pops up. If there is something actually in the script the notation changes to "Script: True". It is unclear if has further functionality when calling the Frame in a script, for instance, since it doesn't show up in the "Cheat Sheet." It may simply be something to remind the user that there is something in the script.

As to Delay and Speed settings. I'm assuming you have already let your mouse pointer hover over the question mark next to these settings and read what is displayed there when you do, but would, nonetheless, like more information. Especially as related to the Continuous Rotation Servos. In particular how they effect one another.

The Delay setting relates directly to the Step setting in that it determines how many milliseconds to delay between each step. 0 represents no delay. The program will simply put out one step command after another, resulting in the fastest operation at a given step setting. A Delay setting greater than 0 will cause the operation of the servo to go slower overall, regardless of the Step setting. So there is an interaction here. Each, on it's own will cause a variation in the speed of action of the servo. Together, they can be used to further control what happens as a result. As I mentioned before, the lower the Step setting, the slower a given servo will move while going to a given position. The Delay setting can further retard this rate of movement. For example, if you were to write a script to do the same thing, it might look like this when moving a servo to 20 degrees (from wherever it is currently):


  #First define some variables:
$MoveTo   =20 #Degrees
$TheDelay =2
$TheStep  =1

  #Now, set up a loop (there are many ways to do this)
$NextStep =$TheStep
RepeatWhile($NextStep <= $MoveTo)
  Servo(D0,$NextStep) #Move one step increment
  Sleep($TheDelay) #Delay this much between steps
  #NextStep =$NextStep +$TheStep #Where to move in the next loop iteration.
EndRepeatWhile

As you can see, changing the value of $TheStep and/or the value of $TheDelay will affect the way the servo would behave. This is what the Auto Position control does for you automatically. The $MoveTo variable is what you set when adjusting the servo in a given Frame itself. The Action section of the Auto Position control takes those Frames and combines them to create an overall sequence of events or "Action".

Finally, the Speed setting. Here I am not really clear on it so I can't offer much advice at the moment. One thing is clear, however, if you want to just ignore it for now, leave it set to -1. That says to the Action to simply ignore this function for the selected Frame. It's the same for any servo within a Frame. If set to -1, that servo will be ignored in that particular frame.

Quote:

The speed looks like it is controlled in the frames panel for the continuous rotation servos.
This is correct. The speed (and direction) of the servos is controlled in the Frames. However, the "Speed" setting in Actions seems to be something different in that the instructions say that the Speed setting controls the speed at which the servo moves between positions. Not the overall speed of the servo. Again, I'm not clear on that. I could speculate but it would be better if I did not. It might be better if it had a different name so as to avoid confusion. Something like "Velocity" or "Rate" maybe. But I wasn't consulted, so ...

There is also a script servo speed instruction ... ServoSpeed (servoPort, speed). I'm not sure if it is the same thing or not. You can find a description of it under the Script Help tab in any script editing window.

As I mentioned before, all this appears to relate to acceleration (also called Ramping) where the Continuous Rotation servo is concerned. How long it takes to get up to speed as set by the servo setting in the frame itself. The Actions currently in the Auto Position control are just the basic movements. Nothing complicated as in something like the JD example's Actions.

You could make additional actions by using the existing frames. Perhaps to make the robot move in a square pattern, for example. You would use a combination of the Forward and Turn Frames in a new Action.

Okay, yet another novel length post submitted. :D

PRO
Synthiam
#10  

Awesome response - I can add to the speed comment. The speed is the speed of ramping between pwm positions, and this happens in the ezb. The speeds can be viewed here: https://synthiam.com/Tutorials/Help.aspx?id=168

The servo speed values can smooth the movements and remove jerkiness. However, it's not really applicable to continuous rotation servos because there's no jerkiness because they have wheels attached to them.

#11  

WBS00001 & DJ,

Thanks for the awesome responses and I will play with the settings and see what happens. I may have some questions later....Rick :):)