質問編集履歴

1

情報追加

2019/09/06 22:55

投稿

robomoco
robomoco

スコア31

test CHANGED
File without changes
test CHANGED
@@ -1 +1,59 @@
1
1
  **pybullet**(物理エンジン)でシミュレーションをしたいのですが,コードを実行すると,ものの20秒でCPU,GPU使用率が80%を超えて電力消費が非常に高くなってファンがぶんぶん回って,パソコンが熱くなります。この状態で使い続けるとPCが壊れそうで不安です。何か良い方法はありますか?OSはwindowsでノートパソコンを使ってます。
2
+
3
+
4
+
5
+ PCスペック
6
+
7
+ CPU: Intel(R)Core(TM)i5-6300HQ CPU @2.30GHz
8
+
9
+ RAM: 12.0GB
10
+
11
+ OS: Windows10 Home
12
+
13
+ HDD
14
+
15
+ ![](04d41905a6f95848389034edef389c97.png)
16
+
17
+
18
+
19
+ 使用コード
20
+
21
+ ```Python
22
+
23
+ import pybullet as p
24
+
25
+ import time
26
+
27
+ import pybullet_data
28
+
29
+ physicsClient = p.connect(p.GUI)#or p.DIRECT for non-graphical version
30
+
31
+ p.setAdditionalSearchPath(pybullet_data.getDataPath()) #optionally
32
+
33
+ p.setGravity(0,0,-10)
34
+
35
+ planeId = p.loadURDF("plane.urdf")
36
+
37
+ cubeStartPos = [0,0,1]
38
+
39
+ cubeStartOrientation = p.getQuaternionFromEuler([0,0,0])
40
+
41
+ boxId = p.loadURDF("r2d2.urdf",cubeStartPos, cubeStartOrientation)
42
+
43
+ for i in range (10000):
44
+
45
+ p.stepSimulation()
46
+
47
+ time.sleep(1./240.)
48
+
49
+ cubePos, cubeOrn = p.getBasePositionAndOrientation(boxId)
50
+
51
+ print(cubePos,cubeOrn)
52
+
53
+ p.disconnect()
54
+
55
+
56
+
57
+
58
+
59
+ ```