Skip to content

Commit

Permalink
Fix integration script for Iron
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanscherzinger committed Sep 21, 2023
1 parent 452deb9 commit 43a12f0
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions cartesian_controller_tests/integration_tests/integration_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
from geometry_msgs.msg import PoseStamped
from geometry_msgs.msg import WrenchStamped

import os

distro = os.environ['ROS_DISTRO']

def generate_test_description():

Expand Down Expand Up @@ -181,13 +184,20 @@ def check_state(self, controller, state):
def start_controller(self, controller):
""" Start the given controller """
req = SwitchController.Request()
req.start_controllers = [controller]
if distro == 'iron':
req.activate_controllers = [controller]
else:
req.start_controllers = [controller]

self.perform_switch(req)

def stop_controller(self, controller):
""" Stop the given controller """
req = SwitchController.Request()
req.stop_controllers = [controller]
if distro == 'iron':
req.deactivate_controllers = [controller]
else:
req.stop_controllers = [controller]
self.perform_switch(req)

def perform_switch(self, req):
Expand Down

0 comments on commit 43a12f0

Please sign in to comment.