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