This commit is contained in:
acki
2025-05-29 16:27:03 -04:00
parent 57273c1534
commit 7bfbc8e0a6
2 changed files with 6 additions and 5 deletions

View File

@@ -219,7 +219,7 @@ namespace Modelec
void PCBOdoInterface::PCBCallback(const std_msgs::msg::String::SharedPtr msg)
{
RCLCPP_INFO(this->get_logger(), "Received from PCB: %s", msg->data.c_str());
//RCLCPP_INFO(this->get_logger(), "Received from PCB: %s", msg->data.c_str());
std::vector<std::string> tokens = split(trim(msg->data), ';');
if (tokens.size() < 2)
{
@@ -640,8 +640,6 @@ namespace Modelec
{
if (pcb_publisher_)
{
RCLCPP_INFO(this->get_logger(), "Sending to PCB: %s", data.c_str());
auto message = std_msgs::msg::String();
message.data = data;
pcb_publisher_->publish(message);
@@ -711,6 +709,8 @@ namespace Modelec
void PCBOdoInterface::AddWaypoint(const int index, const bool IsStopPoint, const long x, const long y,
const double theta)
{
RCLCPP_INFO(this->get_logger(), "Adding waypoint: %d, Stop: %s, Pos: (%ld, %ld), Theta: %.2f",
index, IsStopPoint ? "true" : "false", x, y, theta);
if (!start_odo_)
{
SendOrder("START", {std::to_string(true)});

View File

@@ -131,12 +131,13 @@ namespace Modelec
void NavigationHelper::Update()
{
/*if ((node_->now() - last_odo_get_pos_time_).seconds() > 0.5)
if ((node_->now() - last_odo_get_pos_time_).seconds() > 0.5)
{
RCLCPP_INFO(node_->get_logger(), "Requesting current position from odometry");
std_msgs::msg::Empty empty_msg;
odo_get_pos_pub_->publish(empty_msg);
last_odo_get_pos_time_ = node_->now();
}*/
}
}
void NavigationHelper::SendGoTo()