run a vehicle dynamics maneuver in 3d environment -凯发k8网页登录

main content

run a vehicle dynamics maneuver in 3d environment

this example shows how to run a vehicle dynamics maneuver in a 3d environment. by integrating vehicle dynamics models with a 3d environment, you can test advanced driver assistance systems (adas) and automated driving (ad) perception, planning, and control software. for the 3d visualization engine platform requirements and hardware recommendations, see .

  1. create and open a working copy of a maneuver reference application. for example, open the double-lane change reference application.

  2. run the maneuver simulation. by default, the 3d environment is disabled.

    when you run the simulation, the visualization subsystem provides driver, vehicle, and response information. the reference application logs vehicle signals during the maneuver, including steering, vehicle and engine speed, and lateral acceleration. you can use the simulation data inspector to import the logged signals and examine the data.

    image of visualization subsystem

    elementdescription

    driver commands

    driver commands:

    • handwheel angle

    • acceleration command

    • brake command

    vehicle response

    vehicle response:

    • engine speed

    • vehicle speed

    • acceleration command

    lane change scope block

    lateral vehicle displacement versus time:

    • red line — cones marking right lane boundary

    • orange line — cones marking left lane boundary

    • blue line — reference trajectory

    • green line — actual trajectory

    steer, velocity, lat accel scope block

    • steerangle — steering angle versus time

    • — longitudinal vehicle velocity versus time

    • — lateral acceleration versus time

    vehicle xy plotter

    vehicle longitudinal versus lateral distance

    iso 15037-1:2006 block

    display iso standard measurement signals in the simulation data inspector, including steering wheel angle and torque, longitudinal and lateral velocity, and sideslip angle

  3. enable the 3d visualization environment. in the visualization subsystem, open the block. set these parameters.

    • 3d engine to enabled.

    • scene name to one of the scenes, for example double lane change.

      3d engine scene parameter option set to double lane change.

    • to position the vehicle in the scene:

      1. select the position initialization method:

        • recommended for scene — set the initial vehicle position to values recommended for the scene

        • user-specified — set your own initial vehicle position

      2. click update the model workspaces with the initial values to overwrite the initial vehicle position in the model workspaces with the applied values.

  4. rerun the reference application. as the simulation runs, in the simulation 3d viewer, view the vehicle response.

    to smoothly change the camera views, use these key commands.

    keycamera view

    1

    back left

    image showing key commands and corresponding camera view

     

    2

    back

    3

    back right

    4

    left

    5

    internal

    6

    right

    7

    front left

    8

    front

    9

    front right

    0

    overhead

    for additional camera controls, use these key commands.

    keycamera control
    tab

    cycle the view between all vehicles in the scene.

     

    mouse scroll wheel

    control the camera distance from the vehicle.

     

    l

    toggle a camera lag effect on or off. when you enable the lag effect, the camera view includes:

    • position lag, based on the vehicle translational acceleration

    • rotation lag, based on the vehicle rotational velocity

    this lag enables improved visualization of overall vehicle acceleration and rotation.

     

    f

    toggle the free camera mode on or off. when you enable the free camera mode, you can use the mouse to change the pitch and yaw of the camera. this mode enables you to orbit the camera around the vehicle.

     

    for example, when you run the double-lane change maneuver, use the cameras to visualize the vehicle as it changes lanes.

    • back

      3d scene back camera view of vehicle.

    • front left

      3d scene front left camera view of vehicle.

    • internal

      3d scene internal camera view of vehicle.

    note

    • to open and close the simulation 3d viewer, use the simulink® run and stop buttons. if you manually close the simulation 3d viewer, simulink stops the simulation with an error.

    • when you enable the 3d visualization environment, you cannot step the simulation back.

related topics

网站地图