moveit2
The MoveIt Motion Planning Framework for ROS 2.
fanuc-kdl.test.py
Go to the documentation of this file.
1 import launch_testing
2 import pytest
3 import unittest
4 from launch import LaunchDescription
5 from launch_ros.actions import Node
6 from launch_testing.util import KeepAliveProc
7 from moveit_configs_utils import MoveItConfigsBuilder
8 from launch_param_builder import ParameterBuilder
9 
10 
11 @pytest.mark.rostest
13 
14  moveit_configs = MoveItConfigsBuilder("moveit_resources_fanuc").to_dict()
15  test_param = (
16  ParameterBuilder("moveit_kinematics")
17  .yaml("config/fanuc-kdl-test.yaml")
18  .to_dict()
19  )
20 
21  fanuc_kdl = Node(
22  package="moveit_kinematics",
23  executable="test_kinematics_plugin",
24  name="fanuc_kdl",
25  parameters=[
26  moveit_configs,
27  test_param,
28  ],
29  output="screen",
30  )
31 
32  return (
33  LaunchDescription(
34  [
35  fanuc_kdl,
36  KeepAliveProc(),
37  launch_testing.actions.ReadyToTest(),
38  ]
39  ),
40  {"fanuc_kdl": fanuc_kdl},
41  )
42 
43 
44 class TestTerminatingProcessStops(unittest.TestCase):
45  def test_gtest_run_complete(self, proc_info, fanuc_kdl):
46  proc_info.assertWaitForShutdown(process=fanuc_kdl, timeout=4000.0)
47 
48 
49 @launch_testing.post_shutdown_test()
50 class TestOutcome(unittest.TestCase):
51  def test_exit_codes(self, proc_info):
52  launch_testing.asserts.assertExitCodes(proc_info)
def test_exit_codes(self, proc_info)
def test_gtest_run_complete(self, proc_info, fanuc_kdl)
def generate_test_description()