Com Port Manager icon Com Port Manager — Displays local PC COM/Serial ports opened by scripts, showing open/closed status (no communication logs); not the EZ-B UART. Try it →
 

Movement

Drive the robot through whichever movement panel robot skill the project has, such as a continuous rotation servo panel, an H-bridge panel or a robot's own driver. Movements keep going until another movement or a stop, so a script can start the robot driving and carry on. Speeds run from 0 (stopped) to 255 (full speed). The wait commands pause until something, such as a joystick or another script, moves the robot that way.

Where to find it: type Movement. in a Python script, or open the ARCx API view of the script editor and expand Movement


Commands

Command What it does
Movement.Down Makes a flying robot, such as a drone, go down through the project's movement panel.
Movement.Forward Drives the robot forward at the current speed through the project's movement panel.
Movement.FromString Moves the robot in the direction named by the text: forward, reverse, left, right or stop, in any capitalisation, at the current speed.
Movement.GetSpeed Gets the robot's movement speed, from 0 (stopped) to 255 (full speed).
Movement.GetSpeedLeft Gets the speed of the left wheel that movements use, from 0 (stopped) to 255 (full speed).
Movement.GetSpeedRight Gets the speed of the right wheel that movements use, from 0 (stopped) to 255 (full speed).
Movement.Land Tells a flying robot, such as a drone, to land through the project's movement panel.
Movement.Left Turns the robot left at the current speed through the project's movement panel.
Movement.Reverse Drives the robot backward at the current speed through the project's movement panel.
Movement.Right Turns the robot right at the current speed through the project's movement panel.
Movement.RollLeft Makes a flying robot, such as a drone, roll sideways to the left through the project's movement panel.
Movement.RollRight Makes a flying robot, such as a drone, roll sideways to the right through the project's movement panel.
Movement.SetSpeed Sets the speed of both wheels, from 0 (stopped) to 255 (full speed).
Movement.SetSpeedLeft Sets the speed of the left wheel, from 0 (stopped) to 255 (full speed).
Movement.SetSpeedRight Sets the speed of the right wheel, from 0 (stopped) to 255 (full speed).
Movement.Stop Stops the robot's movement through the project's movement panel.
Movement.Takeoff Tells a flying robot, such as a drone, to take off through the project's movement panel.
Movement.Up Makes a flying robot, such as a drone, go up through the project's movement panel.
Movement.WaitForDown Pauses the script until the robot is moving down, checking every 100 ms.
Movement.WaitForForward Pauses the script until the robot is driving forward, checking every 100 ms.
Movement.WaitForLeft Pauses the script until the robot is turning left, checking every 100 ms.
Movement.WaitForReverse Pauses the script until the robot is driving backward, checking every 100 ms.
Movement.WaitForRight Pauses the script until the robot is turning right, checking every 100 ms.
Movement.WaitForStop Pauses the script until the robot is stopped, checking every 100 ms.
Movement.WaitForUp Pauses the script until the robot is moving up, checking every 100 ms.

Details

Movement.Down

Makes a flying robot, such as a drone, go down through the project's movement panel. It keeps going down until it is given another movement, and the script carries on straight away.

Movement.Down()

Movement.Forward

Drives the robot forward at the current speed through the project's movement panel. It keeps driving until it is given another movement, and the script carries on straight away.

Movement.Forward()
Movement.Forward(speed)
Value Type What it is
speed int Optional. The speed for both wheels, 0 (stopped) to 255 (full speed).

Movement.FromString

Moves the robot in the direction named by the text: forward, reverse, left, right or stop, in any capitalisation, at the current speed. Any other text is sent as a custom movement name for a movement panel that understands it.

Movement.FromString(movementString)
Movement.FromString(movementString, speed)
Movement.FromString(movementString, leftSpeed, rightSpeed)
Value Type What it is
movementString str The direction, such as forward, reverse, left, right or stop, or a custom movement name.
leftSpeed int Only in some forms. The left wheel speed, 0 (stopped) to 255 (full speed). Ignored for stop.
rightSpeed int Only in some forms. The right wheel speed, 0 (stopped) to 255 (full speed). Ignored for stop.
speed int Only in some forms. The speed for both wheels, 0 (stopped) to 255 (full speed). Ignored for stop.
  • Movement.FromString(movementString): Moves the robot in the direction named by the text: forward, reverse, left, right or stop, in any capitalisation, at the current speed. Any other text is sent as a custom movement name for a movement panel that understands it.
  • Movement.FromString(movementString, speed): Moves the robot in the direction named by the text: forward, reverse, left, right or stop, in any capitalisation, with both wheels at the given speed, which also becomes the current speed. Any other text is sent as a custom movement name for a movement panel that understands it.
  • Movement.FromString(movementString, leftSpeed, rightSpeed): Moves the robot in the direction named by the text: forward, reverse, left, right or stop, in any capitalisation, with separate left and right wheel speeds, which also become the current speeds. Any other text is sent as a custom movement name for a movement panel that understands it.

Movement.GetSpeed

Gets the robot's movement speed, from 0 (stopped) to 255 (full speed). This is the left wheel's speed, which matches the right unless the wheels were given different speeds.

Movement.GetSpeed()

Gives back: int. The speed, 0 to 255.

Movement.GetSpeedLeft

Gets the speed of the left wheel that movements use, from 0 (stopped) to 255 (full speed).

Movement.GetSpeedLeft()

Gives back: int. The left wheel speed, 0 to 255.

Movement.GetSpeedRight

Gets the speed of the right wheel that movements use, from 0 (stopped) to 255 (full speed).

Movement.GetSpeedRight()

Gives back: int. The right wheel speed, 0 to 255.

Movement.Land

Tells a flying robot, such as a drone, to land through the project's movement panel. It has no effect without a movement panel that supports flying.

Movement.Land()

Movement.Left

Turns the robot left at the current speed through the project's movement panel. It keeps turning until it is given another movement, and the script carries on straight away.

Movement.Left()
Movement.Left(speed)
Value Type What it is
speed int Optional. The speed for both wheels, 0 (stopped) to 255 (full speed).

Movement.Reverse

Drives the robot backward at the current speed through the project's movement panel. It keeps reversing until it is given another movement, and the script carries on straight away.

Movement.Reverse()
Movement.Reverse(speed)
Value Type What it is
speed int Optional. The speed for both wheels, 0 (stopped) to 255 (full speed).

Movement.Right

Turns the robot right at the current speed through the project's movement panel. It keeps turning until it is given another movement, and the script carries on straight away.

Movement.Right()
Movement.Right(speed)
Value Type What it is
speed int Optional. The speed for both wheels, 0 (stopped) to 255 (full speed).

Movement.RollLeft

Makes a flying robot, such as a drone, roll sideways to the left through the project's movement panel. It keeps rolling until it is given another movement, and the script carries on straight away.

Movement.RollLeft()

Movement.RollRight

Makes a flying robot, such as a drone, roll sideways to the right through the project's movement panel. It keeps rolling until it is given another movement, and the script carries on straight away.

Movement.RollRight()

Movement.SetSpeed

Sets the speed of both wheels, from 0 (stopped) to 255 (full speed). If the robot is driving forward, in reverse, left or right it changes straight away, otherwise it is kept for the next movement that does not give its own speed.

Movement.SetSpeed(speed)
Movement.SetSpeed(speedLeft, speedRight)
Value Type What it is
speedLeft int Only in some forms. The left wheel speed, 0 to 255.
speedRight int Only in some forms. The right wheel speed, 0 to 255.
speed int Only in some forms. The speed for both wheels, 0 to 255.
  • Movement.SetSpeed(speed): Sets the speed of both wheels, from 0 (stopped) to 255 (full speed). If the robot is driving forward, in reverse, left or right it changes straight away, otherwise it is kept for the next movement that does not give its own speed.
  • Movement.SetSpeed(speedLeft, speedRight): Sets a separate speed for the left and right wheels, each from 0 (stopped) to 255 (full speed). If the robot is driving forward, in reverse, left or right it changes straight away, otherwise it is kept for the next movement that does not give its own speed.

Movement.SetSpeedLeft

Sets the speed of the left wheel, from 0 (stopped) to 255 (full speed). If the robot is driving forward, in reverse, left or right it changes straight away, otherwise it is kept for the next movement that does not give its own speed.

Movement.SetSpeedLeft(speed)
Value Type What it is
speed int The left wheel speed, 0 to 255.

Movement.SetSpeedRight

Sets the speed of the right wheel, from 0 (stopped) to 255 (full speed). If the robot is driving forward, in reverse, left or right it changes straight away, otherwise it is kept for the next movement that does not give its own speed.

Movement.SetSpeedRight(speed)
Value Type What it is
speed int The right wheel speed, 0 to 255.

Movement.Stop

Stops the robot's movement through the project's movement panel.

Movement.Stop()

Movement.Takeoff

Tells a flying robot, such as a drone, to take off through the project's movement panel. It has no effect without a movement panel that supports flying.

Movement.Takeoff()

Movement.Up

Makes a flying robot, such as a drone, go up through the project's movement panel. It keeps going up until it is given another movement, and the script carries on straight away.

Movement.Up()

Movement.WaitForDown

Pauses the script until the robot is moving down, checking every 100 ms. Returns straight away if it already is, and gives up when the script is stopped.

Movement.WaitForDown()

Movement.WaitForForward

Pauses the script until the robot is driving forward, checking every 100 ms. Returns straight away if it already is, and gives up when the script is stopped.

Movement.WaitForForward()

Movement.WaitForLeft

Pauses the script until the robot is turning left, checking every 100 ms. Returns straight away if it already is, and gives up when the script is stopped.

Movement.WaitForLeft()

Movement.WaitForReverse

Pauses the script until the robot is driving backward, checking every 100 ms. Returns straight away if it already is, and gives up when the script is stopped.

Movement.WaitForReverse()

Movement.WaitForRight

Pauses the script until the robot is turning right, checking every 100 ms. Returns straight away if it already is, and gives up when the script is stopped.

Movement.WaitForRight()

Movement.WaitForStop

Pauses the script until the robot is stopped, checking every 100 ms. Returns straight away if it already is, and gives up when the script is stopped.

Movement.WaitForStop()

Movement.WaitForUp

Pauses the script until the robot is moving up, checking every 100 ms. Returns straight away if it already is, and gives up when the script is stopped.

Movement.WaitForUp()