gymwipe.control.inverted_pendulum module

Controller implementations for an inverted pendulum (using the gymwipe.plants.sliding_pendulum module)

class InvertedPendulumPidController(name, xPos, yPos, frequencyBand)[source]

Bases: gymwipe.networking.devices.SimpleNetworkDevice

A PID inverted pendulum controller for the SlidingPendulum plant.

Note

After initialization, the sensorAddr and actuatorAddr attributes have to be set to the network addresses of the sensor and the actuator.

sensorAddr = None[source]

The sensor’s network address

Type:bytes
actuatorAddr = None[source]

The actuator’s network address

Type:bytes
onReceive(packet)[source]

This method is invoked whenever receiving is True and a packet has been received.

Note

After receiving has been set to False it might still be called within RECEIVE_TIMEOUT seconds.

Parameters:packet (Packet) – The packet that has been received
control()[source]