moveit2
The MoveIt Motion Planning Framework for ROS 2.
Loading...
Searching...
No Matches
unittest_joint_limit.test.py
Go to the documentation of this file.
1import launch_testing
2import os
3import sys
4import pytest
5import unittest
6
7from launch import LaunchDescription
8from launch_ros.actions import Node
9from launch_testing.util import KeepAliveProc
10
11sys.path.append(os.path.dirname(__file__))
12from common_parameters import load_yaml
13
14
15@pytest.mark.rostest
17 joint_limits_yaml = load_yaml(
18 "pilz_industrial_motion_planner", "config/unittest_joint_limit_config.yaml"
19 )
20
21 # run test
22 unittest_joint_limit = Node(
23 package="pilz_industrial_motion_planner",
24 executable="unittest_joint_limit",
25 name="unittest_joint_limit",
26 parameters=[
27 joint_limits_yaml,
28 ],
29 output="screen",
30 )
31 return (
32 LaunchDescription(
33 [
34 unittest_joint_limit,
35 KeepAliveProc(),
36 launch_testing.actions.ReadyToTest(),
37 ]
38 ),
39 {"unittest_joint_limit": unittest_joint_limit},
40 )
41
42
43class TestTerminatingProcessStops(unittest.TestCase):
44 def test_gtest_run_complete(self, proc_info, unittest_joint_limit):
45 proc_info.assertWaitForShutdown(process=unittest_joint_limit, timeout=4000.0)
46
47
48@launch_testing.post_shutdown_test()
49class TestOutcome(unittest.TestCase):
50 def test_exit_codes(self, proc_info, unittest_joint_limit):
51 launch_testing.asserts.assertExitCodes(proc_info, process=unittest_joint_limit)
test_exit_codes(self, proc_info, unittest_joint_limit)
test_gtest_run_complete(self, proc_info, unittest_joint_limit)