Skip to content
Snippets Groups Projects
Commit 7bfba887 authored by Matthew Hansen's avatar Matthew Hansen Committed by Matt Hansen
Browse files

Change QOS settings to transient local + reliable

parent a03b3e40
No related branches found
No related tags found
No related merge requests found
......@@ -51,7 +51,7 @@ public:
initial_pose_pub_ = node->create_publisher<geometry_msgs::msg::PoseWithCovarianceStamped>(
"initialpose", rclcpp::SystemDefaultsQoS());
subscription_ = node->create_subscription<geometry_msgs::msg::PoseWithCovarianceStamped>(
"amcl_pose", rclcpp::SystemDefaultsQoS(),
"amcl_pose", rclcpp::QoS(rclcpp::KeepLast(1)).transient_local().reliable(),
std::bind(&TestAmclPose::amcl_pose_callback, this, _1));
initial_pose_pub_->publish(testPose_);
}
......@@ -85,7 +85,7 @@ bool TestAmclPose::defaultAmclTest()
while (!pose_callback_) {
// TODO(mhpanah): Initial pose should only be published once.
initial_pose_pub_->publish(testPose_);
std::this_thread::sleep_for(100ms);
std::this_thread::sleep_for(1s);
rclcpp::spin_some(node);
}
if (std::abs(amcl_pose_x - testPose_.pose.pose.position.x) < tol_ &&
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment