DifferentialWheelMotor

io.github.srs.model.entity.dynamicentity.actuator.DifferentialWheelMotor
See theDifferentialWheelMotor companion trait

Companion object for DifferentialWheelMotor providing an extension method to move the robot.

Attributes

Companion
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def apply(left: Wheel, right: Wheel): DifferentialWheelMotor

Creates a new instance of DifferentialWheelMotor with the specified time step and wheel configurations.

Creates a new instance of DifferentialWheelMotor with the specified time step and wheel configurations.

Value parameters

left

the left wheel of the motor.

right

the right wheel of the motor.

Attributes

Returns

a new instance of DifferentialWheelMotor.

Extensions

Extensions

extension (robot: Robot)
def applyMovementActions[F[_] : Monad](dt: FiniteDuration, action: Action[F])(using evidence$1: Monad[F], a: ActionAlg[F, Robot]): F[Robot]

Applies a list of actions to the robot, updating its state accordingly.

Applies a list of actions to the robot, updating its state accordingly.

Value parameters

action

the action to apply to the robot.

dt

the time delta for which the robot is moving.

Attributes

Returns

the robot with updated state after applying the actions.

def move[F[_] : Monad](dt: FiniteDuration): F[Robot]

Moves the robot based on the current state of its wheel motors.

Moves the robot based on the current state of its wheel motors.

Attributes

Returns

a new instance of the robot with updated position and orientation.