29 from controller_manager_tests
import ControllerManagerDummy
30 from controller_manager_msgs.msg
import ControllerState
as CtrlState
31 from controller_manager_msgs.msg
import HardwareInterfaceResources
34 if __name__ ==
'__main__':
35 rospy.init_node(
'multi_cm_dummy')
38 cm_root = ControllerManagerDummy(
'/')
39 cm_foo1 = ControllerManagerDummy(
'/foo/robot/controller_manager1')
40 cm_foo2 = ControllerManagerDummy(
'/foo/robot/controller_manager2')
41 cm_default = ControllerManagerDummy()
44 CtrlState(name=
'foo_controller',
48 HardwareInterfaceResources(
49 hardware_interface=
'hardware_interface::FooInterface',
50 resources=[
'one',
'two',
'three'])
52 CtrlState(name=
'bar_controller',
56 HardwareInterfaceResources(
57 hardware_interface=
'hardware_interface::BarInterface',
62 resp = ListControllersResponse()
63 resp.controller = ctrl_list
64 cm_default.list_ctrl_resp = resp
67 cm_incomplete = ControllerManagerDummy(
'/incomplete')
68 cm_incomplete.reload_libs.shutdown()
71 cm_bad_type = ControllerManagerDummy(
'/bad_type')
72 cm_bad_type.unload_ctrl.shutdown()
73 cm_bad_type.unload_ctrl = rospy.Service(
'/bad_type/unload_controller',
75 cm_bad_type._unload_ctrl_cb)