This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def transform_matrix_tensor(theta, d, a, alpha): | |
# tensor version of transform matrix | |
matrix = [[tf.cos(theta), tf.multiply(-tf.sin(theta), tf.cos(alpha)), tf.multiply(tf.sin(theta), tf.sin(alpha)), tf.multiply(a, tf.cos(theta))], | |
[tf.sin(theta), tf.multiply(tf.cos(theta), tf.cos(alpha)), tf.multiply(-tf.cos(theta), tf.sin(alpha)), tf.multiply(a, tf.sin(theta))], | |
[tf.zeros_like(theta), tf.sin(alpha), tf.cos(alpha), d], | |
[tf.zeros_like(theta), tf.zeros_like(theta), tf.zeros_like(theta), tf.ones_like(theta)]] | |
return matrix | |
def forward_kinematics_loss_2(y_true, y_pred): | |
# y_true is the xy position |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def transformMatrix(theta, d, a, alpha): | |
return np.array([[np.cos(theta), -np.sin(theta)*np.cos(alpha), np.sin(theta)*np.sin(alpha), a*np.cos(theta)], | |
[np.sin(theta), np.cos(theta)*np.cos(alpha), -np.cos(theta)*np.sin(alpha), a*np.sin(theta)], | |
[0, np.sin(alpha), np.cos(alpha), d], | |
[0, 0, 0, 1]]) | |
def forwardKinematics_2(theta1, theta2): | |
T00 = transformMatrix(theta1,0,1,0) | |
T01 = transformMatrix(theta2,0,1,0) | |
pos = [0, 0, 0, 1] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
model = Sequential([ | |
Dense(256, input_shape=(2,)), | |
LeakyReLU(), | |
Dense(256), | |
LeakyReLU(), | |
Dense(256), | |
LeakyReLU(), | |
Dense(256), | |
LeakyReLU(), | |
Dense(256), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def transform_matrix_tensor(theta, d, a, alpha): | |
# tensor version of transform matrix | |
matrix = [[tf.cos(theta), tf.multiply(-tf.sin(theta), tf.cos(alpha)), tf.multiply(tf.sin(theta), tf.sin(alpha)), tf.multiply(a, tf.cos(theta))], | |
[tf.sin(theta), tf.multiply(tf.cos(theta), tf.cos(alpha)), tf.multiply(-tf.cos(theta), tf.sin(alpha)), tf.multiply(a, tf.sin(theta))], | |
[tf.zeros_like(theta), tf.sin(alpha), tf.cos(alpha), d], | |
[tf.zeros_like(theta), tf.zeros_like(theta), tf.zeros_like(theta), tf.ones_like(theta)]] | |
return matrix | |
def batch_matmul(location_v, batch_theta_v): | |
# perform matrix multiplication between the location vector and the transform matrix, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import keras | |
import numpy as np | |
from keras.models import Sequential, Model | |
from keras.layers import Dense, Activation, LeakyReLU, Input, Lambda, Concatenate | |
from keras.losses import mean_absolute_error, mean_squared_error | |
import os | |
import sys | |
%matplotlib inline | |
import matplotlib.pyplot as plt | |
from keras import optimizers |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe("buttons", () => { | |
it("can change class", () => { | |
cy.getById("label_class").select("class1"); | |
dot_mode_coordinates_2.forEach((coordinate) => { | |
cy.get("canvas").click(coordinate.x, coordinate.y); | |
}); | |
cy.get("canvas").matchImageSnapshot("multi_class"); | |
}); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Turkey end-to-end tests chrome headless | |
on: [push] | |
jobs: | |
cypress-run: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: cypress-io/github-action@v2 | |
with: | |
start: npm start |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- uses: actions/upload-artifact@v1 | |
if: failure() | |
with: | |
name: cypress-screenshots | |
path: cypress/screenshots | |
- uses: actions/upload-artifact@v1 | |
if: always() | |
with: | |
name: cypress-videos | |
path: cypress/videos |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
jobs: | |
cypress-run: | |
runs-on: ubuntu-latest | |
container: cypress/included:8.0.0 # this line specifies the docker image we want | |
... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM cypress/included:8.0.0 | |
WORKDIR /app | |
COPY . . | |
RUN npm install | |
ENTRYPOINT ["npm", "run", "test:chrome"] |
OlderNewer