Optical motion capture gives you an external, time-synchronized ground truth for legged locomotion, so you can quantify whether your controller executed the gait you planned. In practice, teams use systems such as OptiTrack (NaturalPoint), NDI Optotrak Certus, or Nokov Mars-series setups to reconstruct 3D marker trajectories for the trunk and feet.
This guide focuses on three outputs you can extract from mocap with high repeatability: foot-end trajectories (swing and stance paths), touchdown placement (where the foot actually lands), and trunk kinematics (pose excursions and drift). A Shanghai Jiao Tong University hexapod project, for example, used eight Nokov Mars 2H cameras in a 9 m × 6 m space at 60 Hz to support leg calibration and coordination, which is the same measurement backbone you need for gait evaluation.
Boundary condition: mocap measures kinematics. If you need contact force, CoP, or contact wrench, you must add force plates, instrumented feet, motor current/torque models, or an impedance/terrain model.
You need a working mocap pipeline before you compute any gait metric: tracked markers, a calibrated capture volume, and synchronized robot logs.
Essentials that hold up in real lab runs (OptiTrack or Nokov all follow this pattern):
Markers and rigid bodies: use markers compatible with the selected motion capture system. Camera-based systems such as OptiTrack and NOKOV typically use passive reflective markers, while NDI Optotrak Certus uses active infrared-emitting markers (IREDs). Select marker sizes appropriate for the capture distance.
Camera calibration + verified capture volume: cover at least one full stride plus any planned turns; Shandong University captured a quadruped in an outdoor 14 m × 8 m area at 60 Hz.
Controller logs on the same timeline: commanded foot trajectories, gait phase, joint angles, and mode flags (position vs impedance).
Frame conventions: define a world frame (mocap lab frame) and a robot body frame (trunk rigid body) and document axis directions.
Clock synchronization: align the mocap timebase to the robot clock using a hardware trigger, TTL line, or at minimum a logged sync pulse.
If you skip synchronization, you will mis-attribute phase lag to tracking error. A 20 ms mismatch at 100 Hz equals two frames, which can move an apparent touchdown by multiple centimeters at moderate swing speeds.
A good marker set supports continuous trunk pose, unambiguous foot tracking, and enough redundancy to survive occlusion during swing. The quickest way to validate is to record a slow stepping sequence and inspect marker visibility in your motion capture software (OptiTrack Motive, NOKOV Xingying, or NDI Optotrak software).
Step 1: Place trunk rigid body for pose continuity
Mount a rigid cluster on the trunk with at least 3 non-collinear markers so the solver produces a stable 6D pose through yaw and pitch changes. In a quadruped posture-tracking experiment using OptiTrack with 12 cameras, researchers compared desired versus measured body translation and saw up to 0.6 cm max position difference, which only works when the trunk rigid body remains identified across the entire trial.
Step 2: Add foot/end-effector markers; avoid self-occlusion
Put markers on each foot end-effector where the camera array can see them during both stance and swing. On a hexapod, toe markers often disappear behind adjacent legs during swing retraction; teams solve this by using two markers per foot placed on different faces of the foot link so at least one remains visible at extreme joint angles.
Step 3: Add optional shank/thigh markers for kinematics checks
If you expect inverse-kinematics issues or link flex, add markers on the shank and thigh to cross-check forward kinematics against measured segment motion. This matters when you see workspace violations: a planned foot point outside the leg workspace can force IK to select a different branch, which shows up as a clean trunk trajectory but a distorted foot path.
Before committing, run a visibility check across extreme postures: maximum stride extension, highest foot clearance, and any roll/pitch you allow during gait. For setup examples in legged platforms and multi-legged calibration workflows, see motion capture for legged and multi-legged robots.
Compute foot-end trajectory tracking error by transforming mocap foot positions into the same coordinate frame as your planned trajectory, segmenting swing versus stance, time-normalizing strides, and then taking pointwise 3D differences between planned and measured paths. Compute clearance from the swing-phase vertical profile and flag scuff events when minimum clearance approaches zero.
Start by using precise definitions, because teams often mix these metrics:
Foot-end trajectory tracking error: continuous error between the measured foot path and the planned path over time during swing or stance.
Touchdown position error: spatial error at the touchdown event only, comparing measured touchdown location to the planned foothold.
A concrete example of why the frame transform matters comes from a quadruped locomotion-adaptation study that used a single-leg prototype and an NDI Optotrak Certus at 100 Hz to measure foot-end trajectories. Their planned trajectory lived in the robot’s coordinate system, so they computed a homogeneous transform from four corresponding points measured in both frames before comparing trajectories.
Step 1: Segment swing/stance using kinematic event rules
Use foot vertical position and velocity to detect lift-off and touchdown. A rule that works for rigid lab floors: classify touchdown when vertical velocity crosses toward zero and the foot height reaches a local minimum near the ground plane; classify lift-off when the foot height rises above a threshold. If your robot logs contact state from foot switches or estimated contact, use it as a cross-check.
Step 2: Time-normalize strides; align to lift-off/touchdown
Resample each stride to a fixed length, such as 100 points per stride, aligned on touchdown. Human gait work uses this normalization because it allows stride-averaging and variance analysis across perturbations. For robots, it also makes phase drift visible when the controller slips a few frames over long runs.
Step 3: Compute 3D tracking error to planned trajectory (if available)
After transforming mocap positions into the robot planning frame, compute the pointwise Euclidean error. Report it separately for swing and stance because stance includes ground interaction. In a quadruped robot study, researchers measured the foot-end positions of a leg moving through commanded points and reported final position errors of 0.22 to 0.84 cm, with a mean of 0.4061 cm. The authors noted that the results should be considered in the context of the approximately 1 cm marker size.
Compute clearance metrics from the swing segment, because clearance is a swing requirement even when stance tracking is acceptable:
Peak swing height: maximum foot height above the ground plane during swing.
Minimum clearance: minimum foot height after lift-off and before touchdown; report the 5th percentile across steps to capture near-scuffs.
Toe scuff events: count strides where minimum clearance falls below a threshold you can defend, for example 2–3 mm in a lab or a larger threshold on rough terrain mockups.
Boundary note: Clearance is kinematic; mocap does not observe contact force. A foot can show 5 mm “clearance” while still grazing compliant grass, because the grass deflects without a clean kinematic signature.
If you evaluate stance tracking, tie it to your controller mode. In a single-leg drop comparison, a 44 mm drop under impedance control produced 4.309 A peak current and stable behavior, while position control at only 10 mm produced 11.03 A peak current with unstable impact response. Mocap shows the displacement; motor current or force sensing explains the impact.
Measure foot placement by detecting the touchdown event and recording the foot position in a defined reference frame. Measure foot placement accuracy by comparing that measured touchdown position to the planned foothold for the same step index.
Pick a reference frame and keep it consistent across reports:
World frame placement: useful for absolute drift, path following, and map-aligned footholds.
Stance-foot frame placement: useful for inter-leg coordination and body-state-to-step mappings because it removes global drift.
For accuracy, you need a planned foothold or commanded landing point. The acceptable foot placement error should be defined according to the robot's task, foot geometry, and terrain conditions.
Contact-event identification from kinematics works on hard, flat surfaces. On soft terrain such as sponge or grass, the foot can penetrate without a sharp kinematic breakpoint; the compliance-estimation work handled this by synchronizing mocap displacement with a force sensor at the foot and identifying contact onset from force.
Metric | Frame | Requires plan? | Typical use |
Touchdown position (x,y,z) | World | No | Map-aligned validation, drift detection |
Step length / step width | World or stance-foot | No | Gait characterization across speed changes |
Touchdown position error | World or body | Yes | Foothold execution accuracy, calibration checks |
Inter-leg timing vs placement | Stance-foot | Optional | Coordination debugging in multi-legged gaits |
For multi-legged coordination examples where placement and timing interact, see hexapod robot leg coordination using motion capture.
Quantify body motion by reporting trunk pose and its variability over strides, then compute stability proxies such as support-polygon margins from kinematics while clearly separating measured quantities from derived heuristics. Mocap gives you high-quality pose; it does not give you ground reaction forces.
Report trunk pose metrics directly from the rigid body defined in your motion capture software (e.g., OptiTrack Motive or NOKOV Xingying), or from your own least-squares rigid-body fit:
Trunk position and drift in world coordinates over time.
Roll/pitch/yaw excursions per stride, including peak-to-peak values.
Center of mass (CoM) trajectory: estimate the robot's center of mass using its kinematic model and segment mass distribution. If these are unavailable, report trunk motion separately.
Derived stability proxies can be useful for triage when you cannot instrument forces. A standard example in quasi-static quadrupeds is the support polygon check: compute the polygon from stance feet and measure the distance from the projected CoM to the polygon edges. A quadruped walking evaluation used this to verify that the projected COM stayed inside the polygon during a double-step sequence.
Keep the boundaries explicit:
Mocap cannot provide GRF, CoP, or contact wrench without force plates, instrumented feet, or a validated model.
Correlation between body state and foot placement does not prove active control. Human perturbation studies reported that midstance COM state explained about 38% of anteroposterior and 74% of mediolateral foot-placement variance in unperturbed walking, and those mappings changed under forward versus backward perturbations. Use that result as a framework for robot evaluation, not as target coefficients.
Separate evidence types in your interpretation. Human gait data supports analysis structure; simulation supports controller mechanism claims; physical robot experiments validate hardware and estimator limitations. For broader applications of mocap in bio-inspired platforms beyond gait scoring, see motion capture for bio-inspired robots.
A mocap gait report becomes reusable when another engineer can reproduce your segmentation and frame transforms, then reach the same numbers within measurement noise.
Report this minimum reproducibility set:
Coordinate frames: world axes, body frame definition, and any world-to-robot transform method (for example, 4-point homogeneous transform).
Marker layout: photos plus rigid body definitions and marker sizes.
Sampling rate and filters: camera Hz (60 or 100 Hz are common) and any smoothing, such as a Butterworth low-pass with a stated cutoff.
Event rules: lift-off/touchdown kinematic thresholds or contact-state source.
Use a trial matrix that forces controller tradeoffs:
Speeds and step frequencies across at least two regimes.
Gaits (trot, walk, wave gait) if your platform supports them.
Terrain mockups: rigid floor plus one compliant material, as in compliance-estimation experiments using rubber and sponge.
Commanded footholds: nominal plus offset steps to test placement accuracy.
Tie metrics to next actions: persistent swing tracking error points to IK or timing bugs, scuff counts drive clearance retuning, and trunk roll excursions during stance point to impedance gains, foot compliance, or actuator saturation.