Movement Panels

ARC includes a movement manager service, which is responsible for handling locomotion of the robot. Any robot skill or script that specifies a direction (i.e. forward, left, stop) registered itself into the movement manager service. This allows any robot skill to control the locomotion movement of the robot.

Available movement panels can be found in the Robot Skill Store here.

A Movement Panel is a robot skill control which is responsible for how your robot moves in directions (forward, left, right, stop, reverse, etc.). The flexibility of a movement panel is how it integrates with the ARC environment and allows other controls or script to easily instruct the robot to move any direction. When a movement panel is added to your project, it registers itself as the responsible control for directional movements. ARC has many movement panels, for example there are HBridges, Continuous Rotation Servos, Auto Position GAITs and even AR Parrot Drones or iRobot Roombas. The Getting Started section of this Docs has an overview of different movement panels related to robot types.

*Note: A maximum of one movement panel may be added to a project AND the movement panel generally is on the first ezb (connection 0). See the Getting Started section of this Docs for links to some Movement Panel types and popular controls utilizing Movement Panel commands within ARC.

When a movement panel is added to your project, other controls will know how to instruct the robot to move.



Scripting

When a Movement Panel is added and configured in your project, there are documented scripting commands which will instruct the movement panel to begin moving the robot. It is recommended to reference the script manual in ARC for the desired language. Some of these commands are...

Forward( [speed], [milliSeconds] )
Using a Movement Panel Control, this will start your robot in the Forward direction. 
Optionally, you can provide the speed and/or number of milliseconds to move.
You will require at least one movement panel to be configured within the project. This function will control that movement panel.
Speed is a number between 0 and 255
Example: Forward()
Example: Forward(200)
Example: Forward(255, 5000)

Reverse( [speed], [milliSeconds] )
Using a Movement Panel Control, this will start your robot in the Reverse direction. 
Optionally, you can provide the speed and/or number of milliseconds to move.
You will require at least one movement panel to be configured within the project. This function will control that movement panel.
Speed is a number between 0 and 255
Example: Reverse()
Example: Reverse(200)
Example: Reverse(255, 5000)

Stop()
Using Movement Panel Control, this will stop your robot.
You will require at least one movement panel to be configured within the project. This function will control a movement panel.
Example: Stop()

Left( [speed], [milliSeconds] )
Using a Movement Panel Control, this will turn your robot left.
You will require at least one movement panel to be configured within the project. This function will control that movement panel.
Optionally, you can specify the speed and/or number of milliseconds to turn. 
Speed is a number between 0 and 255
Example #1: Left()
Example #2: Left(200)
Example #2: Left(200, 5000)

Right( [speed], [milliSeconds] )
Using a Movement Panel Control, this will turn your robot right.
You will require at least one movement panel to be configured within the project. This function will control that movement panel.
Optionally, you can specify the speed and/or number of milliseconds to turn. 
Speed is a number between 0 and 255
Example #1: Right()
Example #2: Right(200)
Example #2: Right(200, 5000)

Up( [milliSeconds] )
Using the servo port settings from a Movement Panel Control, this will raise your drone robot up
Optionally, you can specify the number of milliseconds to turn. 
Example #1: Up()
Example #2: Up(1000)

Down( [milliSeconds] )
Using the servo port settings from a Movement Panel Control, this will lower your drone robot up
Optionally, you can specify the number of milliseconds to turn. 
Example #1: Down()
Example #2: Down(1000)

RollRight( [milliSeconds] )
Using the servo port settings from a Movement Panel Control, this will roll your drone robot right
Optionally, you can specify the number of milliseconds to turn. 
Example #1: RollRight()
Example #2: RollRight(1000)

RollLeft( [milliSeconds] )
Using the servo port settings from a Movement Panel Control, this will roll your drone robot left
Optionally, you can specify the number of milliseconds to turn.
Example #1: RollLeft()
Example #2: RollLeft(1000)

Land()
Tell your flying drone to land
Example: Land()

TakeOff()
Tell your flying drone to take off
Example: TakeOff()

If anywhere in your project, the command Forward() was executed, the script engine will instruct the project's Movement Panel to begin moving forward.



How About Speech Recognition?

Some controls, such as the Speech Recognition Control will trigger script based on user input (speech). The default configuration of the Speech Recognition Control includes speech commands and respective script for instruction the Movement Panel to move the robot. If you view the Speech Recognition configuration, you will see script direction commands...

Robot Speech Recognition

What About Other Controls?

Good question! Now that we know how script can instruct a movement panel to move, how do other controls work with movement panels? Well, that's the magic of ARC. As an example, if a Joystick Control was added to your project, pushing forward on the joystick will instruct the Movement Panel to begin moving forward. This is because the Joystick control is pre-configured to send the Forward command to ARC. and the registered Movement Panel will respond to the direction request. Let us take a look at the settings menu for the Joystick Control. Here you will see the checkbox which assigns the Joystick #1 to "Control Movement Panel".

Movement Panel

Even The Camera Control?

Yes! The camera control has an option in the settings to instruct Movement Panels to move any direction based on the tracking method configured. The the tracking method is how the robot will respond to tracking a specific tracking type. You can find out more about the camera control and terminology by clicking HERE. If the Camera Control is configured to follow an object with MOVEMENT, then it will instruct the current Movement Panel. Let's take a look at the Camera Settings and where the option is to have the camera control a movement panel.

Robot Camera Control

*Note: Highlighted in RED is the section that contains options to configure how the Camera Control will communicate with the Movement Panel. Highlighted in BLUE is the checkbox which enables/disabled the ability for the Camera Control to track with movement. There are blue question marks which provide more information.



User Interface Builder

The trend in this lesson is that any control or script that deals with movement will instruct the current Movement Panel to begin moving the robot in the specified direction. This also applies to widgets within the User Interface Builder. Within the User Interface Builder, you may add buttons to control movement direction with script commands (Forward(), Left(), Stop(), etc.). Or, you may add the Joystick Pad.

Here is an example of buttons added to the User Interface Builder which will instruct movement using script commands (Forward(), Left(), Stop(), Right(), Reverse(), etc.).

Robot Mobile App Buttons


Here is an example of using the Joystick Pad in the User Interface Builder, which itself will automatically instruct the Movement Panel. One advantage to the user interface builder's Joystick Pad is that it can control speed, if the movement panel supports it. Some movement panels (such as the Auto Position GAIT) do not support speed.
*Note: You can tell if a movement panel supports speed because it will have a speed slider on it.

Robot Mobile App Joystick

RoboScratch

Any reference to moving (Forward, Left, Right, Stop, etc.) will automatically instruct the project's current Movement Panel to begin moving. This also includes using either RoboScratch, which is a great beginning programming interface included with ARC.

RoboScratch

Blockly

Any reference to moving (Forward, Left, Right, Stop, etc.) will automatically instruct the project's current Movement Panel to begin moving. This also includes using either Blockly, which is a great intermediate programming interface included with ARC.

Blockly

Can I Create My Own Movement Panel?

As mentioned earlier, ARC has many movement panels for HBridges, Continuous Rotation Servos, Auto Position GAITs and even AR Parrot Drones or iRobot Roombas. However, if you seek to create a custom movement panel, the Custom Movement Panel is what you are looking for. The Custom Movement panel contains events for each direction (Forward, Left, Right, Stop, Reverse) that you may add custom code for.

When another control requests to move your robot (i.e. forward, left, right, stop, reverse), the respective event in the Custom Movement Panel will be executed. Yes, the joystick will control your custom movement panel. Yes, the camera will control your custom movement panel. The point to this document is that any mention of a movement in ARC will instruct the movement panel to move the robot, even a custom movement panel.

Using Custom Movement Panel