loading
 
Rovio Move Command
mbahr from United States  [23 posts]
13 year
I've been playing wiht the Chase_Movement tutorial for Rovio.  Very neat.

I don't see where the possible values for the "move" command are documented.  It appears that these are polar coordinates which the robat will steer and move towards, but I wish to be sure.

Can someone steer me towards the proper documentation?

-Mike
Anonymous 13 year
Mike,

The examples are not documented to that degree. The "move" command that you are referring to is just a variable. A variable is just a container of a value. That value could be a number, a piece of text or a list of things. The specific usage of "move" is just arbitrary and we could have called it anything ... as long as the usage was consistent.

This goes to your earlier post

http://www.roborealm.com/forum/index.php?thread_id=3802

where you can move the robot using manual controls. The question is how do you automate that movement? Well, you need to tell that control what value to use instead of manually specifying it. That's what the variable is for. It tells the control what value to send to the robot. That's also why when you select a variable it disables the manual control to indicate that it is now under automatic control.

So the next question is, where does the value for the variable "motor" or any other variable come from? The answer is many places. It could come from another module or from you setting a variable using the API. In the examples the variable is set from within a VBScript module or from a keyboard module ... or alternatively the joystick module. So you can see that regardless of who sets it you don't need to respecify it in the Rovio module. It just sends whatever value is in that variable to the robot.

How you set the variable depends on what you want to do. In the case of the keyboard you can set the value depending on what key you press. But YOU must know that when you press a key (say the letter 'a') that you then set the move variable to 1 which happens to translate to moving forward. This then works the same for other key assignments.

The joystick is the same. You would read a value from the joystick into a variable and use the VBScript to see if the X value is greater than say 200 and then set the move variable to 1 ... again meaning forward. But in this case X would be side to side ... so that's probably an error ... instead you would use the Y value of the joystick. But as you can see the application is flexible enough to allow you to move the joystick to the left and still have the bot move forward. It is all about how you assign the move variable.

The items in the dropdown list are variables already created by the system for various reasons. Normally yours will appear at the end of the list.

For example, use the Set_Variable module and enter the move variable with a value of 1 just before the Rovio module with the move variable specified. The robot should move. Then just change the value to 2. Now the robot will change direction even though you've not changed anything in the Rovio interface. That's how it works.

STeven.
mbahr from United States  [23 posts] 13 year
Aha!

So these are global variables.  I didn't think to look back at the rovio interface.  Now that I have...  I believe I understand.  I should have looked more closely the first time.

Thanks so much for the explanation...  This is a pretty amazing stuff you've put together!  It requires a completely different way of thinking for me, but seems extremely powerful.

-Mike  

This forum thread has been closed due to inactivity (more than 4 months) or number of replies (more than 50 messages). Please start a New Post and enter a new forum thread with the appropriate title.

 New Post   Forum Index