moveit2
The MoveIt Motion Planning Framework for ROS 2.
fanuc-kdl-singular.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-singular-test.yaml")
18  .to_dict()
19  )
20 
21  fanuc_kdl_singular = Node(
22  package="moveit_kinematics",
23  executable="test_kinematics_plugin",
24  name="fanuc_kdl_singular",
25  parameters=[
26  moveit_configs,
27  test_param,
28  ],
29  output="screen",
30  )
31 
32  return (
33  LaunchDescription(
34  [
35  fanuc_kdl_singular,
36  KeepAliveProc(),
37  launch_testing.actions.ReadyToTest(),
38  ]
39  ),
40  {"fanuc_kdl_singular": fanuc_kdl_singular},
41  )
42 
43 
44 class TestTerminatingProcessStops(unittest.TestCase):
45  def test_gtest_run_complete(self, proc_info, fanuc_kdl_singular):
46  proc_info.assertWaitForShutdown(process=fanuc_kdl_singular, 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_gtest_run_complete(self, proc_info, fanuc_kdl_singular)