#include <shark/ObjectiveFunctions/Benchmarks/PoleSimulators/SinglePole.h>
|  | 
| unsigned | noVars () const | 
|  | Number of variables. 
 | 
|  | 
|  | SinglePole (bool markovian, bool normalize=true) | 
|  | 
| void | initDegree (double state2init) | 
|  | Initialize with specific pole angle. 
 | 
|  | 
| void | init (double state2init=0.07) | 
|  | Initialize with specific pole angle. 
 | 
|  | 
| void | init (double a, double b, double c, double d) | 
|  | Initialize full m_state. 
 | 
|  | 
| void | getState (RealVector &v) | 
|  | Place m_state in a vector. 
 | 
|  | 
| bool | failure () | 
|  | Returns true when this pole is in an illegal position. 
 | 
|  | 
| void | move (double output) | 
|  | Move the pole with some force. 
 | 
|  | 
|  | 
| static double | degrad (double x) | 
|  | Convert degrees to radians. 
 | 
|  | 
Definition at line 50 of file SinglePole.h.
 
◆ SinglePole()
  
  | 
        
          | shark::SinglePole::SinglePole | ( | bool | markovian, |  
          |  |  | bool | normalize = true |  
          |  | ) |  |  |  | inline | 
 
- Parameters
- 
  
    | markovian | Whether to return velocities in getState |  | normalize | Whether to normalize return values in getState |  
 
Definition at line 67 of file SinglePole.h.
 
 
◆ degrad()
  
  | 
        
          | static double shark::SinglePole::degrad | ( | double | x | ) |  |  | inlinestatic | 
 
 
◆ failure()
  
  | 
        
          | bool shark::SinglePole::failure | ( |  | ) |  |  | inline | 
 
Returns true when this pole is in an illegal position. 
Definition at line 128 of file SinglePole.h.
References degrad().
 
 
◆ getState()
  
  | 
        
          | void shark::SinglePole::getState | ( | RealVector & | v | ) |  |  | inline | 
 
Place m_state in a vector. 
- Parameters
- 
  
    | v | vector to place m_state in (assumed to be correct size already) |  
 
Definition at line 113 of file SinglePole.h.
 
 
◆ init() [1/2]
  
  | 
        
          | void shark::SinglePole::init | ( | double | a, |  
          |  |  | double | b, |  
          |  |  | double | c, |  
          |  |  | double | d |  
          |  | ) |  |  |  | inline | 
 
Initialize full m_state. 
- Parameters
- 
  
    | a | initial cart position |  | b | initial cart velocity |  | c | initial pole angle (in radians) |  | d | initial pole angular velocity |  
 
Definition at line 104 of file SinglePole.h.
 
 
◆ init() [2/2]
  
  | 
        
          | void shark::SinglePole::init | ( | double | state2init = 0.07 | ) |  |  | inline | 
 
Initialize with specific pole angle. 
- Parameters
- 
  
    | state2init | initial pole angle (in radians) |  
 
Definition at line 94 of file SinglePole.h.
Referenced by initDegree().
 
 
◆ initDegree()
  
  | 
        
          | void shark::SinglePole::initDegree | ( | double | state2init | ) |  |  | inline | 
 
Initialize with specific pole angle. 
- Parameters
- 
  
    | state2init | initial pole angle (in degrees) |  
 
Definition at line 87 of file SinglePole.h.
References init().
 
 
◆ move()
  
  | 
        
          | void shark::SinglePole::move | ( | double | output | ) |  |  | inline | 
 
Move the pole with some force. 
- Parameters
- 
  
    | output | Force to apply. Expects values in [0,1], where values below 0.5 indicate applying force towards the left side and values above indicate force towards the right. |  
 
Definition at line 137 of file SinglePole.h.
 
 
◆ noVars()
  
  | 
        
          | unsigned shark::SinglePole::noVars | ( |  | ) | const |  | inline | 
 
 
The documentation for this class was generated from the following file:
- include/shark/ObjectiveFunctions/Benchmarks/PoleSimulators/SinglePole.h