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

Change the order of tests to fix timing issues #498

Merged
merged 1 commit into from
Feb 12, 2025
Merged
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
10 changes: 4 additions & 6 deletions gz_ros2_control_tests/tests/effort_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,6 @@ def test_clock(self):
with WaitForTopics(topic_list, timeout=10.0):
print('/clock is receiving messages!')

def test_controller_running(self, proc_output):

cnames = ['joint_trajectory_controller', 'joint_state_broadcaster']

check_controllers_running(self.node, cnames)

def test_check_if_msgs_published(self):
check_if_js_published(
'/joint_states',
Expand All @@ -101,6 +95,10 @@ def test_check_if_msgs_published(self):

def test_arm(self, launch_service, proc_info, proc_output):

# Check if the controllers are running
cnames = ['joint_trajectory_controller', 'joint_state_broadcaster']
check_controllers_running(self.node, cnames)

proc_action = Node(
package='gz_ros2_control_demos',
executable='example_effort',
Expand Down
10 changes: 4 additions & 6 deletions gz_ros2_control_tests/tests/position_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,6 @@ def test_clock(self):
with WaitForTopics(topic_list, timeout=10.0):
print('/clock is receiving messages!')

def test_controller_running(self, proc_output):

cnames = ['joint_trajectory_controller', 'joint_state_broadcaster']

check_controllers_running(self.node, cnames)

def test_check_if_msgs_published(self):
check_if_js_published(
'/joint_states',
Expand All @@ -101,6 +95,10 @@ def test_check_if_msgs_published(self):

def test_arm(self, launch_service, proc_info, proc_output):

# Check if the controllers are running
cnames = ['joint_trajectory_controller', 'joint_state_broadcaster']
check_controllers_running(self.node, cnames)

proc_action = Node(
package='gz_ros2_control_demos',
executable='example_position',
Expand Down
18 changes: 8 additions & 10 deletions gz_ros2_control_tests/tests/velocity_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,16 +85,6 @@ def test_clock(self):
with WaitForTopics(topic_list, timeout=10.0):
print('/clock is receiving messages!')

def test_controller_running(self, proc_output):

cnames = [
'joint_trajectory_controller',
'joint_state_broadcaster',
'imu_sensor_broadcaster'
]

check_controllers_running(self.node, cnames)

def test_check_if_msgs_published(self):
check_if_js_published(
'/joint_states',
Expand All @@ -105,6 +95,14 @@ def test_check_if_msgs_published(self):

def test_arm(self, launch_service, proc_info, proc_output):

# Check if the controllers are running
cnames = [
'joint_trajectory_controller',
'joint_state_broadcaster',
'imu_sensor_broadcaster'
]
check_controllers_running(self.node, cnames)

proc_action = Node(
package='gz_ros2_control_demos',
executable='example_velocity',
Expand Down
Loading