forked from kroshu/kuka_robot_descriptions
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* ci tests for iisy * fix rviz config files * add test launch files * add test_depend * launch_ros dep --------- Co-authored-by: Aron Svastits <[email protected]>
- Loading branch information
Showing
18 changed files
with
347 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,21 +34,21 @@ | |
<author>G.A. vd. Hoorn (TU Delft Robotics Institute)</author> | ||
<author>Brett Hemes (3M)</author> | ||
<maintainer email="[email protected]">G.A. vd. Hoorn (TU Delft Robotics Institute)</maintainer> | ||
<maintainer email="antal.marci@gmail.com">Marton Antal</maintainer> | ||
<maintainer email="svastits1@gmail.com">Áron Svastits</maintainer> | ||
<license>BSD</license> | ||
|
||
<buildtool_depend>ament_cmake</buildtool_depend> | ||
<test_depend>ament_copyright</test_depend> | ||
<test_depend>ament_flake8</test_depend> | ||
<test_depend>ament_pep257</test_depend> | ||
|
||
<depend>xacro</depend> | ||
<depend>launch_ros</depend> | ||
|
||
<exec_depend>joint_state_publisher_gui</exec_depend> | ||
<exec_depend>kuka_resources</exec_depend> | ||
<exec_depend>robot_state_publisher</exec_depend> | ||
<exec_depend>rviz2</exec_depend> | ||
|
||
<test_depend>launch_testing_ament_cmake</test_depend> | ||
|
||
<export> | ||
<architecture_independent/> | ||
<build_type>ament_cmake</build_type> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# Copyright 2024 Áron Svastits | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
import unittest | ||
|
||
import launch | ||
import launch.actions | ||
import launch_testing.actions | ||
import launch_testing.markers | ||
import pytest | ||
import os | ||
|
||
from launch.launch_description_sources.python_launch_description_source import PythonLaunchDescriptionSource # noqa: E501 | ||
from launch.actions.include_launch_description import IncludeLaunchDescription | ||
from ament_index_python.packages import get_package_share_directory | ||
|
||
|
||
def list_test_launch_files(): | ||
files = [f for f in os.listdir(get_package_share_directory( | ||
'kuka_agilus_support')+'/launch/') if f.endswith('.py')] | ||
return files | ||
|
||
|
||
# Launch all of the robot visualisation launch files one by one | ||
@pytest.mark.launch_test | ||
@launch_testing.markers.keep_alive | ||
@launch_testing.parametrize('test_file', list_test_launch_files()) | ||
def generate_test_description(test_file): | ||
list_test_launch_files() | ||
return launch.LaunchDescription([ | ||
IncludeLaunchDescription(PythonLaunchDescriptionSource( | ||
[get_package_share_directory('kuka_agilus_support'), | ||
'/launch/', test_file])), | ||
launch_testing.actions.ReadyToTest() | ||
]) | ||
|
||
|
||
class TestModels(unittest.TestCase): | ||
|
||
def test_read_stdout(self, proc_output): | ||
# Check for frames defined by ROS-Industrial | ||
proc_output.assertWaitFor('got segment base', timeout=5) | ||
proc_output.assertWaitFor('got segment flange', timeout=5) | ||
proc_output.assertWaitFor('got segment tool0', timeout=5) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# Copyright 2024 Áron Svastits | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
import unittest | ||
|
||
import launch | ||
import launch.actions | ||
import launch_testing.actions | ||
import launch_testing.markers | ||
import pytest | ||
import os | ||
|
||
from launch.launch_description_sources.python_launch_description_source import PythonLaunchDescriptionSource # noqa: E501 | ||
from launch.actions.include_launch_description import IncludeLaunchDescription | ||
from ament_index_python.packages import get_package_share_directory | ||
|
||
|
||
def list_test_launch_files(): | ||
files = [f for f in os.listdir(get_package_share_directory( | ||
'kuka_cybertech_support')+'/launch/') if f.endswith('.py')] | ||
return files | ||
|
||
|
||
# Launch all of the robot visualisation launch files one by one | ||
@pytest.mark.launch_test | ||
@launch_testing.markers.keep_alive | ||
@launch_testing.parametrize('test_file', list_test_launch_files()) | ||
def generate_test_description(test_file): | ||
list_test_launch_files() | ||
return launch.LaunchDescription([ | ||
IncludeLaunchDescription(PythonLaunchDescriptionSource( | ||
[get_package_share_directory('kuka_cybertech_support'), | ||
'/launch/', test_file])), | ||
launch_testing.actions.ReadyToTest() | ||
]) | ||
|
||
|
||
class TestModels(unittest.TestCase): | ||
|
||
def test_read_stdout(self, proc_output): | ||
# Check for frames defined by ROS-Industrial | ||
proc_output.assertWaitFor('got segment base', timeout=5) | ||
proc_output.assertWaitFor('got segment flange', timeout=5) | ||
proc_output.assertWaitFor('got segment tool0', timeout=5) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,20 +4,21 @@ | |
<version>0.1.0</version> | ||
<description>Package containing models of KUKA LBR iisy family</description> | ||
<author>Aron Svastits</author> | ||
<maintainer email="[email protected]"></maintainer> | ||
<maintainer email="[email protected]">Áron Svastits</maintainer> | ||
<license>BSD</license> | ||
|
||
<buildtool_depend>ament_cmake</buildtool_depend> | ||
<test_depend>ament_copyright</test_depend> | ||
<test_depend>ament_flake8</test_depend> | ||
<test_depend>ament_pep257</test_depend> | ||
|
||
<depend>xacro</depend> | ||
<depend>launch_ros</depend> | ||
|
||
<exec_depend>joint_state_publisher_gui</exec_depend> | ||
<exec_depend>kuka_resources</exec_depend> | ||
<exec_depend>robot_state_publisher</exec_depend> | ||
<exec_depend>rviz2</exec_depend> | ||
|
||
<test_depend>launch_testing_ament_cmake</test_depend> | ||
|
||
<export> | ||
<architecture_independent/> | ||
<build_type>ament_cmake</build_type> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# Copyright 2024 Áron Svastits | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
import unittest | ||
|
||
import launch | ||
import launch.actions | ||
import launch_testing.actions | ||
import launch_testing.markers | ||
import pytest | ||
import os | ||
|
||
from launch.launch_description_sources.python_launch_description_source import PythonLaunchDescriptionSource # noqa: E501 | ||
from launch.actions.include_launch_description import IncludeLaunchDescription | ||
from ament_index_python.packages import get_package_share_directory | ||
|
||
|
||
def list_test_launch_files(): | ||
files = [f for f in os.listdir(get_package_share_directory( | ||
'kuka_lbr_iisy_support')+'/launch/') if f.endswith('.py')] | ||
return files | ||
|
||
|
||
# Launch all of the robot visualisation launch files one by one | ||
@pytest.mark.launch_test | ||
@launch_testing.markers.keep_alive | ||
@launch_testing.parametrize('test_file', list_test_launch_files()) | ||
def generate_test_description(test_file): | ||
list_test_launch_files() | ||
return launch.LaunchDescription([ | ||
IncludeLaunchDescription(PythonLaunchDescriptionSource( | ||
[get_package_share_directory('kuka_lbr_iisy_support'), | ||
'/launch/', test_file])), | ||
launch_testing.actions.ReadyToTest() | ||
]) | ||
|
||
|
||
class TestModels(unittest.TestCase): | ||
|
||
def test_read_stdout(self, proc_output): | ||
# Check for frames defined by ROS-Industrial | ||
proc_output.assertWaitFor('got segment base', timeout=5) | ||
proc_output.assertWaitFor('got segment flange', timeout=5) | ||
proc_output.assertWaitFor('got segment tool0', timeout=5) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,17 @@ | ||
cmake_minimum_required(VERSION 3.5) | ||
project(kuka_lbr_iiwa_support) | ||
|
||
# Default to C99 | ||
if(NOT CMAKE_C_STANDARD) | ||
set(CMAKE_C_STANDARD 99) | ||
endif() | ||
|
||
# Default to C++14 | ||
if(NOT CMAKE_CXX_STANDARD) | ||
set(CMAKE_CXX_STANDARD 14) | ||
endif() | ||
|
||
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") | ||
add_compile_options(-Wall -Wextra -Wpedantic) | ||
endif() | ||
project(kuka_lbr_iiwa_support) | ||
|
||
# find dependencies | ||
find_package(ament_cmake REQUIRED) | ||
# uncomment the following section in order to fill in | ||
# further dependencies manually. | ||
# find_package(<dependency> REQUIRED) | ||
find_package(urdf REQUIRED) | ||
find_package(xacro REQUIRED) | ||
|
||
install(DIRECTORY launch urdf meshes config | ||
DESTINATION share/${PROJECT_NAME} | ||
) | ||
install(DIRECTORY config launch meshes urdf | ||
DESTINATION share/${PROJECT_NAME}) | ||
|
||
if(BUILD_TESTING) | ||
find_package(ament_lint_auto REQUIRED) | ||
# the following line skips the linter which checks for copyrights | ||
# uncomment the line when a copyright and license is not present in all source files | ||
#set(ament_cmake_copyright_FOUND TRUE) | ||
# the following line skips cpplint (only works in a git repo) | ||
# uncomment the line when this package is not in a git repo | ||
#set(ament_cmake_cpplint_FOUND TRUE) | ||
ament_lint_auto_find_test_dependencies() | ||
find_package(launch_testing_ament_cmake) | ||
add_launch_test(test/test_lbr_iiwa.py) | ||
endif() | ||
|
||
ament_package() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.