0
我是Bullet的新手。我正在使用pybullet并想制作一辆车。 我使用this standard URDF-model来模拟汽车。子弹物理目标速度(python界面)
我想让我的车去,例如,在直线方向20的速度。 我可以这样写:
p.resetBaseVelocity(car, [20, 0, 0])
和一切都会工作。
此代码:
linearVelocity, angularVelocity = p.getBaseVelocity (car)
print(linearVelocity)
将输出(20, 0, 0)
。但当然,我想借助车轮,使用setJointMotorControl2
,VELOCITY_CONTROL
和targetVelocity
来实现这种效果。我看到this example racecar,我试图在无限平面上运行这台机器,但是我设法达到的线速度大约是(1.0, 0, 0)
,我想要linearVelocity (20, 0, 0)
。我试图改变在URDF模型的代码:
<Limit effort = "10" velocity = "100" />
我将它设置为非常高的值,并提出目标速度非常大,但没有效果。如何更改URDF模型或请给出一个可以高速行驶的模型的简单示例。
我当然可以做到人为地:
linearVelocity = [x * 2 for x in linearVelocity]
p.resetBaseVelocity (my_car, linearVelocity)
但它不漂亮,我想用车轮的目标速度做到这一点。请帮忙。