Project

General

Profile

Simple Usage » History » Version 4

Jules Waldhart, 2018-03-15 11:01

1 1 Jules Waldhart
h1. Simple Usage
2
3
move4d main interface is through python bindings, also a GUI provide some functionalities, but currently we do not aim at making it a complete interface. Python binding are aimed at accessing all functionalities of move4d -- but that's a work in progress.
4
5
h2. Install everything
6
7
h2. Download some p3d files
8
9
You can find a lot here: @ git://redmine.laas.fr/laas/move3d/assets.git @
10
11
h2. Launch GUI from python console
12
13
start a python 3 console (we recommend using ipython3) and if your environment is properly set you should be able to do:
14
15
<pre><code class="python">
16
import move4dogre
17
from move4d import move4d
18
m4dapp=move4dogre.Move4d(["-f","path/to/a/p3d_file.p3d"]) # try with "path/to/assets/ADREAM/ADREAM_APPART.p3d"
19
m4dapp.start()
20
# this starts the GUI in another thread, you can still provide commands to the python prompt
21
</code></pre>
22 2 Jules Waldhart
23
h2. Moving the camera
24
25
In the GUI, there is a 3D view of your environment (or several views).
26
To change the viewpoint, hold left mouse button and move the mouse around. This will rotate the camera around a virtual point.
27
28
You can zoom in and out with the mouse middle button (scroll) (or rather move the camera forward/backward); actual zooming is performed by holding CTRL while scrolling.
29
30
You can move the camera virtual target by holding the middle-button down while moving the mouse. The camera target is materialized by a white ball (in the center of the view, may be hidden by other objects).
31
32
h2. Moving the robots around
33
34
To move a robot in the environment, you can either right-click on it in the robot you want to move and click "move robot". You can now use the keyboard arrows to move it in X/Y directions, and page-up/page-down to move it in Z.
35
36
Or you can use the widget "Robot Form" widget and use the sliders to act on each degree of freedom. There you can save configurations by clicking "Save Curr." button, or "Save (as init)", "Save (as goal)". The init and goal configurations are used for motion planning requests.
37 3 Jules Waldhart
38
h2. The python interface
39
40 4 Jules Waldhart
The main interface with move4d is through Python 3 bindings. This allow access through interactive shell (see [[Simple Usage#Launch-GUI-from-python-console]]). It also allows to create script for the most commonly commands used. The file attachment:move4ddemo.py has an initialization function and another function (reset) to be called from the python console.
41 3 Jules Waldhart
42
To use it, you can call from your shell:
43
44
<pre><code class="sh">
45
ipython3 -i ./move4ddemo.py -- -f /path/to/p3d_file.p3d
46
</code></pre>
47
48
This command will execute the main() function with the arguments found after "@--@" and give you back the hand in the python console.