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


hpp-fcl
Author(s):
autogenerated on Fri Jun 2 2023 02:39:00