# Pedestrian Plugins #

Pedestrians are plugins that have the ability to be customized in appearance, animation and behavior in your simulations. This allows you to add variations of pedestrian types. Asset source must be cloned and built locally. See build instructions.

Pedestrian asset bundles are detected from <simulator installation path>/AssetBundles/Pedestrians and must be placed there manually for custom binaries or in source code for developer mode. They are loaded automatically on editor or simulation start.

## Pedestrian Models top#

Pedestrian models allow customization of pedestrian meshes and animations. We support bipedal, and quadrupedal rigs.

Create a new collection folder in Assets/External/Pedestrians/YourPedestrianCollection. Create a folder for each type of pedestrian. Place all textures, meshes, animation controller and one prefab in this folder. Be sure the prefab is named the same as the containing folder.

## Pedestrian Animations top#

SVL Simulator supports human and bird bipedal, and quadrupedal animations. They must be included in the model data and require an AnimationController.controller asset. This controller is the animation state machine that is referenced in the Animator component on the prefab root object.

In the animation controller, the animation parameter named speed must be setup and set as a transition condition. With this parameter, pedestrian animation speed and transitions, can be effected by the pedestrian rigidbody speed. This is the only default parameter supported in the pedestrian controller.

## Pedestrian Ground Truth top#

SVL Simulator supports run-time creation of ground truth bounding boxes for pedestrians with skinned mesh renderers. Any other render will use default values for ground truth. Users must adjust the skinned mesh renderer bounds to best fit the mesh.

## Building Pedestrian Plugins top#

Pedestrians are grouped into collections to organize each type. Place pedestrians groups in Assets/External/Pedestrians/CollectionFolder/ in separate named folders to have all CollectionFolder vehicles show up in the build menu in a group.

To build a pedestrian,

1. Open Simulator -> Build... menu item
2. Select a pedestrian in the build window
3. Click Build

The bundle named npc_XXX will be placed in the AssetBundles/Pedestrians/CollectionFolder folder in source code. This is where simulator loads pedestrian bundles at runtime. To have pedestrians load in a binary, they must be placed in the AssetBundles/Pedestrians/ folder in that binary.

See build instructions for more details.