mirror of
https://github.com/modelec/modelec-marcel-ROS.git
synced 2026-01-18 16:47:43 +01:00
debug
This commit is contained in:
@@ -84,6 +84,8 @@ namespace Modelec
|
||||
rclcpp::Subscription<std_msgs::msg::Bool>::SharedPtr start_odo_sub_;
|
||||
bool start_odo_ = false;
|
||||
|
||||
rclcpp::TimerBase::SharedPtr odo_get_pos_timer_;
|
||||
|
||||
// Promises and mutexes to synchronize service responses asynchronously
|
||||
std::queue<std::promise<long>> tof_promises_;
|
||||
std::mutex tof_mutex_;
|
||||
|
||||
@@ -181,6 +181,16 @@ namespace Modelec
|
||||
SendOrder("START", {std::to_string(msg->data)});
|
||||
}
|
||||
});
|
||||
|
||||
odo_get_pos_timer_ = this->create_wall_timer(
|
||||
std::chrono::milliseconds(100),
|
||||
[this]()
|
||||
{
|
||||
if (isOk && start_odo_)
|
||||
{
|
||||
GetPos();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
PCBOdoInterface::~PCBOdoInterface()
|
||||
|
||||
Reference in New Issue
Block a user