Skip to content
Snippets Groups Projects
Commit 9711bab7 authored by Amira Abdel-Rahman's avatar Amira Abdel-Rahman
Browse files

changed coordinates, robot arm not working

parent bd5133fd
Branches
No related tags found
No related merge requests found
Pipeline #4960 passed
......@@ -14,7 +14,7 @@ three.init();
initGraph();// todo enclose into class
initEditor();// todo enclose into class
var assembler= new Assembler(three,GLOBALS,1,50,[new THREE.Vector3(0,0,0)],[new THREE.Vector3(GLOBALS.gridSize/2.0*GLOBALS.voxelSpacing,0,0)]);
var assembler= new Assembler(three,GLOBALS,1,50,[new THREE.Vector3(GLOBALS.gridSize*GLOBALS.voxelSpacing,0,0)],[new THREE.Vector3(GLOBALS.gridSize*GLOBALS.voxelSpacing,0,GLOBALS.gridSize/2.0*GLOBALS.voxelSpacing)]);
assembler.run();
// old simulation stuff
......
......@@ -69,7 +69,7 @@ document.addEventListener('addNode', function (e) {
var visionDisplay = "Color";
var feeders = [];
let utils = new Utils('errorMessage'); // Class instantiation
let utils1 = new Utils('errorMessage'); // Class instantiation
let streaming = false, connected_to_tinyg = false, printing=false;
var socket_connected = false;
......@@ -315,11 +315,11 @@ document.addEventListener('addNode', function (e) {
start_stop_btn.addEventListener('click', () => {
if (!streaming) {
utils.clearError();
utils.startCamera('vga', onVideoStarted, 'videoInput');
utils1.clearError();
utils1.startCamera('vga', onVideoStarted, 'videoInput');
} else {
utils.stopCamera();
utils1.stopCamera();
onVideoStopped();
}
});
......@@ -475,7 +475,7 @@ document.addEventListener('addNode', function (e) {
$('#canvas_col').append('<canvas id="mycanvas" width=320 height=240><canvas>');
};
utils.loadOpenCv(() => {
utils1.loadOpenCv(() => {
start_stop_btn.removeAttribute('disabled');
cvHasLoaded();
// populateFeederOptions();
......
......@@ -8,7 +8,7 @@ function Utils(errorOutputId) { // eslint-disable-line no-unused-vars
script.setAttribute('async', '');
script.setAttribute('type', 'text/javascript');
script.addEventListener('load', () => {
console.log(cv.getBuildInformation());
// console.log(cv.getBuildInformation());
onloadCallback();
});
script.addEventListener('error', () => {
......
......@@ -118,7 +118,7 @@ function threejs(GLOBALS,utils,containerName,container1Name){
threejs.prototype.init=function() {
this.camera = new THREE.PerspectiveCamera( 45, this.getWidth()/ this.getHeight() , 1, 10000*this.voxelSpacing);
this.camera.position.set( this.gridSize/2*this.voxelSpacing, this.gridSize*this.voxelSpacing*1.0, this.gridSize*this.voxelSpacing*2.5 );
this.camera.position.set( -this.gridSize*this.voxelSpacing*1.0, this.gridSize*this.voxelSpacing, this.gridSize*this.voxelSpacing/2.0 );
this.camera.lookAt( this.gridSize/2, 0, this.gridSize/2 );
this.scene = new THREE.Scene();
this.scene.background = new THREE.Color( 0xffffff );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment