Function log_trajectory

Source
pub fn log_trajectory(
    rec: &RecordingStream,
    trajectory: &Trajectory,
) -> Result<(), SimulationError>
Expand description

log trajectory data to the rerun recording stream

§Arguments

  • rec - The rerun::RecordingStream instance
  • trajectory - The Trajectory instance

§Errors

  • If the data cannot be logged to the recording stream

§Example

use peng_quad::{Trajectory, log_trajectory};
use nalgebra::Vector3;
let rec = rerun::RecordingStreamBuilder::new("peng").spawn().unwrap();
let mut trajectory = Trajectory::new(nalgebra::Vector3::new(0.0, 0.0, 0.0));
trajectory.add_point(nalgebra::Vector3::new(1.0, 0.0, 0.0));
log_trajectory(&rec, &trajectory).unwrap();