FreeCAD-Doc/localwiki/Robot_6-Axis-cs.html
2018-07-19 18:47:02 -05:00

606 lines
18 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<html><head><title>Robot 6-Axis/cs</title><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><link type='text/css' href='wiki.css' rel='stylesheet'></head><body><h1>Robot 6-Axis/cs</h1></div>
<div id="mw-content-text" lang="cs" dir="ltr" class="mw-content-ltr"><hr/><div class="mw-parser-output"><table class="fcinfobox wikitable ct" style="width: 230px; float: right; margin-left: 1em">
<tr>
<td class="ctTitle">
<h3><span class="mw-headline" id="Tutorial"><a href="https://www.freecadweb.org/wiki/index.php?title=File:Base_ExampleCommandModel.png" class="image"><img alt="Base ExampleCommandModel.png" src="32px-Base_ExampleCommandModel.png" width="32" height="30" srcset="/wiki/images/thumb/9/93/Base_ExampleCommandModel.png/48px-Base_ExampleCommandModel.png 1.5x, /wiki/images/9/93/Base_ExampleCommandModel.png 2x" /></a> Tutorial</span></h3>
</td></tr>
<tr>
<th class="ctOdd">Topic
</th></tr>
<tr>
<td class="ctEven">Robot Workbench
</td></tr>
<tr>
<th class="ctOdd">Level
</th></tr>
<tr>
<td class="ctEven">Intermediate
</td></tr>
<tr>
<th class="ctOdd">Time to complete
</th></tr>
<tr>
<td class="ctEven">Unknown
</td></tr>
<tr>
<th class="ctOdd">Author
</th></tr>
<tr>
<td class="ctEven">
</td></tr>
<tr>
<th class="ctOdd">FreeCAD version
</th></tr>
<tr>
<td class="ctEven">
</td></tr>
<tr>
<th class="ctOdd">Example File(s)
</th></tr>
<tr>
<td class="ctEven">
</td></tr>
<tr>
<td class="ctToc"><br /><div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
<ul>
<li class="toclevel-1"><a href="#Tutorial"><span class="tocnumber">1</span> <span class="toctext">Tutorial</span></a></li>
<li class="toclevel-1 tocsection-1"><a href="#P.C5.99.C3.ADklad_Kuka"><span class="tocnumber">2</span> <span class="toctext">Příklad Kuka</span></a>
<ul>
<li class="toclevel-2 tocsection-2"><a href="#Kinematika"><span class="tocnumber">2.1</span> <span class="toctext">Kinematika</span></a></li>
<li class="toclevel-2 tocsection-3"><a href="#Vizu.C3.A1ln.C3.AD_reprezentace"><span class="tocnumber">2.2</span> <span class="toctext">Vizuální reprezentace</span></a></li>
<li class="toclevel-2 tocsection-4"><a href="#KR_210"><span class="tocnumber">2.3</span> <span class="toctext">KR 210</span></a></li>
<li class="toclevel-2 tocsection-5"><a href="#KR_500"><span class="tocnumber">2.4</span> <span class="toctext">KR 500</span></a></li>
</ul>
</li>
</ul>
</div>
</td></tr></table>
<p><br />
</p><p>Tento článek je o zavedení standardů 6-ti osového průmyslového robota pro simulaci ve FreeCADu.
</p><p>Popis vychází ze systému <a rel="nofollow" class="external text" href="http://en.wikipedia.org/wiki/Denavit-Hartenberg_Parameters">Denavit-Hartenberg Parameter</a>, podobně jak popisuje John J. Craigs v knize "Introduction to Robotics".
</p>
<h2><span class="mw-headline" id="P.C5.99.C3.ADklad_Kuka">Příklad Kuka</span></h2>
<table class="wikitable" style="color:green; background-color:#ffffcc;" cellpadding="5" cellspacing="0" border="1">
<caption> <b>Kuka KR-16</b>
</caption>
<tr>
<td> <a href="https://www.freecadweb.org/wiki/index.php?title=File:KukaKR16.jpg" class="image"><img alt="KukaKR16.jpg" src="KukaKR16.jpg" width="414" height="396" /></a>
</td>
<td> <a href="https://www.freecadweb.org/wiki/index.php?title=File:KukaParts.jpg" class="image"><img alt="KukaParts.jpg" src="KukaParts.jpg" width="253" height="268" /></a>
</td>
<td> <a href="https://www.freecadweb.org/wiki/index.php?title=File:KukaAxisPosition.jpg" class="image"><img alt="KukaAxisPosition.jpg" src="KukaAxisPosition.jpg" width="346" height="290" /></a>
</td></tr></table>
<h3><span class="mw-headline" id="Kinematika">Kinematika</span></h3>
<table class="wikitable" style="color:green; background-color:#ffffcc;" cellpadding="5" cellspacing="0" border="1">
<caption> <b>3D aplikace</b>
</caption>
<tr>
<th> Segment
</th>
<th> Parameter
</th>
<th> Popis
</th></tr>
<tr>
<td> <a href="https://www.freecadweb.org/wiki/index.php?title=File:KukaBase.jpg" class="image"><img alt="KukaBase.jpg" src="KukaBase.jpg" width="223" height="250" /></a>
</td>
<td>
</td>
<td> Základní konfigurace
</td></tr>
<tr>
<td> <a href="https://www.freecadweb.org/wiki/index.php?title=File:KukaSegment1.jpg" class="image"><img alt="KukaSegment1.jpg" src="KukaSegment1.jpg" width="223" height="238" /></a>
</td>
<td>
<p>&lt;math&gt;\theta_{1} = q_{1}&lt;/math&gt;
</p><p>&lt;math&gt;d_{1} = 675 mm &lt;/math&gt;
</p><p>&lt;math&gt;a_{1} = 260 mm &lt;/math&gt;
</p><p>&lt;math&gt;\alpha_{1} = 90&lt;/math&gt;°
</p>
</td>
<td> Segment 1
</td></tr>
<tr>
<td> <a href="https://www.freecadweb.org/wiki/index.php?title=File:KukaSegment2.jpg" class="image"><img alt="KukaSegment2.jpg" src="KukaSegment2.jpg" width="221" height="249" /></a>
</td>
<td>
<p>&lt;math&gt;\theta_{2} = q_{2} - 90&lt;/math&gt;°
</p><p>&lt;math&gt;d_{2} = 0 mm &lt;/math&gt;
</p><p>&lt;math&gt;a_{2} = 680 mm &lt;/math&gt;
</p><p>&lt;math&gt;\alpha_{2} = 0&lt;/math&gt;°
</p>
</td>
<td> Segment 2
</td></tr>
<tr>
<td> <a href="https://www.freecadweb.org/wiki/index.php?title=File:KukaSegment3.jpg" class="image"><img alt="KukaSegment3.jpg" src="KukaSegment3.jpg" width="221" height="255" /></a>
</td>
<td>
<p>&lt;math&gt;\theta_{3} = q_{3} &lt;/math&gt;
</p><p>&lt;math&gt;d_{3} = 0 mm &lt;/math&gt;
</p><p>&lt;math&gt;a_{3} = 0 mm &lt;/math&gt;
</p><p>&lt;math&gt;\alpha_{3} = 90&lt;/math&gt;°
</p>
</td>
<td> Segment 3
</td></tr>
<tr>
<td> <a href="https://www.freecadweb.org/wiki/index.php?title=File:KukaSegment4.jpg" class="image"><img alt="KukaSegment4.jpg" src="KukaSegment4.jpg" width="237" height="240" /></a>
</td>
<td>
<p>&lt;math&gt;\theta_{4} = q_{4} &lt;/math&gt;
</p><p>&lt;math&gt;d_{4} = -670 mm &lt;/math&gt;
</p><p>&lt;math&gt;a_{4} = 0 mm &lt;/math&gt;
</p><p>&lt;math&gt;\alpha_{4} = -90&lt;/math&gt;°
</p>
</td>
<td> Segment 4
</td></tr>
<tr>
<td> <a href="https://www.freecadweb.org/wiki/index.php?title=File:KukaSegment5.jpg" class="image"><img alt="KukaSegment5.jpg" src="KukaSegment5.jpg" width="221" height="233" /></a>
</td>
<td>
<p>&lt;math&gt;\theta_{5} = q_{5} &lt;/math&gt;
</p><p>&lt;math&gt;d_{5} = 0 mm &lt;/math&gt;
</p><p>&lt;math&gt;a_{5} = 0 mm &lt;/math&gt;
</p><p>&lt;math&gt;\alpha_{5} = 90&lt;/math&gt;°
</p>
</td>
<td> Segment 5
</td></tr>
<tr>
<td> <a href="https://www.freecadweb.org/wiki/index.php?title=File:KukaSegment6.jpg" class="image"><img alt="KukaSegment6.jpg" src="KukaSegment6.jpg" width="257" height="240" /></a>
</td>
<td>
<p>&lt;math&gt;\theta_{6} = q_{6} &lt;/math&gt;
</p><p>&lt;math&gt;d_{6} = 0 mm &lt;/math&gt;
</p><p>&lt;math&gt;a_{6} = -158 mm &lt;/math&gt;
</p><p>&lt;math&gt;\alpha_{6} = 180&lt;/math&gt;°
</p>
</td>
<td> Segment 6
</td></tr></table>
<p>Řídí se následující tabulkou:
</p>
<table class="wikitable" style="color:green; background-color:#ffffcc;" cellpadding="5" cellspacing="0" border="1">
<caption> <b>Kinematická tabulka</b>
</caption>
<tr>
<th> &lt;math&gt;i&lt;/math&gt; </th>
<th> &lt;math&gt;\theta&lt;/math&gt; </th>
<th> &lt;math&gt;d&lt;/math&gt; </th>
<th> &lt;math&gt;a&lt;/math&gt; </th>
<th> &lt;math&gt;\alpha&lt;/math&gt;
</th></tr>
<tr>
<td> 1 </td>
<td> q1 </td>
<td> 675 mm </td>
<td> 260 mm </td>
<td> -90°
</td></tr>
<tr>
<td> 2 </td>
<td> q2 - 90° </td>
<td> 0 mm </td>
<td> 680 mm </td>
<td>
</td></tr>
<tr>
<td> 3 </td>
<td> q3 </td>
<td> 0 mm </td>
<td> 0 mm </td>
<td> 90°
</td></tr>
<tr>
<td> 4 </td>
<td> q4 </td>
<td> -670 mm </td>
<td> 0 mm </td>
<td> -90°
</td></tr>
<tr>
<td> 5 </td>
<td> q5 </td>
<td> 0 mm </td>
<td> 0 mm </td>
<td> 90°
</td></tr>
<tr>
<td> 6 </td>
<td> q6 </td>
<td> -158 mm </td>
<td> 0 mm </td>
<td> 180°
</td></tr></table>
<p>Protože roboty Kuka nemají všechny osy do 0 v nakreslené L-pozici, musíme změnit osy 2 a 3 o 90°.
</p><p><br />
</p>
<table class="wikitable" style="color:green; background-color:#ffffcc;" cellpadding="5" cellspacing="0" border="1">
<caption> <b>Kinematická tabulka</b>
</caption>
<tr>
<th> &lt;math&gt;i&lt;/math&gt; </th>
<th> &lt;math&gt;\theta&lt;/math&gt; </th>
<th> &lt;math&gt;d&lt;/math&gt; </th>
<th> &lt;math&gt;a&lt;/math&gt; </th>
<th> &lt;math&gt;\alpha&lt;/math&gt;
</th></tr>
<tr>
<td> 1 </td>
<td> q1 </td>
<td> 675 mm </td>
<td> 260 mm </td>
<td> -90°
</td></tr>
<tr>
<td> 2 </td>
<td> q2 </td>
<td> 0 mm </td>
<td> 680 mm </td>
<td>
</td></tr>
<tr>
<td> 3 </td>
<td> q3 - 90° </td>
<td> 0 mm </td>
<td> 0 mm </td>
<td> 90°
</td></tr>
<tr>
<td> 4 </td>
<td> q4 </td>
<td> -670 mm </td>
<td> 0 mm </td>
<td> -90°
</td></tr>
<tr>
<td> 5 </td>
<td> q5 </td>
<td> 0 mm </td>
<td> 0 mm </td>
<td> 90°
</td></tr>
<tr>
<td> 6 </td>
<td> q6 </td>
<td> -158 mm </td>
<td> 0 mm </td>
<td> 180°
</td></tr></table>
<p>V popisu robota jsou navíc i informace o ose:
</p><p><a href="https://www.freecadweb.org/wiki/index.php?title=File:KukaAxisData.jpg" class="image"><img alt="KukaAxisData.jpg" src="KukaAxisData.jpg" width="947" height="145" /></a>
</p><p>Výsledkem je kompletní tabulka:
</p>
<table class="wikitable" style="color:green; background-color:#ffffcc;" cellpadding="5" cellspacing="0" border="1">
<caption> <b>Kinematická tabulka</b>
</caption>
<tr>
<th> &lt;math&gt;i&lt;/math&gt; </th>
<th> &lt;math&gt;\theta&lt;/math&gt; </th>
<th> &lt;math&gt;d&lt;/math&gt; </th>
<th> &lt;math&gt;a&lt;/math&gt; </th>
<th> &lt;math&gt;\alpha&lt;/math&gt; </th>
<th> &lt;math&gt;\theta_{min}&lt;/math&gt; </th>
<th> &lt;math&gt;\theta_{max}&lt;/math&gt; </th>
<th> Axis Speed
</th></tr>
<tr>
<td> 1 </td>
<td> 0 </td>
<td> 675 </td>
<td> 260 </td>
<td> -90 </td>
<td> -185 </td>
<td> 185 </td>
<td> 156
</td></tr>
<tr>
<td> 2 </td>
<td> 0 </td>
<td> 0 </td>
<td> 680 </td>
<td> 0 </td>
<td> -155 </td>
<td> 35 </td>
<td> 156
</td></tr>
<tr>
<td> 3 </td>
<td> - 90 </td>
<td> 0 </td>
<td> 0 </td>
<td> 90 </td>
<td> -130 </td>
<td> 154 </td>
<td> 156
</td></tr>
<tr>
<td> 4 </td>
<td> 0 </td>
<td> -670 </td>
<td> 0 </td>
<td> -90 </td>
<td> -350 </td>
<td> 350 </td>
<td> 330
</td></tr>
<tr>
<td> 5 </td>
<td> 0 </td>
<td> 0 </td>
<td> 0 </td>
<td> 90 </td>
<td> -130 </td>
<td> 130 </td>
<td> 330
</td></tr>
<tr>
<td> 6 </td>
<td> 0 </td>
<td> -158 </td>
<td> 0 </td>
<td> 180 </td>
<td> -350 </td>
<td> 350 </td>
<td> 615
</td></tr></table>
<h3><span class="mw-headline" id="Vizu.C3.A1ln.C3.AD_reprezentace">Vizuální reprezentace</span></h3>
<p>FreeCAD může generovat neupravený vizuální výstup kinematické taulky. Ale pokud se chcete dostat blíž k realitě, můžete pro simulaci použít VRML soubor s tvary robota.
Např. dodávané <a rel="nofollow" class="external text" href="http://kuka.com">Kuka</a> soubory pro jejich model. Při vytváření specifického robota ve FreeCADu je natahován soubor VRML. Pokud je FreeCADu umožněno posunovat osy, musí být upraven VRML soubor a vloženy speciální transformační uzly, které FreeCAD může nalézt a manipulovat s nimi.
</p><p>Ještě jednou ukážeme příklad Kuka KR 16.
Začínáme od řádku 1:
</p>
<pre>#VRML V2.0 utf8
#
# This VRML97 file was exported using eM-Workplace
# (c) Tecnomatix Technologies GmbH &amp; Co. KG
# Heisenberg-Bogen 1
# D-85609 Aschheim-Dornach
# GERMANY
#
#Background
#{
# skyColor [0.752941 0.752941 0.752941]
#}
Transform
{
#rotation 1 0 0 -1.5707963
#scale .001 .001 .001
children
[
DEF AOBJ_0001_000_TRAFO Transform
{
children
[
...
</pre>
<p>Vidíte, že tento soubor je dodáván se simulačním software robota zvaným Tecnomatix. Odstraňte poznámku a vložte tam URL, ze které jste tento soubor získali, protože Tecnomatix nemá žádný copyright na obsah souboru. Je to pouze konvertor! Nejdřív odstraňte uzel <b>Background</b>. Potom odstraňte uzly <b>rotation</b> a <b>scale</b> abyste dostali model v mm a kolmou Z.
</p><p>A teď na konci:
</p>
<pre> ] }
] }
] }
]
}
#ROUTE SENS_04_OBJ.rotation_changed TO AXIS_04_OBJ.rotation
#ROUTE SENS_27_OBJ.rotation_changed TO AXIS_27_OBJ.rotation
#ROUTE SENS_32_OBJ.rotation_changed TO AXIS_32_OBJ.rotation
#ROUTE SENS_44_OBJ.rotation_changed TO AXIS_44_OBJ.rotation
#ROUTE SENS_46_OBJ.rotation_changed TO AXIS_46_OBJ.rotation
#ROUTE SENS_49_OBJ.rotation_changed TO AXIS_49_OBJ.rotation
#DEF AnySIMTimer TimeSensor
#{
# cycleInterval 1.000000
# loop TRUE
#}
</pre>
<p>Odkomentujte <b>TimeSensor</b> a 6 routes. Těch 6 řádků určuje kde jsou aktuální osy robota! Nejdříve se podívejte po "AXIS_04_OBJ" což Vás přivede na následující místo:
</p>
<pre>...
Transform { rotation 1 0 0 1.570796 children [
DEF SENS_04_OBJ-0001 CylinderSensor
{
diskAngle 1.570796
minAngle -3.228859
maxAngle 3.228859
offset 0.000000
}
DEF FREECAD_AXIS1 Transform { rotation 0 1 0 0 children [
DEF AXIS_04_OBJ-0001 Transform
{
children
[
Transform { rotation 1 0 0 -1.570796 children [
DEF AOBJ_0001_003_TRAFO Transform
{
rotation 1.000000 0.000000 0.000000 3.141593
translation -600.000000 500.000000 300.000000
children
[
...
</pre>
<p>Přesně nad definici tohoto uzlu musíte vložit řádek <b>"DEF FREECAD_AXIS1 Transform { rotation 0 1 0 0 children ["</b> což je odkaz pro FreeCAD aby se přesunul na osy.
</p><p>A teď to samé pro <b>FREECAD_AXIS2</b>,<b>FREECAD_AXIS3</b>,<b>FREECAD_AXIS4</b>,<b>FREECAD_AXIS5</b> a <b>FREECAD_AXIS6</b>.
Nezapomeňte na uzavírací závorky na konci souboru a pak jste hotovi!
</p><p>Při konkretizaci robota můžete natáhnout VRML:
</p>
<pre>App.activeDocument().addObject("Robot::RobotObject","Robot")
App.activeDocument().Robot.RobotVrmlFile = "C:/_Projekte/FreeCAD0.9_build/mod/Robot/Lib/Kuka/kr16.wrl"
</pre>
<p>což by mělo dát tento výsledek:
<a href="https://www.freecadweb.org/wiki/index.php?title=File:KukaKR16FreeCAD.jpg" class="image"><img alt="KukaKR16FreeCAD.jpg" src="KukaKR16FreeCAD.jpg" width="1020" height="704" /></a>
</p>
<h3><span class="mw-headline" id="KR_210">KR 210</span></h3>
<p><a rel="nofollow" class="external text" href="http://free-cad.svn.sourceforge.net/viewvc/free-cad/trunk/src/Mod/Robot/Lib/Kuka/kr_210_2.pdf">Data sheet</a>
</p>
<table class="wikitable" style="color:green; background-color:#ffffcc;" cellpadding="5" cellspacing="0" border="1">
<caption> <b>Kinematická tabulka</b>
</caption>
<tr>
<th> &lt;math&gt;i&lt;/math&gt; </th>
<th> &lt;math&gt;\theta&lt;/math&gt; </th>
<th> &lt;math&gt;d&lt;/math&gt; </th>
<th> &lt;math&gt;a&lt;/math&gt; </th>
<th> &lt;math&gt;\alpha&lt;/math&gt; </th>
<th> &lt;math&gt;\theta_{min}&lt;/math&gt; </th>
<th> &lt;math&gt;\theta_{max}&lt;/math&gt; </th>
<th> Axis Speed
</th></tr>
<tr>
<td> 1 </td>
<td> 0 </td>
<td> 750 </td>
<td> 350 </td>
<td> -90 </td>
<td> -185 </td>
<td> 185 </td>
<td> 156
</td></tr>
<tr>
<td> 2 </td>
<td> 0 </td>
<td> 0 </td>
<td> 1250 </td>
<td> 0 </td>
<td> -155 </td>
<td> 35 </td>
<td> 156
</td></tr>
<tr>
<td> 3 </td>
<td> - 90 </td>
<td> 0 </td>
<td> 0 </td>
<td> 90 </td>
<td> -130 </td>
<td> 154 </td>
<td> 156
</td></tr>
<tr>
<td> 4 </td>
<td> 0 </td>
<td> -1100 </td>
<td> 0 </td>
<td> -90 </td>
<td> -350 </td>
<td> 350 </td>
<td> 330
</td></tr>
<tr>
<td> 5 </td>
<td> 0 </td>
<td> 0 </td>
<td> 0 </td>
<td> 90 </td>
<td> -130 </td>
<td> 130 </td>
<td> 330
</td></tr>
<tr>
<td> 6 </td>
<td> 0 </td>
<td> -230 </td>
<td> 0 </td>
<td> 180 </td>
<td> -350 </td>
<td> 350 </td>
<td> 615
</td></tr></table>
<p><br />
</p>
<h3><span class="mw-headline" id="KR_500">KR 500</span></h3>
<p><a rel="nofollow" class="external text" href="http://free-cad.svn.sourceforge.net/viewvc/free-cad/trunk/src/Mod/Robot/Lib/Kuka/kr_500_2.pdf">Data sheet</a>
</p>
<table class="wikitable" style="color:green; background-color:#ffffcc;" cellpadding="5" cellspacing="0" border="1">
<caption> <b>Kinematická tabulka</b>
</caption>
<tr>
<th> &lt;math&gt;i&lt;/math&gt; </th>
<th> &lt;math&gt;\theta&lt;/math&gt; </th>
<th> &lt;math&gt;d&lt;/math&gt; </th>
<th> &lt;math&gt;a&lt;/math&gt; </th>
<th> &lt;math&gt;\alpha&lt;/math&gt; </th>
<th> &lt;math&gt;\theta_{min}&lt;/math&gt; </th>
<th> &lt;math&gt;\theta_{max}&lt;/math&gt; </th>
<th> Axis Speed
</th></tr>
<tr>
<td> 1 </td>
<td> 0 </td>
<td> 1045 </td>
<td> 500 </td>
<td> -90 </td>
<td> -185 </td>
<td> 185 </td>
<td> 156
</td></tr>
<tr>
<td> 2 </td>
<td> 0 </td>
<td> 0 </td>
<td> 1300 </td>
<td> 0 </td>
<td> -155 </td>
<td> 35 </td>
<td> 156
</td></tr>
<tr>
<td> 3 </td>
<td> - 90 </td>
<td> 0 </td>
<td> 0 </td>
<td> 90 </td>
<td> -130 </td>
<td> 154 </td>
<td> 156
</td></tr>
<tr>
<td> 4 </td>
<td> 0 </td>
<td> -1025 </td>
<td> 0 </td>
<td> -90 </td>
<td> -350 </td>
<td> 350 </td>
<td> 330
</td></tr>
<tr>
<td> 5 </td>
<td> 0 </td>
<td> 0 </td>
<td> 0 </td>
<td> 90 </td>
<td> -130 </td>
<td> 130 </td>
<td> 330
</td></tr>
<tr>
<td> 6 </td>
<td> 0 </td>
<td> -250 </td>
<td> 0 </td>
<td> 180 </td>
<td> -350 </td>
<td> 350 </td>
<td> 615
</td></tr></table>
</div>
</div>
</div><div class="printfooter">
Online version: "<a dir="ltr" href="https://www.freecadweb.org/wiki/index.php?title=Robot_6-Axis/cs&amp;oldid=177584">http://www.freecadweb.org/wiki/index.php?title=Robot_6-Axis/cs&amp;oldid=177584</a>"</div>
<div id="catlinks" class="catlinks" data-mw="interface"></div><div class="visualClear"></div>
</div>
</div>
<div id="mw-navigation">
<h2>Navigation menu</h2>
</body></html>