Skip to content

Commit 47c1472

Browse files
committed
bug in safe turn ongit add poulpe_ethercat_controller/src/lib.rs !
1 parent 650ed5b commit 47c1472

File tree

1 file changed

+2
-1
lines changed
  • poulpe_ethercat_controller/src

1 file changed

+2
-1
lines changed

poulpe_ethercat_controller/src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,7 @@ impl PoulpeController {
528528
&& (current_position
529529
.iter()
530530
.zip(target_position.iter())
531-
.all(|(a, b)| (a - b).abs() > 0.001))
531+
.any(|(a, b)| (a - b).abs() > 0.001))
532532
{
533533
self.set_target_position(id, current_position.clone())
534534
.unwrap();
@@ -537,6 +537,7 @@ impl PoulpeController {
537537
self.get_current_target_position(id).unwrap().unwrap();
538538
tries += 1;
539539
}
540+
std::thread::sleep(std::time::Duration::from_millis(5));
540541
// throw error if the target position is not set correctly
541542
if tries == 5 {
542543
log::error!("Error setting target position!");

0 commit comments

Comments
 (0)