-
Notifications
You must be signed in to change notification settings - Fork 123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Port the "Add reset to batch optimizer" patch to ROS 2 Rolling #361
base: rolling
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -131,6 +131,11 @@ TEST_F(FixedLagIgnitionFixture, SetInitialState) | |
pose_msg1.pose.covariance[35] = 1.0; | ||
relative_pose_publisher->publish(pose_msg1); | ||
|
||
/// @todo(swilliams) There is a timing or message queuing issue. This sleep "solves" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This unrelated unit test was failing on my machine. It appears to be a timing or message queue issue. The Pose2D sensor is only receiving the second published messages with a timestamp of 3.0s. The previous message with a timestamp of 2.0s is never processed. As a quick fix, I just added a delay. But this seems like a problem that should be fixable by changing a message queue size somewhere. |
||
/// the problem on my local machine, but this isn't a very robust | ||
/// solution. | ||
rclcpp::sleep_for(std::chrono::milliseconds(10)); | ||
|
||
auto pose_msg2 = geometry_msgs::msg::PoseWithCovarianceStamped(); | ||
pose_msg2.header.stamp = rclcpp::Time(3, 0, RCL_ROS_TIME); | ||
pose_msg2.header.frame_id = "base_link"; | ||
|
@@ -146,6 +151,8 @@ TEST_F(FixedLagIgnitionFixture, SetInitialState) | |
pose_msg2.pose.covariance[35] = 1.0; | ||
relative_pose_publisher->publish(pose_msg2); | ||
|
||
rclcpp::sleep_for(std::chrono::milliseconds(10)); | ||
|
||
// Wait for the optimizer to process all queued transactions | ||
rclcpp::Time result_timeout = node->now() + rclcpp::Duration::from_seconds(1.0); | ||
auto odom_msg = nav_msgs::msg::Odometry(); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm doing a bit of variable rearranging. This is not strictly required for this patch, but I wanted to mirror the FixedLagSmoother pattern in the BatchOptimizer.