wip-behaviors #3
@@ -51,13 +51,13 @@ public:
|
||||
|
||||
if(checkIfInPose(pose)) {
|
||||
if(checkIfPosesAreClose(last_pos, pose)) {
|
||||
if(clock.now() - last_pos_change > rclcpp::Duration::from_seconds(timeout)) {
|
||||
if(rclcpp::Time(pose.header.stamp) - last_pos_change > rclcpp::Duration::from_seconds(timeout)) {
|
||||
haltChild();
|
||||
return BT::NodeStatus::SUCCESS;
|
||||
}
|
||||
} else {
|
||||
last_pos = pose;
|
||||
last_pos_change = clock.now();
|
||||
last_pos_change = pose.header.stamp;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user