Welcome to the seamonsters library documentation!

This is Team 2605’s Python library for robot code. It builds on Wpilib/RobotPy and adds useful utilities for working with input, drivetrains, generators, and RobotPy’s robot simulator, along with a custom dashboard.

Index:

seamonsters.AccelerationFilter(linearAccel, …)

Calculates acceleration filtering for drive inputs (magnitude, direction, turn).

seamonsters.AddParallelSignal(iterable)

Value to signal that a new generator should be added to the group of parallel commands.

seamonsters.AngledWheel(motor, x, y, angle, …)

An AngledWheel is a wheel oriented in a fixed direction, which it can’t change on its own.

seamonsters.CasterWheel(x, y)

Doesn’t drive a motor, only stores its drive parameters and echoes them back for getRealDirection and getRealVelocity.

seamonsters.Dashboard(*args[, css])

Adds some utilities for building robot dashboards to remi.App.

seamonsters.DynamicAxis([exponent, …])

Makes values from a joystick axis go higher if you push them faster.

seamonsters.Gamepad(port)

An extended Joystick specifically designed for Logitech gamepads.

seamonsters.GeneratorBot()

A robot which runs generators throughout the cycles of autonomous, teleop, and test mode.

seamonsters.IDLE_STATE

An action to run in a StateMachine.

seamonsters.IterativeRobotInstance(robotType)

Allows an “instance” of an IterativeRobot to be created without connecting to HAL.

seamonsters.MecanumWheel(motor, x, y, angle, …)

An angled Mecanum wheel.

seamonsters.MultiDrive(superDrive)

Wraps a SuperHolonomicDrive, and allows drive() to be called multiple times in a loop.

seamonsters.ParallelSignal

A signal that can be returned from a generator in a parallel group to trigger an action on the group.

seamonsters.PathFollower(drive[, ahrs])

Controls a SuperHolonomicDrive to follow paths on the field.

seamonsters.State(function[, subMachine])

An action to run in a StateMachine.

seamonsters.StateMachine()

Implementation of a Pushdown Automaton.

seamonsters.StopParallelSignal([value])

Value to signal that a group of parallel commands should be stopped.

seamonsters.SuperHolonomicDrive()

seamonsters.SwerveWheel(angledWheel, …[, …])

A wheel which can rotate.

seamonsters.TFlightHotasX

Constants for the Thrustmaster T-Flight Hotas X joystick.

seamonsters.TestWheel(name, x, y)

Logs parameters for drive(), for testing.

seamonsters.TimingMonitor()

Monitors the rate of the update loop, to see how closely it matches 50Hz.

seamonsters.ToggleButtonGroup()

seamonsters.Wheel(x, y)

Interface for wheels.

seamonsters.circleDistance(a, b[, circle])

Returns the shortest arc length between two points on a circle.

seamonsters.deadZone(value[, deadZone, maxValue])

Add a dead-zone to the number.

seamonsters.ensureFalse(iterable, requiredCount)

Wait until the iterable yields False for a certain number of consecutive iterations before finishing.

seamonsters.ensureTrue(iterable, requiredCount)

Wait until the iterable yields True for a certain number of consecutive iterations before finishing.

seamonsters.feedbackLoopScale(value, scale)

seamonsters.forever()

Iterate forever.

seamonsters.getRobotPath(*paths)

seamonsters.hBoxWith(*args, **kwargs)

Construct a REMI HBox with the given keyword arguments, and add all of the given widgets to it.

seamonsters.parallel(*iterables)

Run a group of iterables in parallel.

seamonsters.queuedDashboardEvent(eventF)

Given a function eventF which takes any number of arguments, returns a new function which will add eventF and given arguments to the Dashboard event queue, to be called later.

seamonsters.readDataFile(filename)

seamonsters.returnValue(iterable, value)

Run an iterable but change the return value.

seamonsters.sequence(*iterables)

Run a set of iterables sequentially

seamonsters.setSimulatedDrivetrain(drivetrain)

seamonsters.startDashboard(robot, dashboardClass)

Start the dashboard in a separate thread.

seamonsters.stopAllWhenDone(iterable)

If run in a sea.parallel block, when the iterable completes all parallel commands will be stopped.

seamonsters.timeLimit(iterable, time)

Run the iterable until it finishes or the given time limit has passed.

seamonsters.untilButtonPressed(joystick, button)

A generator which runs until the joystick button is pressed, then exits.

seamonsters.untilTrue(iterable)

Run the iterable until it yields True, then stop.

seamonsters.vBoxWith(*args, **kwargs)

Construct a REMI VBox with the given keyword arguments, and add all of the given widgets to it.

seamonsters.wait(time)

Wait for a certain number of iterations.

seamonsters.whileButtonPressed(joystick, button)

A generator which runs while the joystick button is pressed, then exits.