Skip to content

Commit 6c02c42

Browse files
committed
Usage in HTML docs
1 parent 0d0c838 commit 6c02c42

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

docs/cri_lib.html

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ <h2>Contents</h2>
2828
<li><a href="#getting-started">Getting Started</a>
2929
<ul>
3030
<li><a href="#installation">Installation</a></li>
31+
<li><a href="#usage">Usage</a></li>
3132
<li><a href="#examples">Examples</a></li>
3233
</ul></li>
3334
<li><a href="#tests">Tests</a></li>
@@ -101,6 +102,23 @@ <h2 id="installation">Installation</h2>
101102

102103
<p>In the top directory of this repository execute <code>pip install .</code></p>
103104

105+
<h2 id="usage">Usage</h2>
106+
107+
<p>The library provides the <code>CRIController</code> class which is the main interface to controll the iRC. It handles the network connection and starts background threads for keep alive messages and processing of received messages. Movement functions directly return even though the move might not be finisched. If you want to wait for the move to finish, set the <code>wait_move_finished</code> parameter to <code>True</code>.
108+
Most function return a bool to check whether the execution was successful.</p>
109+
110+
<h3 id="typical-procedure">Typical procedure</h3>
111+
112+
<ol>
113+
<li>Connect to iRC: <code>CRIController.connect(...)</code> Default IP is <code>192.168.3.11</code> with port <code>3921</code>. For using the simulation in the iRC desktop software, connect to <code>127.0.0.1</code>, most of the time the port in the simulation is <code>3921</code>, but can be different. Have a look at the log if you are unable to connect. Check whether connection was successfull via the returned bool.</li>
114+
<li>If you want to control the robot, acquire active control via <code>CRIController.set_active_control(True)</code>.</li>
115+
<li>Enable drives with <code>CRIController.enable()</code></li>
116+
<li>Wait unitl axes are ready <code>CRIcontroller.wait_for_kinematics_ready()</code></li>
117+
<li>Do some work with your robot, see API documentation for all functionality.</li>
118+
<li>Diable drives with <code>CRIController.disable()</code></li>
119+
<li>Close connection with <code>CRIController.close()</code></li>
120+
</ol>
121+
104122
<h2 id="examples">Examples</h2>
105123

106124
<p>See <code>examples</code> directory.</p>

docs/search.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)