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

Discover the limitless potential of robot programming with Synthiam ARC Pro – where innovation and creativity meet seamlessly.

#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 :):)