We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6d4c7db commit dd430bfCopy full SHA for dd430bf
crates/control/src/motion/step_planner.rs
@@ -88,15 +88,7 @@ impl StepPlanner {
88
let target_pose = match segment {
89
PathSegment::LineSegment(line_segment) => {
90
let direction = line_segment.1 - line_segment.0;
91
- let rotation = if direction.coords().norm_squared() < f32::EPSILON {
92
- Orientation2::identity()
93
- } else {
94
- let normalized_direction = direction.coords().normalize();
95
- Orientation2::from_cos_sin_unchecked(
96
- normalized_direction.x(),
97
- normalized_direction.y(),
98
- )
99
- };
+ let rotation = Orientation2::from_vector(direction);
100
Pose2::from_parts(line_segment.1, rotation)
101
}
102
PathSegment::Arc(arc, orientation) => {
0 commit comments