Skip to content
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

Replace deprecated spin_until_future_complete #667

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions tf2_ros/test/test_buffer_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ TEST_F(TestBufferServer, lookup_transform_available)
transform.rotation.w = 1.0;
setTransform("test_target_link", "test_source_link", transform);

auto spin_result = executor_.spin_until_future_complete(
auto spin_result = executor_.spin_until_complete(
result_ready_future, std::chrono::seconds(3));
ASSERT_EQ(spin_result, rclcpp::FutureReturnCode::SUCCESS);

Expand All @@ -192,7 +192,7 @@ TEST_F(TestBufferServer, lookup_transform_timeout)
"test_target_link", "test_source_link", std::chrono::seconds(1));

auto start_time = std::chrono::system_clock::now();
auto spin_result = executor_.spin_until_future_complete(
auto spin_result = executor_.spin_until_complete(
result_ready_future, std::chrono::seconds(3));
ASSERT_EQ(spin_result, rclcpp::FutureReturnCode::SUCCESS);
auto end_time = std::chrono::system_clock::now();
Expand All @@ -213,7 +213,7 @@ TEST_F(TestBufferServer, lookup_transform_delayed)
"test_target_link", "test_source_link", std::chrono::seconds(5));

// Expect executor to timeout since transform is not available yet
auto spin_result = executor_.spin_until_future_complete(
auto spin_result = executor_.spin_until_complete(
result_ready_future, std::chrono::seconds(1));
EXPECT_EQ(spin_result, rclcpp::FutureReturnCode::TIMEOUT);

Expand All @@ -228,7 +228,7 @@ TEST_F(TestBufferServer, lookup_transform_delayed)
setTransform("test_target_link", "test_source_link", transform);

// Wait some more
spin_result = executor_.spin_until_future_complete(
spin_result = executor_.spin_until_complete(
result_ready_future, std::chrono::seconds(3));
ASSERT_EQ(spin_result, rclcpp::FutureReturnCode::SUCCESS);

Expand Down
2 changes: 1 addition & 1 deletion tf2_tools/tf2_tools/view_frames.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def main():
node.get_logger().info('service not available, waiting again...')

future = cli.call_async(req)
rclpy.spin_until_future_complete(node, future)
rclpy.spin_until_complete(node, future)

ret = 1
try:
Expand Down