carla-simulator / scenario_runner

Traffic scenario definition and execution engine
https://carla-scenariorunner.readthedocs.io/en/latest/
MIT License
519 stars 358 forks source link

metrics_parser #1044

Closed starrye closed 5 months ago

starrye commented 9 months ago

Describe the bug hello,i find a problem. in tools/metrics_parser.py parse_wheels_controlfunction, I don't know if it's my carla's problem, could you please check it for me?

wheels_control = carla.WheelPhysicsControl(
        tire_friction=float(info[3]),
        damping_rate=float(info[5]),
        max_steer_angle=float(info[7]),
        radius=float(info[9]),
        max_brake_torque=float(info[11]),
        max_handbrake_torque=float(info[13]),
        position=carla.Vector3D(
            x=float(info[17][1:-1]) / 100,
            y=float(info[17][:-1]) / 100,
            z=float(info[17][:-1]) / 100)
    )

in my carla log, this line:

wheels:
    wheel 0: tire_friction 3.5 damping_rate 0.25 max_steer_angle 70 radius 37 max_brake_torque 700 max_handbrake_torque 0 position (-53430.1, 100.245, 36.9745)
    wheel 1: tire_friction 3.5 damping_rate 0.25 max_steer_angle 70 radius 37 max_brake_torque 700 max_handbrake_torque 0 position (-53430.1, 257.458, 36.9745)
    wheel 2: tire_friction 3.5 damping_rate 0.25 max_steer_angle 0 radius 37 max_brake_torque 700 max_handbrake_torque 1400 position (-53705.4, 100.246, 36.9735)
    wheel 3: tire_friction 3.5 damping_rate 0.25 max_steer_angle 0 radius 37 max_brake_torque 700 max_handbrake_torque 1400 position (-53705.4, 257.459, 36.9736)

Is this supposed to be

x = float(info[15][1:-1] / 100)
y = float(info[16][:-1] / 100)
z = float(info[17][:-1] / 100)

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

glopezdiest commented 5 months ago

Hello @starrye, yes, that is correct. I'll do a PR fixing it now