simTest5.py
Go to the documentation of this file.
1 import hrpsys
2 
3 sim = hrpsys.Simulator()
4 sim.initViewer()
5 
6 body = sim.createBody("body")
7 
8 root = body.rootLink()
9 s1 = root.addCube(0.2, 1.0, 0.2)
10 s1.diffuse = [1,0,0,1]
11 
12 child = root.addChildLink("child")
13 child.b = [0,0.5,0]
14 child.jointType = "rotate"
15 child.a = [1,0,0]
16 child.m = 1.0
17 child.c = [0,0.5,0]
18 child.I = [1,0,0,0,1,0,0,0,1]
19 s2 = child.addCube(0.5, 1.0, 0.1)
20 s2.b = [0,0.5,0]
21 s2.diffuse = [0,1,0,1]
22 
23 sim.initialize()
24 sim.simulate(3)
25 
26 
27 
28 
29 
30 
31 
32 
33 
34 
35 


hrpsys
Author(s): AIST, Fumio Kanehiro
autogenerated on Sat Dec 17 2022 03:52:21