Post on 19-Mar-2020
3DS
.CO
M ©
Das
saul
t Sys
tèm
es |
Con
fiden
tial I
nfor
mat
ion
| 9/1
8/20
17 |
ref.:
3D
S_D
ocum
ent_
2015
Learning Virtual Universes with
Poppy Humanoid Poppy Compliant
2
3DS
.CO
M ©
Das
saul
t Sys
tèm
es |
Con
fiden
tial I
nfor
mat
ion
| 9/1
8/20
17 |
ref.:
3D
S_D
ocum
ent_
2015
Package Content In this package you will find:
1. Workshop
2. Ressources 3DEXPERIENCE:
• Poppy DYMOLA Library
• Initial model (Multi_Torso_Poppy_Compliant_Root A.1)
• Final model (Final_Multi_Torso_Poppy_Compliant_Root A.1)
FMI : Poppy Functional Mockup Unit model for the communication between the 3DEXPERIENCE and Python.
PYTHON : • Primitives applications
• Poppy Torso’s Python Script
• Initial record movement
Softwares • Poppy_demo_install folder to copy paste on your desktop
3
3DS
.CO
M ©
Das
saul
t Sys
tèm
es |
Con
fiden
tial I
nfor
mat
ion
| 9/1
8/20
17 |
ref.:
3D
S_D
ocum
ent_
2015
About this course The objective of this course is to explore the Virtual Twin concept, the making and the launching of the
Poppy Compliant scenario in the 3DEXPERIENCE Platform .
Upon completion of this course, the learner will be
able to :
Use the Poppy Torso Script
Create and attach a primitive application
Make the Poppy Compliant Scenario using the Poppy Robot
Library
Set up and launch the scenario Poppy Compliant and use the
graphical user interface.
Keywords
Systems Engineering: Virtual Twin, Co-Simulation, Python
Mechatronics: Control, Modeling, Object detection
Audience
Educators and students interested in systems engineering
and virtual twin concept.
Prerequisites
Knowledges about Python
CATIA Functional and Logical Design Fundamentals
CATIA Dymola Behavior Modeling Essentials
Learning Virtual Universes with Poppy Humanoid tutorials,
available at 3DSAcademy’s YouTube channel.
4
3DS
.CO
M ©
Das
saul
t Sys
tèm
es |
Con
fiden
tial I
nfor
mat
ion
| 9/1
8/20
17 |
ref.:
3D
S_D
ocum
ent_
2015
Environment Requirements In order to practice, you must have access to a software installation and environment that include:
The 3DEXPERIENCE R2017x platform
Roles granted :
Access to the following applications :
5
3DS
.CO
M ©
Das
saul
t Sys
tèm
es |
Con
fiden
tial I
nfor
mat
ion
| 9/1
8/20
17 |
ref.:
3D
S_D
ocum
ent_
2015
1. Case of Study
2. About primitives applications
3. Object tracking application
4. Graphical User Interface (GUI) essentials
5. Software Installation
6. Tutorial
Table of Contents
6
3DS
.CO
M ©
Das
saul
t Sys
tèm
es |
Con
fiden
tial I
nfor
mat
ion
| 9/1
8/20
17 |
ref.:
3D
S_D
ocum
ent_
2015
1. Case of Study : Poppy Compliant Scenario In this workshop we will illustrate the main steps to realize the Poppy Compliant
Scenario using the virtual twin concept, primitives applications and graphical user
interface.
7
3DS
.CO
M ©
Das
saul
t Sys
tèm
es |
Con
fiden
tial I
nfor
mat
ion
| 9/1
8/20
17 |
ref.:
3D
S_D
ocum
ent_
2015
2. About primitives applications “We call Primitive any simple or complex behavior applied to
a Robot. A primitive can access all sensors and effectors in
the robot. A primitive is supposed to be independent of other
primitives. In particular, a primitive is not aware of the other
primitives running on the robot at the same time. We imagine
those primitives as elementary blocks that can be combined
to create more complex blocks in a hierarchical manner”.
(https://poppy-project.github.io/pypot/primitive.html)
On the right side are the available primitives in the Poppy
Compliant Scenario.
Name Description
Head Montion Head random movement. (Pypot)
UpperBodyIdleMotion. Arms random movement. (Pypot)
RToLMirroir The left arm is controlled by the
right arm.
LToRMirroir The right arm is controlled by the
left arm.
SmartCompliant
The robot maintains a stable
position which can be modified by
applying force to the robot.
PoppyObjectTracked. The robot follows a green object
with his head. *
PositionObjectTracked.
The robot uses its hand to repeat
the movement of an object in the
field of view of the camera. **
*Camera is required - ** Poppy Parallel Scenario
8
3DS
.CO
M ©
Das
saul
t Sys
tèm
es |
Con
fiden
tial I
nfor
mat
ion
| 9/1
8/20
17 |
ref.:
3D
S_D
ocum
ent_
2015
3. Object tracking application
It is an object tracking algorithm that detects the coordinates of a green object in the Robot’s line of sight. Here are some particularities:
The algorithm tracks the largest green object in the frame vision
The X and Y coordinates are in pixels; on the other hand, the Z coordinate is an approximation, that uses the relationship between the object’s area and the real object’s distance. It is calibrated with a circular object of 4 cm diameter
Two applications are created: • Poppy Object Tracking (Poppy Compliant)
• Poppy Gestures Tracking (Poppy Parallel)
The primitives algorithms is available here:
Poppy Torso Package\Poppy Compliant\2. Ressources\Python\Primitives\Library\Vision_Primitives.py
9
3DS
.CO
M ©
Das
saul
t Sys
tèm
es |
Con
fiden
tial I
nfor
mat
ion
| 9/1
8/20
17 |
ref.:
3D
S_D
ocum
ent_
2015
4. Graphical User Interface (GUI) essentials The Graphical User Interface allows to use the primitives applications mentioned, as well as monitoring
some actuator variables(Available in the Poppy Parallel Scenario)
Next
Primitive
Actual
primitive
Launch / Stop the
actual primitive
Previous
Primitive
Variables
visualization
10
3DS
.CO
M ©
Das
saul
t Sys
tèm
es |
Con
fiden
tial I
nfor
mat
ion
| 9/1
8/20
17 |
ref.:
3D
S_D
ocum
ent_
2015
5. Software Installation Before you can run the simulation, you need to install the various software programs available in the Software Installation folder.
The Python server and Pypot Library are necessary to control the Poppy humanoid robot and other Poppy creatures.
Note: Make sure you are connected to an unsecured network.
Install Python and Pypot library
In the package, find 2. Ressources\Softwares folder, copy Poppy_demo_install folder and paste it on the desktop root,
Launch Poppy_install_1.bat and follow the instructions on the Installation Wizard,
Restart the Computer,
Launch Poppy_install_2.bat and follow the instructions on the Installation Wizard.
11
3DS
.CO
M ©
Das
saul
t Sys
tèm
es |
Con
fiden
tial I
nfor
mat
ion
| 9/1
8/20
17 |
ref.:
3D
S_D
ocum
ent_
2015
► Add C:\Python27\Scripts to PATH:
Go to Control Panel > System and security > System > Advanced systems settings.
5. Software Installation
► Add “CNEXTOUTPUT=Console” to Env.txt:
Go to C:\Program Files\Dassault Systemes\B419\CATEnv
and modify Env.txt document. Save it with the same name on the
desktop and replace the original by the new one.
12
3DS
.CO
M ©
Das
saul
t Sys
tèm
es |
Con
fiden
tial I
nfor
mat
ion
| 9/1
8/20
17 |
ref.:
3D
S_D
ocum
ent_
2015
5. Software Installation Install the USB2AX driver
To set up a communication between your computer and the Dynamixel motors using the USB2AX adaptor, you have to install the USB2AX driver.
Connect the USB2AX device to your computer.
Open the Device Manager (Control Panel > Hardware and Sound > Device Manager). Go to Ports (COM & LPT) > USB2AX or USB Serial Device and right click it.
In the menu, select Update Driver Software.
In the new window, select Browse my computer for driver software, and look for the path of the driver in the Poppy_demo_install\Files\USB2AX_drivers folder.
Click on Next
Select : « Always trust software from « Nicolas Sauguinier » . »
Click Install
When the installation is finished, the LED on your USB2AX adaptor turns green.
13
3DS
.CO
M ©
Das
saul
t Sys
tèm
es |
Con
fiden
tial I
nfor
mat
ion
| 9/1
8/20
17 |
ref.:
3D
S_D
ocum
ent_
2015
6. Tutorial Run the experience
Connect the Poppy and Start the Python Server :
To start using the Poppy Humanoid / Torso Robot with the 3DEXPERIENCE Platform, follow strictly these steps:
Connect the robot to the DC power source 12V 5A.
Connect the USB2AX terminals to your computer
Open Windows command prompt and type ipython notebook.
You are redirected to your web browser as described in the installing section.
Upload the Poppy Humanoid Script.ipynb, or Poppy Torso Script.ipynb file (Python > Scripts ) and open it.
Upload the my_initial_move.move file (Python > Movements ) and open it.
14
3DS
.CO
M ©
Das
saul
t Sys
tèm
es |
Con
fiden
tial I
nfor
mat
ion
| 9/1
8/20
17 |
ref.:
3D
S_D
ocum
ent_
2015
6. Tutorial Go to Device Manager and check the COM number Windows has
assigned
In ipython notebook change the COM value for the ports that you found
in the Device Manager.
Depending on the type of poppy you have just one USB2AX connected.
Normally, you only have to do this step the first time you use the robot
because Windows assigns the same ports every time you connect it.
If it is not the case, you will need to repeat this step
Make sure the Poppy is laying down correctly.
Run the first “initialization” cell:
Select the cell.
Press Ctrl+Enter.
This should appear: “Binding… 127.0.0.20, 1140”. It means the
Poppy will sit.
15
3DS
.CO
M ©
Das
saul
t Sys
tèm
es |
Con
fiden
tial I
nfor
mat
ion
| 9/1
8/20
17 |
ref.:
3D
S_D
ocum
ent_
2015
6. Tutorial In this video we will illustrate the main steps to realize the Poppy Compliant
Scenario:
1. Launch the Poppy’s Python Script
2. Make the Virtual Twin Scenario
in the 3DEXPERIENCE Platform
3. Launch and export the scenario
4. Compile and attach a primitive
16
3DS
.CO
M ©
Das
saul
t Sys
tèm
es |
Con
fiden
tial I
nfor
mat
ion
| 9/1
8/20
17 |
ref.:
3D
S_D
ocum
ent_
2015