moveit2
The MoveIt Motion Planning Framework for ROS 2.
panda-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_panda").to_dict()
15 
16  test_param = (
17  ParameterBuilder("moveit_kinematics")
18  .yaml("config/panda-kdl-singular-test.yaml")
19  .to_dict()
20  )
21 
22  panda_kdl_singular = Node(
23  package="moveit_kinematics",
24  executable="test_kinematics_plugin",
25  name="panda_kdl_singular",
26  parameters=[
27  moveit_configs,
28  test_param,
29  ],
30  output="screen",
31  )
32 
33  return (
34  LaunchDescription(
35  [
36  panda_kdl_singular,
37  KeepAliveProc(),
38  launch_testing.actions.ReadyToTest(),
39  ]
40  ),
41  {"panda_kdl_singular": panda_kdl_singular},
42  )
43 
44 
45 class TestTerminatingProcessStops(unittest.TestCase):
46  def test_gtest_run_complete(self, proc_info, panda_kdl_singular):
47  proc_info.assertWaitForShutdown(process=panda_kdl_singular, timeout=4000.0)
48 
49 
50 @launch_testing.post_shutdown_test()
51 class TestOutcome(unittest.TestCase):
52  def test_exit_codes(self, proc_info):
53  launch_testing.asserts.assertExitCodes(proc_info)
def test_gtest_run_complete(self, proc_info, panda_kdl_singular)