Skip to content

Commit

Permalink
Fix failure in bringup test (#740)
Browse files Browse the repository at this point in the history
  • Loading branch information
sea-bass authored Aug 8, 2023
1 parent 3e38458 commit 5483824
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
10 changes: 9 additions & 1 deletion doc/tutorials/quickstart_in_rviz/test/bringup_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
#include <rclcpp/rclcpp.hpp>
#include <rclcpp_action/rclcpp_action.hpp>

#include <chrono>
#include <future>
#include <gtest/gtest.h>
#include <stdlib.h>

Expand Down Expand Up @@ -71,7 +73,13 @@ TEST_F(BringupTestFixture, BasicBringupTest)
};
auto send_goal_options = rclcpp_action::Client<control_msgs::action::FollowJointTrajectory>::SendGoalOptions();
send_goal_options.result_callback = result_cb;
control_client->async_send_goal(joint_traj_request, send_goal_options);

// Ensure the status of executing the trajectory is not a timeout.
auto goal_handle_future = control_client->async_send_goal(joint_traj_request, send_goal_options);
ASSERT_NE(goal_handle_future.wait_for(std::chrono::seconds(5)), std::future_status::timeout);

// Sleeping for a bit helps prevent segfaults when shutting down the control node.
std::this_thread::sleep_for(std::chrono::seconds(1));
}
} // namespace moveit2_tutorials::quickstart_in_rviz

Expand Down
1 change: 0 additions & 1 deletion doc/tutorials/quickstart_in_rviz/test/bringup_test.test.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ def generate_test_description():
),
base_launch,
# The test itself
bringup_test,
TimerAction(period=2.0, actions=[bringup_test]),
launch_testing.actions.ReadyToTest(),
]
Expand Down

0 comments on commit 5483824

Please sign in to comment.