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