以下の内容はhttps://shuzo-kino.hateblo.jp/entry/2024/03/26/224900より取得しました。


pybulletをJupyter Notebookでつかう その3:addUserDebugLine

実際のところ

メソッドの詳細

lineId = p.addUserDebugLine(lineFromXYZ, lineToXYZ, lineColorRGB, lineWidth, lifeTime)

使い方

import pybullet as p

p.connect(p.GUI)

# 線の開始点と終了点
start_point = [0, 0, 0]
end_point = [1, 1, 1]

# 線を描画(赤色)
p.addUserDebugLine(start_point, end_point, [1, 0, 0], 2)

p.setGravity(0, 0, -10)
p.loadURDF("plane.urdf")

# シミュレーションを少し実行して、GUIで線を見る
for _ in range(1000):
    p.stepSimulation()



以上の内容はhttps://shuzo-kino.hateblo.jp/entry/2024/03/26/224900より取得しました。
このページはhttp://font.textar.tv/のウェブフォントを使用してます

不具合報告/要望等はこちらへお願いします。
モバイルやる夫Viewer Ver0.14