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