Skip to content

Commit

Permalink
Fixing Buildfarm Issues (#716)
Browse files Browse the repository at this point in the history
* Cleaning up code to fix build farm errors
  • Loading branch information
danthony06 committed Sep 11, 2023
1 parent 2595a29 commit 4eb39a6
Show file tree
Hide file tree
Showing 19 changed files with 140 additions and 42 deletions.
24 changes: 0 additions & 24 deletions swri_cli_tools/CMakeLists.txt

This file was deleted.

13 changes: 9 additions & 4 deletions swri_cli_tools/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,22 @@
<name>swri_cli_tools</name>
<version>3.6.0</version>
<description>Command line tools for introspecting ROS systems</description>

<maintainer email="swri-robotics@swri.org">Southwest Research Institute</maintainer>
<author email="david.anthony@swri.org">David Anthony</author>
<license>BSD 3 Clause</license>

<buildtool_depend>ament_cmake</buildtool_depend>
<license>BSD 3 Clause</license>

<depend>marti_introspection_msgs</depend>
<depend>python3-natsort</depend>
<depend>rcl_interfaces</depend>
<depend>rclpy</depend>
<depend>ros2cli</depend>

<test_depend>ament_lint_auto</test_depend>
<test_depend>ament_lint_common</test_depend>
<test_depend>ament_copyright</test_depend>
<test_depend>ament_flake8</test_depend>
<test_depend>ament_pep257</test_depend>
<test_depend>ament_xmllint</test_depend>

<export>
<build_type>ament_python</build_type>
Expand Down
12 changes: 6 additions & 6 deletions swri_cli_tools/setup.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from setuptools import find_packages
from setuptools import setup
import os
from setuptools import find_packages, setup

package_name = 'swri_cli_tools'

Expand All @@ -8,11 +8,10 @@
version='3.6.0',
packages=find_packages(exclude=['test']),
data_files=[
('share/' + package_name, ['package.xml']),
('share/ament_index/resource_index/packages',
['resource/' + package_name])
('share/ament_index/resource_index/packages', ['resource/' + package_name]),
(os.path.join('share', package_name), ['package.xml']),
],
install_requires=['ros2cli'],
install_requires=['ros2cli', 'setuptools'],
zip_safe=True,
author='David Anthony',
author_email='david.anthony@swri.org',
Expand All @@ -21,6 +20,7 @@
url='https://github.com/swri-robotics/marti_common',
keywords=['ROS'],
classifiers=[
'Environment :: Console',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD 3 Clause',
'Programming Language :: Python',
Expand Down
29 changes: 27 additions & 2 deletions swri_cli_tools/swri_cli_tools/api/_node_info.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,36 @@
"""Holds information about node in ROS 2 system."""
# Copyright (c) 2023, Southwest Research Institute® (SwRI®)
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of Southwest Research Institute® (SwRI®) nor the
# names of its contributors may be used to endorse or promote products
# derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

from __future__ import annotations
from typing import List

from rcl_interfaces.msg import ParameterType
from ros2node.api import TopicInfo

from swri_cli_tools.api._node_info import NodeInfo
from swri_cli_tools.api._node_info import ParameterInfo


def print_node_infos(nodes: List(NodeInfo)):
"""Print information about nodes."""
Expand Down
26 changes: 25 additions & 1 deletion swri_cli_tools/swri_cli_tools/command/swri.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,34 @@
# Copyright (c) 2023, Southwest Research Institute® (SwRI®)
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of Southwest Research Institute® (SwRI®) nor the
# names of its contributors may be used to endorse or promote products
# derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

from ros2cli.command import add_subparsers_on_demand
from ros2cli.command import CommandExtension


class SwriCommand(CommandExtension):
"""Execute SwRI CLI command"""

def add_arguments(self, parser, cli_name):
"""Add arguments"""
self._subparser = parser
Expand Down
25 changes: 25 additions & 0 deletions swri_cli_tools/swri_cli_tools/document/_document.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,28 @@
# Copyright (c) 2023, Southwest Research Institute® (SwRI®)
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of Southwest Research Institute® (SwRI®) nor the
# names of its contributors may be used to endorse or promote products
# derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

from natsort import natsorted

from swri_cli_tools.api._node_info import NodeInfo
Expand Down
25 changes: 24 additions & 1 deletion swri_cli_tools/swri_cli_tools/verb/document.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,27 @@
import sys
# Copyright (c) 2023, Southwest Research Institute® (SwRI®)
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of Southwest Research Institute® (SwRI®) nor the
# names of its contributors may be used to endorse or promote products
# derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

from ros2cli.node.strategy import add_arguments as add_strategy_node_arguments
from swri_cli_tools.document import document_system
Expand Down
2 changes: 2 additions & 0 deletions swri_console_util/package.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<?xml version="1.0"?>
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>swri_console_util</name>
<version>3.6.0</version>
Expand Down
1 change: 1 addition & 0 deletions swri_dbw_interface/package.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?xml version="1.0"?>
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>swri_dbw_interface</name>
<version>3.6.0</version>
Expand Down
2 changes: 2 additions & 0 deletions swri_geometry_util/package.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<?xml version="1.0"?>
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>swri_geometry_util</name>
<version>3.6.0</version>
Expand Down
2 changes: 2 additions & 0 deletions swri_image_util/package.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<?xml version="1.0"?>
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>swri_image_util</name>
<version>3.6.0</version>
Expand Down
2 changes: 2 additions & 0 deletions swri_math_util/package.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<?xml version="1.0"?>
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>swri_math_util</name>
<version>3.6.0</version>
Expand Down
2 changes: 2 additions & 0 deletions swri_opencv_util/package.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<?xml version="1.0"?>
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>swri_opencv_util</name>
<version>3.6.0</version>
Expand Down
7 changes: 4 additions & 3 deletions swri_prefix_tools/package.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<?xml version="1.0"?>
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>swri_prefix_tools</name>
<version>3.6.0</version>
Expand All @@ -8,14 +10,13 @@

</description>
<author>Elliot Johnson</author>
<maintainer email="preed@swri.org">P. J. Reed</maintainer>
<maintainer email="swri-robotics@swri.org">Southwest Research Institute</maintainer>
<license>BSD</license>
<url>https://github.com/swri-robotics/marti_common</url>

<buildtool_depend>ament_cmake</buildtool_depend>

<exec_depend condition="$ROS_PYTHON_VERSION == 2">python-psutil</exec_depend>
<exec_depend condition="$ROS_PYTHON_VERSION == 3">python3-psutil</exec_depend>
<exec_depend>python3-psutil</exec_depend>

<export>
<build_type>ament_cmake</build_type>
Expand Down
3 changes: 2 additions & 1 deletion swri_roscpp/package.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?xml version="1.0" ?>
<?xml version="1.0"?>
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>swri_roscpp</name>
<version>3.6.0</version>
Expand Down
1 change: 1 addition & 0 deletions swri_route_util/package.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?xml version="1.0"?>
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="2">
<name>swri_route_util</name>
<version>3.6.0</version>
Expand Down
2 changes: 2 additions & 0 deletions swri_serial_util/package.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<?xml version="1.0"?>
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>swri_serial_util</name>
<version>3.6.0</version>
Expand Down
2 changes: 2 additions & 0 deletions swri_system_util/package.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<?xml version="1.0"?>
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>swri_system_util</name>
<version>3.6.0</version>
Expand Down
2 changes: 2 additions & 0 deletions swri_transform_util/package.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<?xml version="1.0"?>
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>swri_transform_util</name>
<version>3.6.0</version>
Expand Down

0 comments on commit 4eb39a6

Please sign in to comment.