fix: typo in latency tester

Also bump package ver.
Finishes latency_tester for now, it is functional, now we just need to use it.
This commit is contained in:
David
2025-09-26 16:11:49 -05:00
parent 2a797693a2
commit 75fefa7048
2 changed files with 3 additions and 2 deletions

View File

@@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>latency_tester</name>
<version>0.0.0</version>
<version>1.0.0</version>
<description>Tests latency in ASTRA's comms.</description>
<maintainer email="ds0196@uah.edu">David</maintainer>
<license>Apache-2.0</license>

View File

@@ -41,7 +41,7 @@ private:
void timer_callback() // Send ping to embedded at 1 Hz
{
auto message = std_msgs::msg::String();
message.data = "core_relay_tovic," + target_mcu_ + ",1," + std::to_string(count_++) + '\n';
message.data = "can_relay_tovic," + target_mcu_ + ",1," + std::to_string(count_++) + '\n';
publisher_->publish(message);
RCLCPP_INFO(this->get_logger(), "Sending ping #%ld to %s", count_, target_mcu_.c_str());
last_send_stamp_ = this->get_clock()->now();
@@ -59,6 +59,7 @@ private:
return;
}
// TODO: add topic for this so we can plot with MATLAB while using core/arm
RCLCPP_INFO(this->get_logger(), "Received pong from %s after %lf ms", target_mcu_.c_str(),
(now - last_send_stamp_).nanoseconds() / 1000000.0);
}