Members
natalya :Robot
Instance of Robot class
Type:
viewAngle :number
Angle of rotation of the robot on imaginary platform.
Type:
- number
walkArray :Array.<number>
Array to control the walking gait as well as the static pose of the robot.
The order of the control parameters in the array are as follows:
[0] Walking X [1] Walking Y [2] Walking Rotation
[3] Static Offset X [4] Static Offset Y [5] Static Offset Z
[6] Static Offset Yaw [7] Static Offset Pitch [8] Static Offset Roll
Type:
- Array.<number>
Methods
chartSetup()
Function to setup chart js canvases to plot the angles of all the leg servos.
chartUpdate()
Function to plot the angles of all the leg servos on the chart js canvases.
delay(milliseconds)
Function to delay execution of the current thread by the time provided.
Parameters:
Name | Type | Description |
---|---|---|
milliseconds |
number | The delay period in milliseconds. |
Example
Example usage of the delay method.
console.log("Start Program");
delay(2000); // wait for 2 seconds
console.log("End Program");
draw()
p5.js draw function, is run every frame to create the desired animation
setup()
p5.js setup function, creates canvas.