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