Go to the documentation of this file.00001 import hrpsys
00002
00003 sim = hrpsys.Simulator()
00004 sim.initViewer()
00005
00006 body = sim.createBody("body")
00007
00008 root = body.rootLink()
00009 s1 = root.addCube(0.2, 1.0, 0.2)
00010 s1.diffuse = [1,0,0,1]
00011
00012 child = root.addChildLink("child")
00013 child.b = [0,0.5,0]
00014 child.jointType = "rotate"
00015 child.a = [1,0,0]
00016 child.m = 1.0
00017 child.c = [0,0.5,0]
00018 child.I = [1,0,0,0,1,0,0,0,1]
00019 s2 = child.addCube(0.5, 1.0, 0.1)
00020 s2.b = [0,0.5,0]
00021 s2.diffuse = [0,1,0,1]
00022
00023 sim.initialize()
00024 sim.simulate(3)
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035