Skip to content

Commit

Permalink
release
Browse files Browse the repository at this point in the history
  • Loading branch information
cfry committed Sep 12, 2023
1 parent 0f9668d commit f04d06a
Show file tree
Hide file tree
Showing 6 changed files with 80 additions and 107 deletions.
4 changes: 2 additions & 2 deletions core/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
global.dde_version = "3.8.15" //require("../package.json").version
global.dde_release_date = "Sep 24, 2023" //require("../package.json").release_date
global.dde_version = "3.8.16" //require("../package.json").version
global.dde_release_date = "Sep 12, 2023" //require("../package.json").release_date

console.log("dde_version: " + global.dde_version + " dde_release_date: " + global.dde_release_date +
"\nRead electron_dde/core/job_engine_doc.txt for how to use the Job Engine.\n")
Expand Down
4 changes: 2 additions & 2 deletions doc/guide.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

<details class="doc_details"><summary>About</summary>
This is <a href="http://hdrobotic.com/" target="_blank">Dexter</a> Development Environment<br/>
version: <span id="dde_version_id">3.8.15</span><br/>
released: <span id="dde_release_date_id">Sep 9, 2023</span>
version: <span id="dde_version_id">3.8.16</span><br/>
released: <span id="dde_release_date_id">Sep 12, 2023</span>
<p></p>
DDE helps you create, debug, and send software to a Dexter robot.
You can use any JavaScript augmented with DDE-specific functions to help find out about,
Expand Down
13 changes: 13 additions & 0 deletions doc/release_notes.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,19 @@
.doc_details summary { font-weight: 600; }
</style>

<details class="doc_details"><summary>v 3.8.16, Sep 12, 2023</summary>
Highlights: Bug fixes to the Calibration dialog box.
<ul>
<li>In calibrate_ui.js, removed the first def of init_calibrate as that was
just getting overwritten with the 2nd.</li>
<li>In calibrate_ui.js, increased the window height to 660 to get rid of the vertical scroll bar
in some situations.</li>
<li>New version of function: <code>init_view_eye</code> in file: ViewEyeRealTime.js
and other fixes for the new number widgets at the bottom of the dialog involving
"Number("</li>
</ul>
</details>

<details class="doc_details"><summary>v 3.8.15, Sep 8, 2023</summary>
Highlights: defaults.makeins and Calibrate Dexter dialog improved.
<ul>
Expand Down
72 changes: 60 additions & 12 deletions low_level_dexter/ViewEyeRealTime.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,19 @@ function smLinex(run_backwards = false){
result.push (make_ins("F"))
//out(run_backwards)
for (let j = 0;j < size;j++){
if(j === 0){
result.push([
make_ins("S", "MaxSpeed", Number(RapidSpeed_id.value)),
make_ins("S", "Acceleration",0.0001),
make_ins("S", "StartSpeed",0),
])
}else if(j === 1){
result.push([
make_ins("S", "MaxSpeed", Number(MaxSpeed_id.value)),
make_ins("S", "Acceleration",Number(Accel_id.value)),
make_ins("S", "StartSpeed",Number(StartSpeed_id.value)),
])
}
let i = j
if(run_backwards){
i = size - j
Expand Down Expand Up @@ -201,6 +214,19 @@ function display_center_guess(){
append_in_ui("svg_id", thehtml)
}

function update_step_size(){
let step_size = Number(StepSize_id.value)
out("Setting Step Size: " + step_size)
AxisTable = [
[[step_size, 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, step_size, 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, step_size, 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, step_size, 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, step_size], Dexter.J5_A2D_SIN, Dexter.J5_A2D_COS, [0, 0, 0, 0, -148000*_arcsec], 4240 / 2, [0, 0, 0, 0, 0]]
]
//TODO: this will fail if the joint is looping and the sign of step size in negative
}

var old_point_color = "#dedede"

var cal_saved_points_old
Expand Down Expand Up @@ -248,23 +274,29 @@ function DisplayOldEyePoints(J_num)
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 = [[[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]]]
//let step_size = 800/_nbits_cf


update_step_size()
/*
let step_size =
AxisTable = [[[step_size, 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, step_size, 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, step_size, 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, step_size, 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, step_size], 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: [
function()
{
let J_num = window.cal_working_axis+1
DisplayOldEyePoints(J_num)
},
make_ins("S", "MaxSpeed", Number(RapidSpeed_id.value)),
make_ins("S", "Acceleration",0.0001),
make_ins("S", "StartSpeed",0),
Dexter.move_all_joints(0, 0, 0, 0, 0),
Robot.label("loop_start"),
make_ins("w", 42, 64),
Expand All @@ -279,15 +311,25 @@ function init_view_eye(){
make_ins("S", "J5BoundryLow",-648000*_arcsec),
make_ins("S", "J5BoundryHigh",648000*_arcsec),

make_ins("S", "MaxSpeed", Number(MaxSpeed_id.value)),
make_ins("S", "Acceleration",Number(Accel_id.value)),
make_ins("S", "StartSpeed",Number(StartSpeed_id.value)),

/*
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 [
Expand All @@ -298,15 +340,21 @@ function init_view_eye(){
]
}
},
make_ins("S", "MaxSpeed", Number(RapidSpeed_id.value)),
make_ins("S", "Acceleration",0.0001),
make_ins("S", "StartSpeed",0),
Dexter.empty_instruction_queue,
Robot.wait_until(1),
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."
}
"Click in the center of the dot_pattern circle.<br/>"
},
Dexter.set_parameter("RunFile", "Defaults.make_ins")
]})
cal_init_view_eye_state = false
}
Expand Down
90 changes: 1 addition & 89 deletions low_level_dexter/calibrate_ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -456,95 +456,7 @@ function init_calibrate()
//init_calibrate_optical() //will define (or redefine the calibrate_optical job, which is ok)
show_window({
title:"Eye Center Calibration",
x:680, y: 0, width:680, height: 650,
//x:325, y: 0, width:680, height: 640,
content:
"1. Choose a Dexter to calibrate: " + make_dexter_robot_menu_html() + "<br/>" +
"2. <span id='cal_instructions_id'>Calibrate optical sensors by<br/>&nbsp;&nbsp;&nbsp;&nbsp;choosing each joint to calibrate.</span><br/>" +
"<table style='margin:0px;padding:0px;'><tr><td style='margin:0px;padding-right:10px;background-color:#ffc69e;'>" +
make_calibrate_joint_buttons_html() +
"</td><td><table style='border-collapse:collapse !important;border;0px;'><tr><td>" +
//"<div style='width:20px;height:410px;display:inline-block; transform:rotateZ(-90deg);'>" +
// " Right potentiometer: &nbsp;Clockwise pot rotation &rarr;" +
// "</div></td><td>" +
svg_svg({width:20, height:410, child_elements: [svg_text({x:0, y:380, transform: 'rotate(-90 15 380)',
text:'Left potentiometer: &nbsp;Clockwise pot rotation &rarr;'
})]}) + "</td><td>" +
svg_svg({id: "svg_id", height: window.cal_svg_height, width: window.cal_svg_height,
html_class: "clickable", style:"background-color:white;",
child_elements: [
svg_text({text: "X Axis", x: 150, y: 400, size: 30, color: "#DDDDDD", border_width: 1, border_color: "black", style: 'font-weight:bold;'}),
svg_text({text: "Y Axis", x: 30, y: 250, size: 30, color: "#DDDDDD", border_width: 1, border_color: "black", style: 'font-weight:bold;', transform: 'rotate(-90 30 250)'}),
]}) +
"</td></tr><tr style='border-collapse:collapse;'><td style='border-collapse:collapse;'></td><td>&nbsp;&nbsp;&nbsp;&nbsp;Right potentiometer: &nbsp;Clockwise pot rotation &rarr;</td></tr>" +
"</table></td></tr></table>" +


"Legend: &nbsp;&nbsp;&nbsp;" +
"<span class='dot' style='height:10px;width:10px;background-color:blue;display:inline-block;border-radius: 50%'></span>"
+ " = Previous Center &nbsp;&nbsp;&nbsp;" +
"<span class='dot' style='height:10px;width:10px;background-color:green;display:inline-block;border-radius: 50%'></span>"
+ " = Predicted Center &nbsp;&nbsp;&nbsp;" +
"<span class='dot' style='height:10px;width:10px;background-color:red;display:inline-block;border-radius: 50%'></span>"
+ " = Center to Save" +

"<br><br>" +
"MaxSpeed: " +
"<input id='MaxSpeed_id' title='MaxSpeed value during\neye center calibration\ndefault = 25\nunits = (deg/s)' type='number' style='width:45px;' value='25'/>" +
" Accel: " +
"<input id='Accel_id' title='Accleration value during\neye center calibration\ndefault = 0.001\nunits = N/A' type='number' style='width:65px;' value='0.001'/>" +
" StartSpeed: " +
"<input id='StartSpeed_id' title='StartSpeed value during\neye center calibration\ndefault = 5\nunits = (deg/s)' type='number' style='width:45px;' value='5'/>" +
" StepSize: " +
"<input id='StepSize_id' title='StepSize value during\neye center calibration\ndefault = 0.1\nunits = deg'type='number' style='width:45px;' value='0.1' onchange='update_step_size()'/>" +
" RSpeed: " +
"<input id='RapidSpeed_id' title='RapidSpeed for movements\nbefore and after eye\ncenter calibration\ndefault = 25\nunits = (deg/s)' type='number' style='width:45px;' value='25'/>"


/*
"3. <input type='button' id='calibrate_optical_id' style='margin-top:10px;' title='Do each time you turn on Dexter.'" +
"value='Calibrate optical encoders'/>" +
`&nbsp&nbsp4. <input type='button' style='margin-top:10px;' title='Click to start FindHome Job'
value='Start FindHome'>
</button> &nbsp(Experimental)`,
*/
/*
"3. <input type='button' id='calibrate_optical_id' style='margin-top:10px;' title='Do each time you turn on Dexter.'" +
"value='Calibrate optical encoders'/>",
*/

, callback: handle_cal
})
open_doc(calibrate_doc_id)
setTimeout(cal_reset_ranges, 200)
setTimeout(function(){
try{
//this errors when the robot to calibrate hasn't been chosen yet
let robot_sim = Robot[robot_to_calibrate_id.value].simulate
let sim_actual = Robot.get_simulate_actual(robot_sim)
if(sim_actual === true){
//show_window({content: "Don't Sim"})
open_doc(simulate_doc_id)
confirm("Warning: Simulate is set to true so calibration window will not work. \nTo set to false, choose Jobs menu/Simulate/false.")
}
else if (Dexter.all_names.length === 1) { cal_init_robot() } //Fry added Oct 19, 2018
}catch(err){

}
}, 1000)
}

function init_calibrate()
{
//this has been moved because the robot isn't known yet
//init_view_eye() //will define (or redefine the view eye job, which is ok)
cal_init_view_eye_state = true


//init_calibrate_optical() //will define (or redefine the calibrate_optical job, which is ok)
show_window({
title:"Eye Center Calibration",
x:680, y: 0, width:680, height: 650,
x:680, y: 0, width:680, height: 660,
//x:325, y: 0, width:680, height: 640,
content:
"1. Choose a Dexter to calibrate: " + make_dexter_robot_menu_html() + "<br/>" +
Expand Down
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": "3.8.15",
"release_date": "Sep 8, 2023",
"version": "3.8.16",
"release_date": "Sep 12, 2023",
"description": "Dexter Development Environment for programming the Dexter robot.",
"author": "Fry",
"license": "GPL-3.0",
Expand Down

0 comments on commit f04d06a

Please sign in to comment.