mirror of
https://github.com/SHC-ASTRA/rover-ros2.git
synced 2026-02-11 09:20:40 +00:00
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:
@@ -2,7 +2,7 @@
|
|||||||
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
|
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
|
||||||
<package format="3">
|
<package format="3">
|
||||||
<name>latency_tester</name>
|
<name>latency_tester</name>
|
||||||
<version>0.0.0</version>
|
<version>1.0.0</version>
|
||||||
<description>Tests latency in ASTRA's comms.</description>
|
<description>Tests latency in ASTRA's comms.</description>
|
||||||
<maintainer email="ds0196@uah.edu">David</maintainer>
|
<maintainer email="ds0196@uah.edu">David</maintainer>
|
||||||
<license>Apache-2.0</license>
|
<license>Apache-2.0</license>
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ private:
|
|||||||
void timer_callback() // Send ping to embedded at 1 Hz
|
void timer_callback() // Send ping to embedded at 1 Hz
|
||||||
{
|
{
|
||||||
auto message = std_msgs::msg::String();
|
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);
|
publisher_->publish(message);
|
||||||
RCLCPP_INFO(this->get_logger(), "Sending ping #%ld to %s", count_, target_mcu_.c_str());
|
RCLCPP_INFO(this->get_logger(), "Sending ping #%ld to %s", count_, target_mcu_.c_str());
|
||||||
last_send_stamp_ = this->get_clock()->now();
|
last_send_stamp_ = this->get_clock()->now();
|
||||||
@@ -59,6 +59,7 @@ private:
|
|||||||
return;
|
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(),
|
RCLCPP_INFO(this->get_logger(), "Received pong from %s after %lf ms", target_mcu_.c_str(),
|
||||||
(now - last_send_stamp_).nanoseconds() / 1000000.0);
|
(now - last_send_stamp_).nanoseconds() / 1000000.0);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user