carla获取rpm
程序员文章站
2022-07-12 11:28:31
...
@see https://github.com/carla-simulator/carla/issues/2989
c = vehicle.get_control()
p = vehicle.get_physics_control()
# TODO: proper simulation
# It is still unclear to me how the gears are modeled in CARLA:
# -1 reverse
# 0 neutral
# But how does this map to the gear ratios?
engine_rpm = p.max_rpm * c.throttle
if c.gear > 0:
gear = p.forward_gears[c.gear]
engine_rpm *= gear.ratio
上一篇: carla使用记录
下一篇: recorder.js