Skip to content

Changing the Motion Type

The motion type of a driver can change during a simulation. Add one or more modify_motion operators to the driver_motion_policy batch (nop by default); each one targets a driver by its id.

modify_motion

Parameter Description
id index of the driver
motion new motion parameters, e.g. { motion_type: STATIONARY }
time simulation time at which the motion changes
display prints the new motion type, default false
driver_motion_policy:
  - modify_motion:
      id: 0
      time: 0.5
      motion: { motion_type: LINEAR_COMPRESSIVE_MOTION, motion_vector: [1, 0, 0], sigma: 5, damprate: 0.999 }
      display: true
  - modify_motion:
      id: 0
      time: 1.5
      motion: { motion_type: STATIONARY }
  - modify_motion:
      id: 0
      time: 2.5
      motion: { motion_type: LINEAR_COMPRESSIVE_MOTION, motion_vector: [1, 0, 0], sigma: 5, damprate: 0.999 }
  - modify_motion:
      id: 0
      time: 4.0
      motion: { motion_type: LINEAR_MOTION, motion_vector: [1, 0, 0], const_vel: 3 }
Modify motion

Example: example/polyhedra/rigid_surface/rigid_surface_modify_motion.msp.