Skip to content

Commit

Permalink
Reuse test model for benchmarks.
Browse files Browse the repository at this point in the history
  • Loading branch information
kylc committed Dec 7, 2023
1 parent 03f5624 commit 36ce5f7
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions crates/optik/benches/bench.rs
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
use criterion::{black_box, criterion_group, criterion_main, Criterion};
use k::Chain;
use nalgebra::Isometry3;

use optik::*;

const BENCHMARK_MODEL_PATH: &str = "../../models/ur3e.urdf";
const BENCHMARK_MODEL_EE_NAME: &str = "ur_ee_link";
const BENCH_MODEL_STR: &str = include_str!("../tests/data/ur3e.urdf");

fn load_benchmark_model() -> Robot {
let chain = Chain::<f64>::from_urdf_file(BENCHMARK_MODEL_PATH).unwrap();
let serial = k::SerialChain::from_end(chain.find_link(BENCHMARK_MODEL_EE_NAME).unwrap());

Robot::new(serial)
Robot::from_urdf_str(BENCH_MODEL_STR, "ur_base_link", "ur_ee_link")
}

fn bench_jacobian(c: &mut Criterion) {
Expand Down

0 comments on commit 36ce5f7

Please sign in to comment.