Skip to content

Commit

Permalink
release
Browse files Browse the repository at this point in the history
  • Loading branch information
cfry committed Oct 11, 2019
1 parent 5682ae3 commit b08f0d1
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 172 deletions.
3 changes: 3 additions & 0 deletions doc/release_notes.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
}
.doc_details summary { font-weight: 600; }
</style>
<details class="doc_details"><summary>v 2.5.17, Oct 11, 2019</summary>
The definition for the function <code>init_view_eye</code> has been updated.
</details>

<details class="doc_details"><summary>v 2.5.16, Oct 3, 2019</summary>
<ul>
Expand Down
222 changes: 52 additions & 170 deletions low_level_dexter/ViewEyeRealTime.js
Original file line number Diff line number Diff line change
Expand Up @@ -204,178 +204,60 @@ function display_center_guess(){
function init_view_eye(){
//this table has to be here rather than top level in the file even though it is static,
//because _nbits_cf and the other units cause errors if referenced at top level.

AxisTable = [[[400/_nbits_cf, 0, 0, 0, 0], Dexter.J1_A2D_SIN, Dexter.J1_A2D_COS, [-648000*_arcsec, 0, 0, 0, 0], 1240, [0, 0, 0, 0, 0]],
[[0, 400/_nbits_cf, 0, 0, 0], Dexter.J2_A2D_SIN, Dexter.J2_A2D_COS, [0, -324000*_arcsec, 0, 0, 0], 1900, [0, 0, 0, 0, 0]],
[[0, 0, 400/_nbits_cf, 0, 0], Dexter.J3_A2D_SIN, Dexter.J3_A2D_COS, [0, 0, -500000*_arcsec, 0, 0], 1500, [0, 0, 0, 0, 0]],
[[0, 0, 0, 400/_nbits_cf, 0], Dexter.J4_A2D_SIN, Dexter.J4_A2D_COS, [0, 0, 0, -190000*_arcsec, 0], 1800, [0, 0, 0, 0, 0]],
[[0, 0, 0, 0, 400/_nbits_cf], Dexter.J5_A2D_SIN, Dexter.J5_A2D_COS, [0, 0, 0, 0, -148000*_arcsec], 4240, [0, 0, 0, 0, 0]]]

AxisTable = [[[800/_nbits_cf, 0, 0, 0, 0], Dexter.J1_A2D_SIN, Dexter.J1_A2D_COS, [-648000*_arcsec, 0, 0, 0, 0], 1240 / 2, [0, 0, 0, 0, 0]],
[[0, 800/_nbits_cf, 0, 0, 0], Dexter.J2_A2D_SIN, Dexter.J2_A2D_COS, [0, -324000*_arcsec, 0, 0, 0], 1900 / 2, [0, 0, 0, 0, 0]],
[[0, 0, 800/_nbits_cf, 0, 0], Dexter.J3_A2D_SIN, Dexter.J3_A2D_COS, [0, 0, -500000*_arcsec, 0, 0], 1500 / 2, [0, 0, 0, 0, 0]],
[[0, 0, 0, 800/_nbits_cf, 0], Dexter.J4_A2D_SIN, Dexter.J4_A2D_COS, [0, 0, 0, -190000*_arcsec, 0], 1800 / 2, [0, 0, 0, 0, 0]],
[[0, 0, 0, 0, 800/_nbits_cf], Dexter.J5_A2D_SIN, Dexter.J5_A2D_COS, [0, 0, 0, 0, -148000*_arcsec], 4240 / 2, [0, 0, 0, 0, 0]]]

window.cal_working_axis = undefined //global needed by calibrate_ui.js




new Job({name: "CalSensors", keep_history: true, show_instructions: false,
inter_do_item_dur: .5 * _ms,
robot: cal_get_robot(),
do_list: [ Dexter.move_all_joints(0, 0, 0, 0, 0),
Robot.label("loop_start"),
make_ins("w", 42, 64),
make_ins("S", "J1BoundryHigh",648000*_arcsec),
make_ins("S", "J1BoundryLow",-648000*_arcsec),
make_ins("S", "J2BoundryLow",-350000*_arcsec),
make_ins("S", "J2BoundryHigh",350000*_arcsec),
make_ins("S", "J3BoundryLow",-570000*_arcsec),
make_ins("S", "J3BoundryHigh",570000*_arcsec),
make_ins("S", "J4BoundryLow",-490000*_arcsec),
make_ins("S", "J4BoundryHigh",490000*_arcsec),
make_ins("S", "J5BoundryLow",-648000*_arcsec),
make_ins("S", "J5BoundryHigh",648000*_arcsec),

make_ins("S", "MaxSpeed", 25*_deg/_s),
make_ins("S", "Acceleration",0.000129),
make_ins("S", "StartSpeed",.7),
//scan_axis(),
smLinex,
display_center_guess,
make_ins("S", "MaxSpeed",13),
make_ins("S", "Acceleration",1/_nbits_cf),
make_ins("S", "StartSpeed",.05),
function(){
if(cal_is_loop_checked(window.cal_working_axis+1)){ //if looping
return [
function(){cal_clear_points()},
function(){return smLinex(true)},
function(){cal_clear_points()},
Dexter.go_to("loop_start")
]
}
},
Dexter.move_all_joints(0, 0, 0, 0, 0),
Dexter.empty_instruction_queue,
function() {
let J_num = window.cal_working_axis+1
let start_button_dom_elt = window["Start_J_" + J_num + "_id"]
start_button_dom_elt.style.backgroundColor = "rgb(230, 179, 255)"
cal_instructions_id.innerHTML =
"Click in the center of the dot_pattern circle.<br/>"}
]})

/*
new Job({
name: "job_00",
keep_history: false,
show_instructions: false,
inter_do_item_dur: 0,
new Job({name: "CalSensors", keep_history: true, show_instructions: false,
inter_do_item_dur: .5 * _ms,
robot: cal_get_robot(),
user_data: {
dex_filepath: "/srv/samba/share/AdcCenters.txt"
},
do_list: [
function(){
out("Attempting to read AdcCenters.txt from robot with IP: " + this.robot.ip_address + "...")
return [
Dexter.read_from_robot(this.user_data.dex_filepath, "read_results"),
make_ins("F")
]
},
function(){
let original_content = this.user_data.read_results
let my_file_content = out(original_content)
let content_array = original_content.split("\r\n")
centers_string = []
for(let i = 0; i < 10; i++){
centers_string.push(content_array[i])
}
// Switched J2 and J3
let temp_string = centers_string[4]
centers_string[4] = centers_string[2]
centers_string[2] = temp_string
temp_string = centers_string[5]
centers_string[5] = centers_string[3]
centers_string[3] = temp_string
}
]
})
Job.job_00.start()
*/


/*
//Old Code:
try{
//debugger
let original_content = file_content(path)
let content_array = original_content.split("\r\n")
centers_string = []
for(let i = 0; i < 10; i++){
//centers_string.push(content_array[i], content_array[i+1])
centers_string.push(content_array[i])
}
// Switched J2 and J3
let temp_string = centers_string[4]
centers_string[4] = centers_string[2]
centers_string[2] = temp_string
temp_string = centers_string[5]
centers_string[5] = centers_string[3]
centers_string[3] = temp_string
}
catch(err) {
warning("DDE was unable to connect to Dexter's file system.<br/>A full calibration can still be completed without this connection.<br/>This occurs when running on a Mac OS, not being connected to Dexter, or a accessing a non-existent file.<br/>The calibration file is named:<br/><code title='unEVALable'> " + path)
centers_string = ["0x0000000", "0x0000000", "0x0000000", "0x0000000", "0x0000000", "0x0000000", "0x0000000", "0x0000000", "0x0000000", "0x0000000"]
}
*/

//console.log("Attempting to connect to " + robot_to_calibrate_id.value +"...")
//out("Attempting to connect to " + robot_to_calibrate_id.value +"...", "blue")
/*
let path_exists_state
setTimeout(function(){
path_exists_state = file_exists(path)
}, 100)
if(path_exists_state){
let original_content = file_content(path)
let content_array = original_content.split("\r\n")
centers_string = []
for(let i = 0; i < 10; i++){
//centers_string.push(content_array[i], content_array[i+1])
centers_string.push(content_array[i])
}
// Switched J2 and J3
let temp_string = centers_string[4]
centers_string[4] = centers_string[2]
centers_string[2] = temp_string
temp_string = centers_string[5]
centers_string[5] = centers_string[3]
centers_string[3] = temp_string
}else{
warning("DDE was unable to connect to Dexter's file system.<br/>A full calibration can still be completed without this connection.<br/>This occurs when running on a Mac OS, not being connected to Dexter, or a accessing a non-existent file.<br/>The calibration file is named:<br/><code title='unEVALable'> " + path)
centers_string = ["0x0000000", "0x0000000", "0x0000000", "0x0000000", "0x0000000", "0x0000000", "0x0000000", "0x0000000", "0x0000000", "0x0000000"]
}
*/



do_list: [ Dexter.move_all_joints(0, 0, 0, 0, 0),
Robot.label("loop_start"),
make_ins("w", 42, 64),
make_ins("S", "J1BoundryHigh",648000*_arcsec),
make_ins("S", "J1BoundryLow",-648000*_arcsec),
make_ins("S", "J2BoundryLow",-350000*_arcsec),
make_ins("S", "J2BoundryHigh",350000*_arcsec),
make_ins("S", "J3BoundryLow",-570000*_arcsec),
make_ins("S", "J3BoundryHigh",570000*_arcsec),
make_ins("S", "J4BoundryLow",-490000*_arcsec),
make_ins("S", "J4BoundryHigh",490000*_arcsec),
make_ins("S", "J5BoundryLow",-648000*_arcsec),
make_ins("S", "J5BoundryHigh",648000*_arcsec),

make_ins("S", "MaxSpeed", 25*_deg/_s),
make_ins("S", "Acceleration",0.00129),
make_ins("S", "StartSpeed",5),
//scan_axis(),
smLinex,
display_center_guess,
make_ins("S", "MaxSpeed",40),
make_ins("S", "Acceleration",0.00129),
make_ins("S", "StartSpeed",5),
function(){
if(cal_is_loop_checked(window.cal_working_axis+1)){ //if looping
return [
function(){cal_clear_points()},
function(){return smLinex(true)},
function(){cal_clear_points()},
Dexter.go_to("loop_start")
]
}
},
Dexter.move_all_joints(0, 0, 0, 0, 0),
Dexter.empty_instruction_queue,
function() {
let J_num = window.cal_working_axis+1
let start_button_dom_elt = window["Start_J_" + J_num + "_id"]
start_button_dom_elt.style.backgroundColor = "rgb(230, 179, 255)"
cal_instructions_id.innerHTML =
"Click in the center of the dot_pattern circle.<br/>"}
]})
cal_init_view_eye_state = false
}
}


4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "dexter_dev_env",
"productName": "dexter_dev_env",
"version": "2.5.16",
"release_date": "Oct 3, 2019",
"version": "2.5.17",
"release_date": "Oct 11, 2019",
"description": "Dexter Development Environment",
"author": "Fry",
"license": "GPL-3.0",
Expand Down

0 comments on commit b08f0d1

Please sign in to comment.