scripts/collision.py
Go to the documentation of this file.
1 # Load "env.obj" and "rob.obj" in gepetto-gui
2 
3 import os
4 from gepetto.corbaserver import Client
5 
6 path = None
7 devel_hpp_dir = os.getenv("DEVEL_HPP_DIR")
8 if devel_hpp_dir:
9  path = devel_hpp_dir + "/src/hpp-fcl/test/fcl_resources"
10 else:
11  path = os.getenv("PWD") + "/fcl_resources"
12 
13 Red = [1, 0, 0, 0.5]
14 Green = [0, 1, 0, 0.5]
15 Blue = [0, 0, 1, 0.5]
16 
17 c = Client()
18 wid = 0
19 
20 sceneName = "scene"
21 wid = c.gui.createWindow("test-fcl")
22 
23 c.gui.createScene(sceneName)
24 c.gui.addSceneToWindow(sceneName, wid)
25 
26 c.gui.addMesh("env", path + "/env.obj")
27 c.gui.addMesh("rob", path + "/rob.obj")
28 c.gui.addToGroup("env", sceneName)
29 c.gui.addToGroup("rob", sceneName)
30 
31 q2 = (0, 0, 0, 0, 0, 0, 1)
32 q1 = (-1435.35587657243, 2891.398094594479, 1462.830701842904) + (
33  0.6741912139367736,
34  -0.2384437590607974,
35  0.6418622372743962,
36  -0.2768097707389008,
37 )
38 
39 c.gui.applyConfiguration("env", q1)
40 c.gui.applyConfiguration("rob", q2)
41 
42 c.gui.refresh()


hpp-fcl
Author(s):
autogenerated on Fri Aug 2 2024 02:45:13