Skip to content
This repository has been archived by the owner on Oct 28, 2021. It is now read-only.

Commit

Permalink
Fix reach example.
Browse files Browse the repository at this point in the history
urdf_robot was None when being added to the viewer. It did not appear that
urdf_robot would ever be Some from the current code.
  • Loading branch information
jpoler committed Jun 20, 2020
1 parent e3c3b4b commit a60ad80
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/planner/joint_path_planner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -278,15 +278,17 @@ where
/// Create from components
///
/// There are also some utility functions to create from urdf
pub fn new(collision_check_robot: k::Chain<N>, collision_checker: CollisionChecker<N>) -> Self {
pub fn new(urdf_robot: urdf_rs::Robot, collision_checker: CollisionChecker<N>) -> Self {
let collision_check_robot = (&urdf_robot).into();
let urdf_robot = Some(urdf_robot);
JointPathPlannerBuilder {
collision_check_robot,
collision_checker,
step_length: na::convert(0.1),
max_try: 5000,
num_smoothing: 100,
collision_check_margin: None,
urdf_robot: None,
urdf_robot,
self_collision_pairs: vec![],
}
}
Expand Down Expand Up @@ -360,10 +362,7 @@ fn get_joint_path_planner_builder_from_urdf<N>(
where
N: RealField + k::SubsetOf<f64> + num_traits::Float,
{
Ok(JointPathPlannerBuilder::new(
(&urdf_robot).into(),
collision_checker,
))
Ok(JointPathPlannerBuilder::new(urdf_robot, collision_checker))
}

#[cfg(test)]
Expand Down

0 comments on commit a60ad80

Please sign in to comment.