MovementActionFactory
Factory object for creating movement actions for dynamic entities. Provides methods to create custom movement actions with specified speeds for the left and right wheels, as well as predefined actions for moving forward, backward, turning left, turning right, and stopping.
Attributes
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
Members list
Value members
Concrete methods
Creates a custom movement action with specified speeds for the left and right wheels.
Creates a custom movement action with specified speeds for the left and right wheels.
Type parameters
- F
-
the effect type of the action.
Value parameters
- left
-
the speed to apply to the left wheel.
- right
-
the speed to apply to the right wheel.
Attributes
- Returns
-
a Validation containing the MovementAction if the speeds are within the defined bounds, or an error if they are not.
Moves the robot backward by applying a negative speed to both wheels.
Moves the robot backward by applying a negative speed to both wheels.
Type parameters
- F
-
the effect type of the action.
Attributes
- Returns
-
the MovementAction representing the backward movement.
Moves the robot forward by applying a positive speed to both wheels.
Moves the robot forward by applying a positive speed to both wheels.
Type parameters
- F
-
the effect type of the action.
Attributes
- Returns
-
the MovementAction representing the forward movement.
Stops the robot by applying zero speed to both wheels.
Stops the robot by applying zero speed to both wheels.
Type parameters
- F
-
the effect type of the action.
Attributes
- Returns
-
the MovementAction representing the stop action.
Turns the robot left by applying a positive speed to the left wheel and a negative speed to the right wheel.
Turns the robot left by applying a positive speed to the left wheel and a negative speed to the right wheel.
Type parameters
- F
-
the effect type of the action.
Attributes
- Returns
-
the MovementAction representing the left turn.
Turns the robot right by applying a negative speed to the left wheel and a positive speed to the right wheel.
Turns the robot right by applying a negative speed to the left wheel and a positive speed to the right wheel.
Type parameters
- F
-
the effect type of the action.
Attributes
- Returns
-
the MovementAction representing the right turn.