gymwipe.plants.sliding_pendulum module

A plant, sensor, and actuator implementation for an inverted pendulum.

class SlidingPendulum(world=None, visualized=False)[source]

Bases: gymwipe.plants.core.OdePlant

Simulates a pendulum, mounted on a motorized slider.

getAngle()[source]
Return type:float
getAngleRate()[source]
getWagonPos()[source]
Return type:float
getWagonVelocity()[source]
Return type:float
setMotorVelocity(velocity)[source]
class AngleSensor(name, frequencyBand, plant, controllerAddr, sampleInterval)[source]

Bases: gymwipe.networking.devices.SimpleNetworkDevice

A networked angle sensor implementation for the SlidingPendulum plant

class WagonActuator(name, frequencyBand, plant)[source]

Bases: gymwipe.networking.devices.SimpleNetworkDevice

A networked actuator implementation for moving the SlidingPendulum plant’s wagon

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