Skip to content

Commit

Permalink
release
Browse files Browse the repository at this point in the history
  • Loading branch information
cfry committed Oct 15, 2018
1 parent 36003fc commit c99fb9a
Show file tree
Hide file tree
Showing 29 changed files with 2,299 additions and 752 deletions.
7 changes: 5 additions & 2 deletions dextersim.js
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ DexterSim = class DexterSim{
shouldnt("In dextersim.process_next_instruction, got an 'h' oplet but this fn shouldn't get 'h' instructions.")
break;
case "P": //pid_move_all_joints
this.robot.pid_angles = ins_args //but not used aug 27, 2018
//this.robot.pid_angles = ins_args //but not used aug 27, 2018. Note this would set DDE's robot object, but we really want to set the SIM robot if anything
dur = this.process_next_instruction_a(Vector.add(ins_args))
break;
case "R": //move_all_joints_relative //no longer used because Dexter.move_all_joints_relative converts to "a" oplet
Expand Down Expand Up @@ -281,7 +281,10 @@ DexterSim = class DexterSim{
var robot_status = this.robot_status_in_arcseconds
let idxs = [Dexter.J1_MEASURED_ANGLE, Dexter.J2_MEASURED_ANGLE, Dexter.J3_MEASURED_ANGLE,
Dexter.J4_MEASURED_ANGLE, Dexter.J5_MEASURED_ANGLE, Dexter.J6_MEASURED_ANGLE, Dexter.J7_MEASURED_ANGLE]

//idxs is 7 long. But we don't want to get more than ins_args because those
//extra args aren't actually passed and it will screw up Kin.predict_move_dur to
//pass in 2 arrays of different lengths.
idxs = idxs.slice(0, ins_args.length) //
let orig_angles = [] //in arcseconds
for(let i of idxs) { orig_angles.push(robot_status[i]) }
//set the angles in this robot's robot_status
Expand Down
119 changes: 74 additions & 45 deletions doc/doc_for_website.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,51 +12,80 @@
}
</style>
<!--<div style="font-weight:400; font-size:18px; font-family:arial; padding-bottom:20px;">Dexter Development Environment Documentation</div>-->
<div class="doc_top_level_summary">Overview</div>
<iframe width=600 height=200 class="doc_iframe" allowtransparency="true"
src="https://rawgit.com/cfry/dde/master/doc/dde_overview/Dexter_Development_Environment.html">
</iframe>
<br/><div class="doc_top_level_summary">Browser vs. DDE</div>
<iframe width=600 height=200 class="doc_iframe"
src="https://rawgit.com/cfry/dde/master/doc/browser_vs_dde.html">
</iframe>
<br/><div class="doc_top_level_summary">A Mental Model of Memory</div>
<iframe width=600 height=200 class="doc_iframe"
src="https://rawgit.com/cfry/dde/master/doc/mental_model_of_memory.html">
</iframe>
<br/><div class="doc_top_level_summary">How to Think Like a Computer</div>
<iframe width=600 height=200 class="doc_iframe"
src="https://rawgit.com/cfry/dde/master/doc/eval.html">
</iframe>
<br/><div class="doc_top_level_summary">The Language of Music</div>
<iframe width=600 height=200 class="doc_iframe"
src="https://rawgit.com/cfry/dde/master/doc/music.html">
</iframe>
<br/><div class="doc_top_level_summary">Dexter Kinematics</div>
<iframe width=600 height=200 class="doc_iframe"
src="https://rawgit.com/cfry/dde/master/doc/dexter_kinematics.html">
</iframe>

<br/><div class="doc_top_level_summary">Glossary</div>
<iframe width=600 height=200 class="doc_iframe"
src="https://rawgit.com/cfry/dde/master/doc/glossary.html">
</iframe>
<br/><div class="doc_top_level_summary">User Guide</div>
<iframe width=600 height=200 class="doc_iframe"
src="https://rawgit.com/cfry/dde/master/doc/guide.html">
</iframe>
<br/><div class="doc_top_level_summary">Reference Manual</div>
<iframe width=600 height=200 class="doc_iframe"
src="https://rawgit.com/cfry/dde/master/doc/ref_man.html">
</iframe>
<br/><div class="doc_top_level_summary">Release Notes</div>
<iframe width=600 height=200 class="doc_iframe"
src="https://rawgit.com/cfry/dde/master/doc/release_notes.html">
</iframe>
<br/><div class="doc_top_level_summary">Known Issues</div>
<iframe width=600 height=200 class="doc_iframe"
src="https://rawgit.com/cfry/dde/master/doc/known_issues.html">
</iframe>
<details class="doc_top_level_summary"><summary>Getting Started</summary>
<iframe width=600 height=400 class="doc_iframe"
src="https://rawgit.com/cfry/dde/master/doc/getting_started.html">
</iframe>
</details>

<details class="doc_top_level_summary"><summary>User Guide</summary>
<iframe width=600 height=400 class="doc_iframe"
src="https://rawgit.com/cfry/dde/master/doc/guide.html">
</iframe>
</details>

<details class="doc_top_level_summary"><summary>Reference Manual</summary>
<iframe width=600 height=400 class="doc_iframe"
src="https://rawgit.com/cfry/dde/master/doc/ref_man.html">
</iframe>
</details>

<details class="doc_top_level_summary"><summary>Articles</summary>

<details class="doc_top_level_summary"><summary>Overview</summary>
<iframe width=600 height=400 class="doc_iframe" allowtransparency="true"
src="https://rawgit.com/cfry/dde/master/doc/dde_overview/Dexter_Development_Environment.html">
</iframe>
</details>

<details class="doc_top_level_summary"><summary>Browser vs. DDE</summary>
<iframe width=600 height=400 class="doc_iframe"
src="https://rawgit.com/cfry/dde/master/doc/browser_vs_dde.html">
</iframe>
</details>

<details class="doc_top_level_summary"><summary>A Mental Model of Memory</summary>
<iframe width=600 height=400 class="doc_iframe"
src="https://rawgit.com/cfry/dde/master/doc/mental_model_of_memory.html">
</iframe>
</details>

<details class="doc_top_level_summary"><summary>How to Think Like a Computer</summary>
<iframe width=600 height=400 class="doc_iframe"
src="https://rawgit.com/cfry/dde/master/doc/eval.html">
</iframe>
</details>

<details class="doc_top_level_summary"><summary>The Language of Music</summary></div>
<iframe width=600 height=400 class="doc_iframe"
src="https://rawgit.com/cfry/dde/master/doc/music.html">
</iframe>
</details>

<details class="doc_top_level_summary"><summary>Dexter Kinematics</summary></div>
<iframe width=600 height=400 class="doc_iframe"
src="https://rawgit.com/cfry/dde/master/doc/dexter_kinematics.html">
</iframe>
</details>

<details class="doc_top_level_summary"><summary>Glossary</summary></div>
<iframe width=600 height=400 class="doc_iframe"
src="https://rawgit.com/cfry/dde/master/doc/glossary.html">
</iframe>
</details>
</details>

<details class="doc_top_level_summary"><summary>Release Notes</summary>
<iframe width=600 height=400 class="doc_iframe"
src="https://rawgit.com/cfry/dde/master/doc/release_notes.html">
</iframe>
</details>

<details class="doc_top_level_summary"><summary>Known Issues</summary></div>
<iframe width=600 height=400 class="doc_iframe"
src="https://rawgit.com/cfry/dde/master/doc/known_issues.html">
</iframe>
</details>



Expand Down
79 changes: 79 additions & 0 deletions doc/getting_started.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@

<!-- Does not have download instructions. -->
<div style="font-size:16px;">
Dexter Development Environment is fundamentally a tool for
creating JavaScript programs.
In addition, it has special support for controlling the Dexter robot.

<h4>Configuring DDE</h4>
DDE requires that you create a folder under your Documents folder named <samp> dde_apps</samp>.
If this does not exist when you launch DDE, you'll see a warning in the <i>Output pane</i>.

<h4>The User Interface</h4>
DDE has 4 panes.
<ul><li>The <i>Editor pane</i> is in the upper left. Here's where you enter JavaScript
to control Dexter. You can type or paste in code. You can also use the
<button>Learn JS&#9660;</button>, <button>Insert&#9660;</button>, <button>Series&#9660;</button> and <button>Jobs&#9660;</button>
menus in the menu bar to insert vanilla JavaScript or
DDE-specific code.</li>
<li>The <i>Output pane</i> is in the lower left. DDE displays useful information here.</li>
<li>The <i>Documentation pane</i> is in the upper right.</li>
<li>The <i>Simulation pane</i> is in the lower right. Here a simple visualization of
Dexter is shown so you can see what your Dexter instructions will do
before you connect to an actual Dexter.</li>
</ul>

<h4>Evaluation</h4>
To run JavaScript source code, you feed it to a function called <code>eval</code>.
DDE makes this easy with its <button>Eval</button> button.
If there is a text selection when you click the button, that text will
be evaled. If there's not, the whole content of the <i>Editor pane</i> will be evaled.<br/>
By evaling early and often, you can test small snippets of JavaScript and
make debugging your program easier.
<p></p>
Try this:
<ol>
<li> Select the following JavaScript source code:<br/>
<code> 2 + 3 * 4 </code></li>
<li>Click the <button>Eval</button> button in the header for the <i>Output pane</i>.</li>
<li>You should see <code>14</code> in the <i>Output pane</i>.</li>
<li>Select the code again but this time copy it with Ctrl-C (on Mac, cmd-C).</li>
<li>Paste it by clicking in the <i>Editor pane</i> and hitting Ctrl-V (on Mac, cmd-V)</li>
<li>Click the <button>Eval</button> button</li>
<li>You should see <code>14</code> printed again in the <i>Output pane</i>.</li>
<li>Select just <code> 3 * 4 </code> in the <i>Editor pane</i>.</li>
<li>Click the <button>Eval</button> button</li>
<li>You should see <code>12</code> in the <i>Output pane</i>.</li>
</ol>
If you don't know JavaScript, insert items from the
<button>Learn JS&#9660;</button> menu and play.

<h4>Jobs</h4>
Dexter is controlled by writing a small app which we call a "Job".
This wraps up a sequence of instructions to be run, one after another,
along with some other information, for controlling a robot.
<p></p>
You can insert example Jobs from the <button>Jobs&#9660;</button> menu.<br/>
<ol><li>Clear your editor by selecting the text and hitting the DELETE
or BACKSPACE key.</li>
<li>Choose Jobs Menu/Insert Example/Dexter-moving</li>
<li>Most of this text is comments explaining this Job.</li>
<li>Click the <button>Eval</button> button</li>
<li>Observe a new gray button in the <i>Output pane</i> header with the name of the
Job that you just defined.</li>
<li>Click this button to start the Job</li>
<li>Observe an animation of Dexter in the <i>Simulation pane</i>.</li>
<li> The button changes colors to indicate the Job's status.
It turns green when its Job is running and purple when its done.
A tooltip on the button appears when you hover the mouse over it.</li>
<li>Clicking a Job's button will start it if its stopped, and
stop it if its running.</li>
</ol>

<h4>Getting Help</h4>
There's a LOT more documentation.
We encourage you to read the <b>User Guide</b>.
At the bare minimun, please click the
<span style="font-weight:700;font-size:20px;color:blue;">?</span>
in the upper right of the <i>Doc pane</i> for help on getting help, including videos.
</div>
51 changes: 40 additions & 11 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">2.5.4</span><br/>
released: <span id="dde_release_date_id">Sep 6, 2018</span>
version: <span id="dde_version_id">???</span><br/>
released: <span id="dde_release_date_id">???</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 All @@ -26,9 +26,9 @@
By providing a general purpose language that is broad enough to cover all the bases,
yet detailed enough to specify the action details, users can specify the
precise behavior they desire.
We've extended JavaScript, most common web page programming language,
We've extended JavaScript, the most common web page programming language,
with dexter-specific functions like
"move" and ways to gets values from its sensors (like camera").
"move" and ways to get values from sensors (like cameras).
This allows you to specify things like:
<i>If part X is in the workspace, then move it 10 millimeters to its left</i>.
<br/><br/>
Expand Down Expand Up @@ -60,12 +60,13 @@
</details>
<details class="doc_details"><summary>Installation</summary>
<details class="doc_details"><summary>First Install</summary>
To get the latest DDE release,
To get the latest DDE release, start the process by:
<ul><li> Browse <a href="https://github.com/cfry/dde/releases/latest" target="_blink">Github</a></li>
<li> Click on the file for your operating system:
<ul><li>For Windows: <samp>.exe</samp></li>
<li>For Mac: <samp>.dmg</samp></li>
<li>For Linux: <samp>.AppImage</samp> </li>
<li>Sorry, other OS's like ChromeOS are not now supported.</li>
</ul></li>
<li> The clicked file will be copied to your downloads folder.
For Windows and Mac, you may have to click on it to
Expand Down Expand Up @@ -212,7 +213,7 @@
First, make sure your cable is plugged into and firmly seating in
both your computer and Dexter.<br/>
<b>On Windows 7:</b>
<ol><li>Go to Start/Control Panel<li>
<ol><li>Go to Start/Control Panel</li>
<li>Click on: "Network and Sharing Center"</li>
<li>In the left column, click on "Change adapter settings".</li>
<li>In the new dialog, click right on "Local Area Connection" and </li>
Expand Down Expand Up @@ -277,11 +278,22 @@
or<br/><samp>Host is down</samp>
several times.
<p></p>
To stop the output of ping, type Cottrol_c.
<p></p>
Use Jobs menu/simulate submenu, and select <b>false</b>
<p></p>
You should now be able to move Dexter from DDE.
For instance, choose Jobs menu/Run Insruction/NEUTRAL_ANGLES
or, in case the robot is already at NEUTRAL_ANGLES,
choose Jobs menu/Run Insruction/HOME_ANGLES,
and Dexter should move.
<p></p>
Problems with data connectively can be do to an improper IP address of your Dexter,
i.e. at some other address than 192.168.1.142. It might also have to do
with its "MAC" address (nothing to do with "Macintosh") not being correctly set.
You can use an IP scanner to see what devices are connected to your computer.
There are many available on the net.
You can use an IP scanner to see what devices are connected to your computer,
including a Dexter robot.
There are many such apps available on the net.
We suggest:
<ul><li>Windows OS: <a target="_blank" href="http://www.advanced-ip-scanner.com/">
Advanced IP Scanner</a></li>
Expand All @@ -292,6 +304,12 @@
but requires a Java SDK to be installed.
</li>
</ul>
If you have just one Dexter, use the correct IP address to redefine
dexter0 in your dde_apps/init_dde.js file like so:
<pre><code>
new Dexter({name: "dexter0", ip_address: "192.168.1.142"})
</code></pre>
You can insert the definition of a Dexter in the Jobs menu/Run Instruction/Show Dialog.
</details> <!-- end Data Connectivity -->

<details class="doc_details"><summary>Verify Joint Wiring</summary>
Expand Down Expand Up @@ -485,9 +503,11 @@ <h5>Step 3</h5>
You can also browse the <b>Release Notes</b> before installing a version.<p></p></li>
<li><b>tooltips</b> Many menu items and buttons provide concise help. Place the
mouse over the item and don't move it for a couple of seconds.<p></p></li>
<li><b>code examples</b> DDE's Learn JS, Insert, and Job menus let you insert,
<li><b>code examples</b> DDE's
<button>Learn JS&#9660;</button>, <button>Insert&#9660;</button>, <button>Series&#9660;</button> and <button>Jobs&#9660;</button> menus let you insert,
into the editor buffer,
practical examples of JavaScript which you can then customize to your needs.<p></p></li>
practical examples of JavaScript which you can then customize to your needs.
<p></p></li>
<li><b>TestSuite</b> DDE's test suite is used primarily to verify functionality.
But you can also use the Test/Insert All menu item to
see the source code of many of the tests. This will generally
Expand Down Expand Up @@ -1199,7 +1219,16 @@ <h5>Step 3</h5>
<p></p>
Each Test Suite has a name and an array of <i>tests</i>.
A <i>test</i> is composed of an array of 1, 2, or 3 literal strings.
<ol><li>A literal string of JavaScript code to evaluate that returns a value to be tested.</li>
<ol><li>A literal string of JavaScript code to evaluate that
returns a value to be tested.
If that string evals to an instance of a Job,
then the rest of the test array is ignored, the
job is started, and the running of the test suite
is suspended until the job has finished.
Then the test suite is resumed at the next instruction
after the Job-defining test. Subsequent tests can now
verify values in the finished job.
</li>
<li>The expected value of the above JavaScript code, also represented by
a literal string of JavaScript.</li>
<li>A literal string of a comment to aid in understanding the purpose or behavior of this test.
Expand Down
Loading

0 comments on commit c99fb9a

Please sign in to comment.