From d91dd26b611218ddb84113c109df10797f0af76d Mon Sep 17 00:00:00 2001 From: Jacksiton Date: Thu, 16 Feb 2023 09:11:31 -0500 Subject: [PATCH 01/53] hellow --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 2efc043..f4c3fff 100644 --- a/README.md +++ b/README.md @@ -90,3 +90,4 @@ BUENOS DIAS :) ADIOS hola willy HOla reyes +Feliz Cumple \ No newline at end of file From c2beb0fa2f34b544e9be986ee483fe31194ed73b Mon Sep 17 00:00:00 2001 From: Carlos Reyes Date: Thu, 16 Feb 2023 09:12:18 -0500 Subject: [PATCH 02/53] perra --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 2efc043..ac04d45 100644 --- a/README.md +++ b/README.md @@ -90,3 +90,6 @@ BUENOS DIAS :) ADIOS hola willy HOla reyes + + +hello cgamo re hpt From b77d440d1e1d833fef1bfcf48c1178ec0ec4b6fc Mon Sep 17 00:00:00 2001 From: Jacksiton Date: Wed, 1 Mar 2023 16:55:35 -0500 Subject: [PATCH 03/53] reyeskchon --- lolito/scripts/pubhen.py | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 lolito/scripts/pubhen.py diff --git a/lolito/scripts/pubhen.py b/lolito/scripts/pubhen.py new file mode 100644 index 0000000..df56e09 --- /dev/null +++ b/lolito/scripts/pubhen.py @@ -0,0 +1,39 @@ +import rclpy +from rclpy.node import Node + +from std_msgs.msg import String + + +class MinimalPublisher(Node): + + def __init__(self): + super().__init__('minimal_publisher') + self.publisher_ = self.create_publisher(String, 'topic', 10) + timer_period = 0.5 # seconds + self.timer = self.create_timer(timer_period, self.timer_callback) + self.i = 0 + + def timer_callback(self): + msg = String() + msg.data = 'Carlos K: %d' % self.i + self.publisher_.publish(msg) + self.get_logger().info('Publishing: "%s"' % msg.data) + self.i += 1 + + +def main(args=None): + rclpy.init(args=args) + + minimal_publisher = MinimalPublisher() + + rclpy.spin(minimal_publisher) + + # Destroy the node explicitly + # (optional - otherwise it will be done automatically + # when the garbage collector destroys the node object) + minimal_publisher.destroy_node() + rclpy.shutdown() + + +if __name__ == '__main__': + main() \ No newline at end of file From 1bf7afe87e55a20f79de3fb88f0d7dae987719a3 Mon Sep 17 00:00:00 2001 From: Jacksiton Date: Wed, 1 Mar 2023 16:57:47 -0500 Subject: [PATCH 04/53] chale --- lolito/CMakeLists.txt | 11 +++++++++++ lolito/package.xml | 3 +++ lolito/scripts/__init__.py | 0 3 files changed, 14 insertions(+) create mode 100644 lolito/scripts/__init__.py diff --git a/lolito/CMakeLists.txt b/lolito/CMakeLists.txt index b7d1cb2..7f9e08c 100644 --- a/lolito/CMakeLists.txt +++ b/lolito/CMakeLists.txt @@ -17,6 +17,17 @@ endif() # find dependencies find_package(ament_cmake REQUIRED) +find_package(ament_cmake_python REQUIRED) +find_package(rclpy REQUIRED) +find_package(std_msgs REQUIRED) + +ament_python_install_package(scripts/) + +install(PROGRAMS + scripts/pubhen.py + DESTINATION lib/${PROJECT_NAME} +) + # uncomment the following section in order to fill in # further dependencies manually. # find_package( REQUIRED) diff --git a/lolito/package.xml b/lolito/package.xml index 322108a..4c6480f 100644 --- a/lolito/package.xml +++ b/lolito/package.xml @@ -8,6 +8,9 @@ TODO: License declaration ament_cmake + ament_cmake_python + rclpy + std_msgs ament_lint_auto ament_lint_common diff --git a/lolito/scripts/__init__.py b/lolito/scripts/__init__.py new file mode 100644 index 0000000..e69de29 From 4faf4624aee8f75a1c629985a897b40974a3d14d Mon Sep 17 00:00:00 2001 From: Jacksiton Date: Wed, 8 Mar 2023 17:05:42 -0500 Subject: [PATCH 05/53] cambioos --- chamo/chamo/__init__.py | 0 chamo/package.xml | 18 + chamo/resource/chamo | 0 chamo/setup.cfg | 4 + chamo/setup.py | 25 ++ chamo/test/test_copyright.py | 23 + chamo/test/test_flake8.py | 25 ++ chamo/test/test_pep257.py | 23 + install/.colcon_install_layout | 1 + install/COLCON_IGNORE | 0 install/_local_setup_util_ps1.py | 404 ++++++++++++++++++ install/_local_setup_util_sh.py | 404 ++++++++++++++++++ .../ament_index/resource_index/packages/chamo | 0 .../share/chamo/hook/ament_prefix_path.dsv | 1 + .../share/chamo/hook/ament_prefix_path.ps1 | 3 + .../share/chamo/hook/ament_prefix_path.sh | 3 + install/chamo/share/chamo/hook/pythonpath.dsv | 1 + install/chamo/share/chamo/hook/pythonpath.ps1 | 3 + install/chamo/share/chamo/hook/pythonpath.sh | 3 + install/chamo/share/chamo/package.bash | 31 ++ install/chamo/share/chamo/package.dsv | 6 + install/chamo/share/chamo/package.ps1 | 116 +++++ install/chamo/share/chamo/package.sh | 87 ++++ install/chamo/share/chamo/package.xml | 18 + install/chamo/share/chamo/package.zsh | 42 ++ .../chamo/share/colcon-core/packages/chamo | 0 install/local_setup.bash | 107 +++++ install/local_setup.ps1 | 55 +++ install/local_setup.sh | 137 ++++++ install/local_setup.zsh | 120 ++++++ .../package_run_dependencies/lolito | 1 + .../resource_index/packages/lolito | 0 .../resource_index/parent_prefix_path/lolito | 1 + .../lolito/share/colcon-core/packages/lolito | 1 + .../lolito/cmake/lolitoConfig-version.cmake | 14 + .../share/lolito/cmake/lolitoConfig.cmake | 42 ++ .../lolito/environment/ament_prefix_path.dsv | 1 + .../lolito/environment/ament_prefix_path.sh | 4 + .../lolito/share/lolito/environment/path.dsv | 1 + .../lolito/share/lolito/environment/path.sh | 5 + .../share/lolito/environment/pythonpath.dsv | 1 + .../share/lolito/environment/pythonpath.sh | 3 + .../share/lolito/hook/cmake_prefix_path.dsv | 1 + .../share/lolito/hook/cmake_prefix_path.ps1 | 3 + .../share/lolito/hook/cmake_prefix_path.sh | 3 + .../lolito/share/lolito/hook/pythonpath.dsv | 1 + .../lolito/share/lolito/hook/pythonpath.ps1 | 3 + .../lolito/share/lolito/hook/pythonpath.sh | 3 + install/lolito/share/lolito/local_setup.bash | 46 ++ install/lolito/share/lolito/local_setup.dsv | 3 + install/lolito/share/lolito/local_setup.sh | 134 ++++++ install/lolito/share/lolito/local_setup.zsh | 59 +++ install/lolito/share/lolito/package.bash | 39 ++ install/lolito/share/lolito/package.dsv | 11 + install/lolito/share/lolito/package.ps1 | 117 +++++ install/lolito/share/lolito/package.sh | 88 ++++ install/lolito/share/lolito/package.xml | 21 + install/lolito/share/lolito/package.zsh | 50 +++ .../resource_index/packages/my_package | 0 .../share/colcon-core/packages/my_package | 0 .../my_package/hook/ament_prefix_path.dsv | 1 + .../my_package/hook/ament_prefix_path.ps1 | 3 + .../my_package/hook/ament_prefix_path.sh | 3 + .../share/my_package/hook/pythonpath.dsv | 1 + .../share/my_package/hook/pythonpath.ps1 | 3 + .../share/my_package/hook/pythonpath.sh | 3 + .../my_package/share/my_package/package.bash | 31 ++ .../my_package/share/my_package/package.dsv | 6 + .../my_package/share/my_package/package.ps1 | 116 +++++ .../my_package/share/my_package/package.sh | 87 ++++ .../my_package/share/my_package/package.xml | 18 + .../my_package/share/my_package/package.zsh | 42 ++ install/setup.bash | 31 ++ install/setup.ps1 | 29 ++ install/setup.sh | 45 ++ install/setup.zsh | 31 ++ log/COLCON_IGNORE | 0 log/latest | 1 + log/latest_build | 1 + my_package/my_package/__init__.py | 0 my_package/my_package/my_node.py | 6 + my_package/package.xml | 18 + my_package/resource/my_package | 0 my_package/setup.cfg | 4 + my_package/setup.py | 26 ++ my_package/test/test_copyright.py | 23 + my_package/test/test_flake8.py | 25 ++ my_package/test/test_pep257.py | 23 + 88 files changed, 2893 insertions(+) create mode 100644 chamo/chamo/__init__.py create mode 100644 chamo/package.xml create mode 100644 chamo/resource/chamo create mode 100644 chamo/setup.cfg create mode 100644 chamo/setup.py create mode 100644 chamo/test/test_copyright.py create mode 100644 chamo/test/test_flake8.py create mode 100644 chamo/test/test_pep257.py create mode 100644 install/.colcon_install_layout create mode 100644 install/COLCON_IGNORE create mode 100644 install/_local_setup_util_ps1.py create mode 100644 install/_local_setup_util_sh.py create mode 100644 install/chamo/share/ament_index/resource_index/packages/chamo create mode 100644 install/chamo/share/chamo/hook/ament_prefix_path.dsv create mode 100644 install/chamo/share/chamo/hook/ament_prefix_path.ps1 create mode 100644 install/chamo/share/chamo/hook/ament_prefix_path.sh create mode 100644 install/chamo/share/chamo/hook/pythonpath.dsv create mode 100644 install/chamo/share/chamo/hook/pythonpath.ps1 create mode 100644 install/chamo/share/chamo/hook/pythonpath.sh create mode 100644 install/chamo/share/chamo/package.bash create mode 100644 install/chamo/share/chamo/package.dsv create mode 100644 install/chamo/share/chamo/package.ps1 create mode 100644 install/chamo/share/chamo/package.sh create mode 100644 install/chamo/share/chamo/package.xml create mode 100644 install/chamo/share/chamo/package.zsh create mode 100644 install/chamo/share/colcon-core/packages/chamo create mode 100644 install/local_setup.bash create mode 100644 install/local_setup.ps1 create mode 100644 install/local_setup.sh create mode 100644 install/local_setup.zsh create mode 100644 install/lolito/share/ament_index/resource_index/package_run_dependencies/lolito create mode 100644 install/lolito/share/ament_index/resource_index/packages/lolito create mode 100644 install/lolito/share/ament_index/resource_index/parent_prefix_path/lolito create mode 100644 install/lolito/share/colcon-core/packages/lolito create mode 100644 install/lolito/share/lolito/cmake/lolitoConfig-version.cmake create mode 100644 install/lolito/share/lolito/cmake/lolitoConfig.cmake create mode 100644 install/lolito/share/lolito/environment/ament_prefix_path.dsv create mode 100644 install/lolito/share/lolito/environment/ament_prefix_path.sh create mode 100644 install/lolito/share/lolito/environment/path.dsv create mode 100644 install/lolito/share/lolito/environment/path.sh create mode 100644 install/lolito/share/lolito/environment/pythonpath.dsv create mode 100644 install/lolito/share/lolito/environment/pythonpath.sh create mode 100644 install/lolito/share/lolito/hook/cmake_prefix_path.dsv create mode 100644 install/lolito/share/lolito/hook/cmake_prefix_path.ps1 create mode 100644 install/lolito/share/lolito/hook/cmake_prefix_path.sh create mode 100644 install/lolito/share/lolito/hook/pythonpath.dsv create mode 100644 install/lolito/share/lolito/hook/pythonpath.ps1 create mode 100644 install/lolito/share/lolito/hook/pythonpath.sh create mode 100644 install/lolito/share/lolito/local_setup.bash create mode 100644 install/lolito/share/lolito/local_setup.dsv create mode 100644 install/lolito/share/lolito/local_setup.sh create mode 100644 install/lolito/share/lolito/local_setup.zsh create mode 100644 install/lolito/share/lolito/package.bash create mode 100644 install/lolito/share/lolito/package.dsv create mode 100644 install/lolito/share/lolito/package.ps1 create mode 100644 install/lolito/share/lolito/package.sh create mode 100644 install/lolito/share/lolito/package.xml create mode 100644 install/lolito/share/lolito/package.zsh create mode 100644 install/my_package/share/ament_index/resource_index/packages/my_package create mode 100644 install/my_package/share/colcon-core/packages/my_package create mode 100644 install/my_package/share/my_package/hook/ament_prefix_path.dsv create mode 100644 install/my_package/share/my_package/hook/ament_prefix_path.ps1 create mode 100644 install/my_package/share/my_package/hook/ament_prefix_path.sh create mode 100644 install/my_package/share/my_package/hook/pythonpath.dsv create mode 100644 install/my_package/share/my_package/hook/pythonpath.ps1 create mode 100644 install/my_package/share/my_package/hook/pythonpath.sh create mode 100644 install/my_package/share/my_package/package.bash create mode 100644 install/my_package/share/my_package/package.dsv create mode 100644 install/my_package/share/my_package/package.ps1 create mode 100644 install/my_package/share/my_package/package.sh create mode 100644 install/my_package/share/my_package/package.xml create mode 100644 install/my_package/share/my_package/package.zsh create mode 100644 install/setup.bash create mode 100644 install/setup.ps1 create mode 100644 install/setup.sh create mode 100644 install/setup.zsh create mode 100644 log/COLCON_IGNORE create mode 120000 log/latest create mode 120000 log/latest_build create mode 100644 my_package/my_package/__init__.py create mode 100644 my_package/my_package/my_node.py create mode 100644 my_package/package.xml create mode 100644 my_package/resource/my_package create mode 100644 my_package/setup.cfg create mode 100644 my_package/setup.py create mode 100644 my_package/test/test_copyright.py create mode 100644 my_package/test/test_flake8.py create mode 100644 my_package/test/test_pep257.py diff --git a/chamo/chamo/__init__.py b/chamo/chamo/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/chamo/package.xml b/chamo/package.xml new file mode 100644 index 0000000..2498757 --- /dev/null +++ b/chamo/package.xml @@ -0,0 +1,18 @@ + + + + chamo + 0.0.0 + TODO: Package description + jackson + TODO: License declaration + + ament_copyright + ament_flake8 + ament_pep257 + python3-pytest + + + ament_python + + diff --git a/chamo/resource/chamo b/chamo/resource/chamo new file mode 100644 index 0000000..e69de29 diff --git a/chamo/setup.cfg b/chamo/setup.cfg new file mode 100644 index 0000000..eaacc60 --- /dev/null +++ b/chamo/setup.cfg @@ -0,0 +1,4 @@ +[develop] +script-dir=$base/lib/chamo +[install] +install-scripts=$base/lib/chamo diff --git a/chamo/setup.py b/chamo/setup.py new file mode 100644 index 0000000..14695e1 --- /dev/null +++ b/chamo/setup.py @@ -0,0 +1,25 @@ +from setuptools import setup + +package_name = 'chamo' + +setup( + name=package_name, + version='0.0.0', + packages=[package_name], + data_files=[ + ('share/ament_index/resource_index/packages', + ['resource/' + package_name]), + ('share/' + package_name, ['package.xml']), + ], + install_requires=['setuptools'], + zip_safe=True, + maintainer='jackson', + maintainer_email='jdicano1319@gmail.com', + description='TODO: Package description', + license='TODO: License declaration', + tests_require=['pytest'], + entry_points={ + 'console_scripts': [ + ], + }, +) diff --git a/chamo/test/test_copyright.py b/chamo/test/test_copyright.py new file mode 100644 index 0000000..cc8ff03 --- /dev/null +++ b/chamo/test/test_copyright.py @@ -0,0 +1,23 @@ +# Copyright 2015 Open Source Robotics Foundation, Inc. +# +# 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. + +from ament_copyright.main import main +import pytest + + +@pytest.mark.copyright +@pytest.mark.linter +def test_copyright(): + rc = main(argv=['.', 'test']) + assert rc == 0, 'Found errors' diff --git a/chamo/test/test_flake8.py b/chamo/test/test_flake8.py new file mode 100644 index 0000000..27ee107 --- /dev/null +++ b/chamo/test/test_flake8.py @@ -0,0 +1,25 @@ +# Copyright 2017 Open Source Robotics Foundation, Inc. +# +# 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. + +from ament_flake8.main import main_with_errors +import pytest + + +@pytest.mark.flake8 +@pytest.mark.linter +def test_flake8(): + rc, errors = main_with_errors(argv=[]) + assert rc == 0, \ + 'Found %d code style errors / warnings:\n' % len(errors) + \ + '\n'.join(errors) diff --git a/chamo/test/test_pep257.py b/chamo/test/test_pep257.py new file mode 100644 index 0000000..b234a38 --- /dev/null +++ b/chamo/test/test_pep257.py @@ -0,0 +1,23 @@ +# Copyright 2015 Open Source Robotics Foundation, Inc. +# +# 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. + +from ament_pep257.main import main +import pytest + + +@pytest.mark.linter +@pytest.mark.pep257 +def test_pep257(): + rc = main(argv=['.', 'test']) + assert rc == 0, 'Found code style errors / warnings' diff --git a/install/.colcon_install_layout b/install/.colcon_install_layout new file mode 100644 index 0000000..3aad533 --- /dev/null +++ b/install/.colcon_install_layout @@ -0,0 +1 @@ +isolated diff --git a/install/COLCON_IGNORE b/install/COLCON_IGNORE new file mode 100644 index 0000000..e69de29 diff --git a/install/_local_setup_util_ps1.py b/install/_local_setup_util_ps1.py new file mode 100644 index 0000000..98348ee --- /dev/null +++ b/install/_local_setup_util_ps1.py @@ -0,0 +1,404 @@ +# Copyright 2016-2019 Dirk Thomas +# Licensed under the Apache License, Version 2.0 + +import argparse +from collections import OrderedDict +import os +from pathlib import Path +import sys + + +FORMAT_STR_COMMENT_LINE = '# {comment}' +FORMAT_STR_SET_ENV_VAR = 'Set-Item -Path "Env:{name}" -Value "{value}"' +FORMAT_STR_USE_ENV_VAR = '$env:{name}' +FORMAT_STR_INVOKE_SCRIPT = '_colcon_prefix_powershell_source_script "{script_path}"' +FORMAT_STR_REMOVE_LEADING_SEPARATOR = '' +FORMAT_STR_REMOVE_TRAILING_SEPARATOR = '' + +DSV_TYPE_APPEND_NON_DUPLICATE = 'append-non-duplicate' +DSV_TYPE_PREPEND_NON_DUPLICATE = 'prepend-non-duplicate' +DSV_TYPE_PREPEND_NON_DUPLICATE_IF_EXISTS = 'prepend-non-duplicate-if-exists' +DSV_TYPE_SET = 'set' +DSV_TYPE_SET_IF_UNSET = 'set-if-unset' +DSV_TYPE_SOURCE = 'source' + + +def main(argv=sys.argv[1:]): # noqa: D103 + parser = argparse.ArgumentParser( + description='Output shell commands for the packages in topological ' + 'order') + parser.add_argument( + 'primary_extension', + help='The file extension of the primary shell') + parser.add_argument( + 'additional_extension', nargs='?', + help='The additional file extension to be considered') + parser.add_argument( + '--merged-install', action='store_true', + help='All install prefixes are merged into a single location') + args = parser.parse_args(argv) + + packages = get_packages(Path(__file__).parent, args.merged_install) + + ordered_packages = order_packages(packages) + for pkg_name in ordered_packages: + if _include_comments(): + print( + FORMAT_STR_COMMENT_LINE.format_map( + {'comment': 'Package: ' + pkg_name})) + prefix = os.path.abspath(os.path.dirname(__file__)) + if not args.merged_install: + prefix = os.path.join(prefix, pkg_name) + for line in get_commands( + pkg_name, prefix, args.primary_extension, + args.additional_extension + ): + print(line) + + for line in _remove_ending_separators(): + print(line) + + +def get_packages(prefix_path, merged_install): + """ + Find packages based on colcon-specific files created during installation. + + :param Path prefix_path: The install prefix path of all packages + :param bool merged_install: The flag if the packages are all installed + directly in the prefix or if each package is installed in a subdirectory + named after the package + :returns: A mapping from the package name to the set of runtime + dependencies + :rtype: dict + """ + packages = {} + # since importing colcon_core isn't feasible here the following constant + # must match colcon_core.location.get_relative_package_index_path() + subdirectory = 'share/colcon-core/packages' + if merged_install: + # return if workspace is empty + if not (prefix_path / subdirectory).is_dir(): + return packages + # find all files in the subdirectory + for p in (prefix_path / subdirectory).iterdir(): + if not p.is_file(): + continue + if p.name.startswith('.'): + continue + add_package_runtime_dependencies(p, packages) + else: + # for each subdirectory look for the package specific file + for p in prefix_path.iterdir(): + if not p.is_dir(): + continue + if p.name.startswith('.'): + continue + p = p / subdirectory / p.name + if p.is_file(): + add_package_runtime_dependencies(p, packages) + + # remove unknown dependencies + pkg_names = set(packages.keys()) + for k in packages.keys(): + packages[k] = {d for d in packages[k] if d in pkg_names} + + return packages + + +def add_package_runtime_dependencies(path, packages): + """ + Check the path and if it exists extract the packages runtime dependencies. + + :param Path path: The resource file containing the runtime dependencies + :param dict packages: A mapping from package names to the sets of runtime + dependencies to add to + """ + content = path.read_text() + dependencies = set(content.split(os.pathsep) if content else []) + packages[path.name] = dependencies + + +def order_packages(packages): + """ + Order packages topologically. + + :param dict packages: A mapping from package name to the set of runtime + dependencies + :returns: The package names + :rtype: list + """ + # select packages with no dependencies in alphabetical order + to_be_ordered = list(packages.keys()) + ordered = [] + while to_be_ordered: + pkg_names_without_deps = [ + name for name in to_be_ordered if not packages[name]] + if not pkg_names_without_deps: + reduce_cycle_set(packages) + raise RuntimeError( + 'Circular dependency between: ' + ', '.join(sorted(packages))) + pkg_names_without_deps.sort() + pkg_name = pkg_names_without_deps[0] + to_be_ordered.remove(pkg_name) + ordered.append(pkg_name) + # remove item from dependency lists + for k in list(packages.keys()): + if pkg_name in packages[k]: + packages[k].remove(pkg_name) + return ordered + + +def reduce_cycle_set(packages): + """ + Reduce the set of packages to the ones part of the circular dependency. + + :param dict packages: A mapping from package name to the set of runtime + dependencies which is modified in place + """ + last_depended = None + while len(packages) > 0: + # get all remaining dependencies + depended = set() + for pkg_name, dependencies in packages.items(): + depended = depended.union(dependencies) + # remove all packages which are not dependent on + for name in list(packages.keys()): + if name not in depended: + del packages[name] + if last_depended: + # if remaining packages haven't changed return them + if last_depended == depended: + return packages.keys() + # otherwise reduce again + last_depended = depended + + +def _include_comments(): + # skipping comment lines when COLCON_TRACE is not set speeds up the + # processing especially on Windows + return bool(os.environ.get('COLCON_TRACE')) + + +def get_commands(pkg_name, prefix, primary_extension, additional_extension): + commands = [] + package_dsv_path = os.path.join(prefix, 'share', pkg_name, 'package.dsv') + if os.path.exists(package_dsv_path): + commands += process_dsv_file( + package_dsv_path, prefix, primary_extension, additional_extension) + return commands + + +def process_dsv_file( + dsv_path, prefix, primary_extension=None, additional_extension=None +): + commands = [] + if _include_comments(): + commands.append(FORMAT_STR_COMMENT_LINE.format_map({'comment': dsv_path})) + with open(dsv_path, 'r') as h: + content = h.read() + lines = content.splitlines() + + basenames = OrderedDict() + for i, line in enumerate(lines): + # skip over empty or whitespace-only lines + if not line.strip(): + continue + try: + type_, remainder = line.split(';', 1) + except ValueError: + raise RuntimeError( + "Line %d in '%s' doesn't contain a semicolon separating the " + 'type from the arguments' % (i + 1, dsv_path)) + if type_ != DSV_TYPE_SOURCE: + # handle non-source lines + try: + commands += handle_dsv_types_except_source( + type_, remainder, prefix) + except RuntimeError as e: + raise RuntimeError( + "Line %d in '%s' %s" % (i + 1, dsv_path, e)) from e + else: + # group remaining source lines by basename + path_without_ext, ext = os.path.splitext(remainder) + if path_without_ext not in basenames: + basenames[path_without_ext] = set() + assert ext.startswith('.') + ext = ext[1:] + if ext in (primary_extension, additional_extension): + basenames[path_without_ext].add(ext) + + # add the dsv extension to each basename if the file exists + for basename, extensions in basenames.items(): + if not os.path.isabs(basename): + basename = os.path.join(prefix, basename) + if os.path.exists(basename + '.dsv'): + extensions.add('dsv') + + for basename, extensions in basenames.items(): + if not os.path.isabs(basename): + basename = os.path.join(prefix, basename) + if 'dsv' in extensions: + # process dsv files recursively + commands += process_dsv_file( + basename + '.dsv', prefix, primary_extension=primary_extension, + additional_extension=additional_extension) + elif primary_extension in extensions and len(extensions) == 1: + # source primary-only files + commands += [ + FORMAT_STR_INVOKE_SCRIPT.format_map({ + 'prefix': prefix, + 'script_path': basename + '.' + primary_extension})] + elif additional_extension in extensions: + # source non-primary files + commands += [ + FORMAT_STR_INVOKE_SCRIPT.format_map({ + 'prefix': prefix, + 'script_path': basename + '.' + additional_extension})] + + return commands + + +def handle_dsv_types_except_source(type_, remainder, prefix): + commands = [] + if type_ in (DSV_TYPE_SET, DSV_TYPE_SET_IF_UNSET): + try: + env_name, value = remainder.split(';', 1) + except ValueError: + raise RuntimeError( + "doesn't contain a semicolon separating the environment name " + 'from the value') + try_prefixed_value = os.path.join(prefix, value) if value else prefix + if os.path.exists(try_prefixed_value): + value = try_prefixed_value + if type_ == DSV_TYPE_SET: + commands += _set(env_name, value) + elif type_ == DSV_TYPE_SET_IF_UNSET: + commands += _set_if_unset(env_name, value) + else: + assert False + elif type_ in ( + DSV_TYPE_APPEND_NON_DUPLICATE, + DSV_TYPE_PREPEND_NON_DUPLICATE, + DSV_TYPE_PREPEND_NON_DUPLICATE_IF_EXISTS + ): + try: + env_name_and_values = remainder.split(';') + except ValueError: + raise RuntimeError( + "doesn't contain a semicolon separating the environment name " + 'from the values') + env_name = env_name_and_values[0] + values = env_name_and_values[1:] + for value in values: + if not value: + value = prefix + elif not os.path.isabs(value): + value = os.path.join(prefix, value) + if ( + type_ == DSV_TYPE_PREPEND_NON_DUPLICATE_IF_EXISTS and + not os.path.exists(value) + ): + comment = f'skip extending {env_name} with not existing ' \ + f'path: {value}' + if _include_comments(): + commands.append( + FORMAT_STR_COMMENT_LINE.format_map({'comment': comment})) + elif type_ == DSV_TYPE_APPEND_NON_DUPLICATE: + commands += _append_unique_value(env_name, value) + else: + commands += _prepend_unique_value(env_name, value) + else: + raise RuntimeError( + 'contains an unknown environment hook type: ' + type_) + return commands + + +env_state = {} + + +def _append_unique_value(name, value): + global env_state + if name not in env_state: + if os.environ.get(name): + env_state[name] = set(os.environ[name].split(os.pathsep)) + else: + env_state[name] = set() + # append even if the variable has not been set yet, in case a shell script sets the + # same variable without the knowledge of this Python script. + # later _remove_ending_separators() will cleanup any unintentional leading separator + extend = FORMAT_STR_USE_ENV_VAR.format_map({'name': name}) + os.pathsep + line = FORMAT_STR_SET_ENV_VAR.format_map( + {'name': name, 'value': extend + value}) + if value not in env_state[name]: + env_state[name].add(value) + else: + if not _include_comments(): + return [] + line = FORMAT_STR_COMMENT_LINE.format_map({'comment': line}) + return [line] + + +def _prepend_unique_value(name, value): + global env_state + if name not in env_state: + if os.environ.get(name): + env_state[name] = set(os.environ[name].split(os.pathsep)) + else: + env_state[name] = set() + # prepend even if the variable has not been set yet, in case a shell script sets the + # same variable without the knowledge of this Python script. + # later _remove_ending_separators() will cleanup any unintentional trailing separator + extend = os.pathsep + FORMAT_STR_USE_ENV_VAR.format_map({'name': name}) + line = FORMAT_STR_SET_ENV_VAR.format_map( + {'name': name, 'value': value + extend}) + if value not in env_state[name]: + env_state[name].add(value) + else: + if not _include_comments(): + return [] + line = FORMAT_STR_COMMENT_LINE.format_map({'comment': line}) + return [line] + + +# generate commands for removing prepended underscores +def _remove_ending_separators(): + # do nothing if the shell extension does not implement the logic + if FORMAT_STR_REMOVE_TRAILING_SEPARATOR is None: + return [] + + global env_state + commands = [] + for name in env_state: + # skip variables that already had values before this script started prepending + if name in os.environ: + continue + commands += [ + FORMAT_STR_REMOVE_LEADING_SEPARATOR.format_map({'name': name}), + FORMAT_STR_REMOVE_TRAILING_SEPARATOR.format_map({'name': name})] + return commands + + +def _set(name, value): + global env_state + env_state[name] = value + line = FORMAT_STR_SET_ENV_VAR.format_map( + {'name': name, 'value': value}) + return [line] + + +def _set_if_unset(name, value): + global env_state + line = FORMAT_STR_SET_ENV_VAR.format_map( + {'name': name, 'value': value}) + if env_state.get(name, os.environ.get(name)): + line = FORMAT_STR_COMMENT_LINE.format_map({'comment': line}) + return [line] + + +if __name__ == '__main__': # pragma: no cover + try: + rc = main() + except RuntimeError as e: + print(str(e), file=sys.stderr) + rc = 1 + sys.exit(rc) diff --git a/install/_local_setup_util_sh.py b/install/_local_setup_util_sh.py new file mode 100644 index 0000000..35c017b --- /dev/null +++ b/install/_local_setup_util_sh.py @@ -0,0 +1,404 @@ +# Copyright 2016-2019 Dirk Thomas +# Licensed under the Apache License, Version 2.0 + +import argparse +from collections import OrderedDict +import os +from pathlib import Path +import sys + + +FORMAT_STR_COMMENT_LINE = '# {comment}' +FORMAT_STR_SET_ENV_VAR = 'export {name}="{value}"' +FORMAT_STR_USE_ENV_VAR = '${name}' +FORMAT_STR_INVOKE_SCRIPT = 'COLCON_CURRENT_PREFIX="{prefix}" _colcon_prefix_sh_source_script "{script_path}"' +FORMAT_STR_REMOVE_LEADING_SEPARATOR = 'if [ "$(echo -n ${name} | head -c 1)" = ":" ]; then export {name}=${{{name}#?}} ; fi' +FORMAT_STR_REMOVE_TRAILING_SEPARATOR = 'if [ "$(echo -n ${name} | tail -c 1)" = ":" ]; then export {name}=${{{name}%?}} ; fi' + +DSV_TYPE_APPEND_NON_DUPLICATE = 'append-non-duplicate' +DSV_TYPE_PREPEND_NON_DUPLICATE = 'prepend-non-duplicate' +DSV_TYPE_PREPEND_NON_DUPLICATE_IF_EXISTS = 'prepend-non-duplicate-if-exists' +DSV_TYPE_SET = 'set' +DSV_TYPE_SET_IF_UNSET = 'set-if-unset' +DSV_TYPE_SOURCE = 'source' + + +def main(argv=sys.argv[1:]): # noqa: D103 + parser = argparse.ArgumentParser( + description='Output shell commands for the packages in topological ' + 'order') + parser.add_argument( + 'primary_extension', + help='The file extension of the primary shell') + parser.add_argument( + 'additional_extension', nargs='?', + help='The additional file extension to be considered') + parser.add_argument( + '--merged-install', action='store_true', + help='All install prefixes are merged into a single location') + args = parser.parse_args(argv) + + packages = get_packages(Path(__file__).parent, args.merged_install) + + ordered_packages = order_packages(packages) + for pkg_name in ordered_packages: + if _include_comments(): + print( + FORMAT_STR_COMMENT_LINE.format_map( + {'comment': 'Package: ' + pkg_name})) + prefix = os.path.abspath(os.path.dirname(__file__)) + if not args.merged_install: + prefix = os.path.join(prefix, pkg_name) + for line in get_commands( + pkg_name, prefix, args.primary_extension, + args.additional_extension + ): + print(line) + + for line in _remove_ending_separators(): + print(line) + + +def get_packages(prefix_path, merged_install): + """ + Find packages based on colcon-specific files created during installation. + + :param Path prefix_path: The install prefix path of all packages + :param bool merged_install: The flag if the packages are all installed + directly in the prefix or if each package is installed in a subdirectory + named after the package + :returns: A mapping from the package name to the set of runtime + dependencies + :rtype: dict + """ + packages = {} + # since importing colcon_core isn't feasible here the following constant + # must match colcon_core.location.get_relative_package_index_path() + subdirectory = 'share/colcon-core/packages' + if merged_install: + # return if workspace is empty + if not (prefix_path / subdirectory).is_dir(): + return packages + # find all files in the subdirectory + for p in (prefix_path / subdirectory).iterdir(): + if not p.is_file(): + continue + if p.name.startswith('.'): + continue + add_package_runtime_dependencies(p, packages) + else: + # for each subdirectory look for the package specific file + for p in prefix_path.iterdir(): + if not p.is_dir(): + continue + if p.name.startswith('.'): + continue + p = p / subdirectory / p.name + if p.is_file(): + add_package_runtime_dependencies(p, packages) + + # remove unknown dependencies + pkg_names = set(packages.keys()) + for k in packages.keys(): + packages[k] = {d for d in packages[k] if d in pkg_names} + + return packages + + +def add_package_runtime_dependencies(path, packages): + """ + Check the path and if it exists extract the packages runtime dependencies. + + :param Path path: The resource file containing the runtime dependencies + :param dict packages: A mapping from package names to the sets of runtime + dependencies to add to + """ + content = path.read_text() + dependencies = set(content.split(os.pathsep) if content else []) + packages[path.name] = dependencies + + +def order_packages(packages): + """ + Order packages topologically. + + :param dict packages: A mapping from package name to the set of runtime + dependencies + :returns: The package names + :rtype: list + """ + # select packages with no dependencies in alphabetical order + to_be_ordered = list(packages.keys()) + ordered = [] + while to_be_ordered: + pkg_names_without_deps = [ + name for name in to_be_ordered if not packages[name]] + if not pkg_names_without_deps: + reduce_cycle_set(packages) + raise RuntimeError( + 'Circular dependency between: ' + ', '.join(sorted(packages))) + pkg_names_without_deps.sort() + pkg_name = pkg_names_without_deps[0] + to_be_ordered.remove(pkg_name) + ordered.append(pkg_name) + # remove item from dependency lists + for k in list(packages.keys()): + if pkg_name in packages[k]: + packages[k].remove(pkg_name) + return ordered + + +def reduce_cycle_set(packages): + """ + Reduce the set of packages to the ones part of the circular dependency. + + :param dict packages: A mapping from package name to the set of runtime + dependencies which is modified in place + """ + last_depended = None + while len(packages) > 0: + # get all remaining dependencies + depended = set() + for pkg_name, dependencies in packages.items(): + depended = depended.union(dependencies) + # remove all packages which are not dependent on + for name in list(packages.keys()): + if name not in depended: + del packages[name] + if last_depended: + # if remaining packages haven't changed return them + if last_depended == depended: + return packages.keys() + # otherwise reduce again + last_depended = depended + + +def _include_comments(): + # skipping comment lines when COLCON_TRACE is not set speeds up the + # processing especially on Windows + return bool(os.environ.get('COLCON_TRACE')) + + +def get_commands(pkg_name, prefix, primary_extension, additional_extension): + commands = [] + package_dsv_path = os.path.join(prefix, 'share', pkg_name, 'package.dsv') + if os.path.exists(package_dsv_path): + commands += process_dsv_file( + package_dsv_path, prefix, primary_extension, additional_extension) + return commands + + +def process_dsv_file( + dsv_path, prefix, primary_extension=None, additional_extension=None +): + commands = [] + if _include_comments(): + commands.append(FORMAT_STR_COMMENT_LINE.format_map({'comment': dsv_path})) + with open(dsv_path, 'r') as h: + content = h.read() + lines = content.splitlines() + + basenames = OrderedDict() + for i, line in enumerate(lines): + # skip over empty or whitespace-only lines + if not line.strip(): + continue + try: + type_, remainder = line.split(';', 1) + except ValueError: + raise RuntimeError( + "Line %d in '%s' doesn't contain a semicolon separating the " + 'type from the arguments' % (i + 1, dsv_path)) + if type_ != DSV_TYPE_SOURCE: + # handle non-source lines + try: + commands += handle_dsv_types_except_source( + type_, remainder, prefix) + except RuntimeError as e: + raise RuntimeError( + "Line %d in '%s' %s" % (i + 1, dsv_path, e)) from e + else: + # group remaining source lines by basename + path_without_ext, ext = os.path.splitext(remainder) + if path_without_ext not in basenames: + basenames[path_without_ext] = set() + assert ext.startswith('.') + ext = ext[1:] + if ext in (primary_extension, additional_extension): + basenames[path_without_ext].add(ext) + + # add the dsv extension to each basename if the file exists + for basename, extensions in basenames.items(): + if not os.path.isabs(basename): + basename = os.path.join(prefix, basename) + if os.path.exists(basename + '.dsv'): + extensions.add('dsv') + + for basename, extensions in basenames.items(): + if not os.path.isabs(basename): + basename = os.path.join(prefix, basename) + if 'dsv' in extensions: + # process dsv files recursively + commands += process_dsv_file( + basename + '.dsv', prefix, primary_extension=primary_extension, + additional_extension=additional_extension) + elif primary_extension in extensions and len(extensions) == 1: + # source primary-only files + commands += [ + FORMAT_STR_INVOKE_SCRIPT.format_map({ + 'prefix': prefix, + 'script_path': basename + '.' + primary_extension})] + elif additional_extension in extensions: + # source non-primary files + commands += [ + FORMAT_STR_INVOKE_SCRIPT.format_map({ + 'prefix': prefix, + 'script_path': basename + '.' + additional_extension})] + + return commands + + +def handle_dsv_types_except_source(type_, remainder, prefix): + commands = [] + if type_ in (DSV_TYPE_SET, DSV_TYPE_SET_IF_UNSET): + try: + env_name, value = remainder.split(';', 1) + except ValueError: + raise RuntimeError( + "doesn't contain a semicolon separating the environment name " + 'from the value') + try_prefixed_value = os.path.join(prefix, value) if value else prefix + if os.path.exists(try_prefixed_value): + value = try_prefixed_value + if type_ == DSV_TYPE_SET: + commands += _set(env_name, value) + elif type_ == DSV_TYPE_SET_IF_UNSET: + commands += _set_if_unset(env_name, value) + else: + assert False + elif type_ in ( + DSV_TYPE_APPEND_NON_DUPLICATE, + DSV_TYPE_PREPEND_NON_DUPLICATE, + DSV_TYPE_PREPEND_NON_DUPLICATE_IF_EXISTS + ): + try: + env_name_and_values = remainder.split(';') + except ValueError: + raise RuntimeError( + "doesn't contain a semicolon separating the environment name " + 'from the values') + env_name = env_name_and_values[0] + values = env_name_and_values[1:] + for value in values: + if not value: + value = prefix + elif not os.path.isabs(value): + value = os.path.join(prefix, value) + if ( + type_ == DSV_TYPE_PREPEND_NON_DUPLICATE_IF_EXISTS and + not os.path.exists(value) + ): + comment = f'skip extending {env_name} with not existing ' \ + f'path: {value}' + if _include_comments(): + commands.append( + FORMAT_STR_COMMENT_LINE.format_map({'comment': comment})) + elif type_ == DSV_TYPE_APPEND_NON_DUPLICATE: + commands += _append_unique_value(env_name, value) + else: + commands += _prepend_unique_value(env_name, value) + else: + raise RuntimeError( + 'contains an unknown environment hook type: ' + type_) + return commands + + +env_state = {} + + +def _append_unique_value(name, value): + global env_state + if name not in env_state: + if os.environ.get(name): + env_state[name] = set(os.environ[name].split(os.pathsep)) + else: + env_state[name] = set() + # append even if the variable has not been set yet, in case a shell script sets the + # same variable without the knowledge of this Python script. + # later _remove_ending_separators() will cleanup any unintentional leading separator + extend = FORMAT_STR_USE_ENV_VAR.format_map({'name': name}) + os.pathsep + line = FORMAT_STR_SET_ENV_VAR.format_map( + {'name': name, 'value': extend + value}) + if value not in env_state[name]: + env_state[name].add(value) + else: + if not _include_comments(): + return [] + line = FORMAT_STR_COMMENT_LINE.format_map({'comment': line}) + return [line] + + +def _prepend_unique_value(name, value): + global env_state + if name not in env_state: + if os.environ.get(name): + env_state[name] = set(os.environ[name].split(os.pathsep)) + else: + env_state[name] = set() + # prepend even if the variable has not been set yet, in case a shell script sets the + # same variable without the knowledge of this Python script. + # later _remove_ending_separators() will cleanup any unintentional trailing separator + extend = os.pathsep + FORMAT_STR_USE_ENV_VAR.format_map({'name': name}) + line = FORMAT_STR_SET_ENV_VAR.format_map( + {'name': name, 'value': value + extend}) + if value not in env_state[name]: + env_state[name].add(value) + else: + if not _include_comments(): + return [] + line = FORMAT_STR_COMMENT_LINE.format_map({'comment': line}) + return [line] + + +# generate commands for removing prepended underscores +def _remove_ending_separators(): + # do nothing if the shell extension does not implement the logic + if FORMAT_STR_REMOVE_TRAILING_SEPARATOR is None: + return [] + + global env_state + commands = [] + for name in env_state: + # skip variables that already had values before this script started prepending + if name in os.environ: + continue + commands += [ + FORMAT_STR_REMOVE_LEADING_SEPARATOR.format_map({'name': name}), + FORMAT_STR_REMOVE_TRAILING_SEPARATOR.format_map({'name': name})] + return commands + + +def _set(name, value): + global env_state + env_state[name] = value + line = FORMAT_STR_SET_ENV_VAR.format_map( + {'name': name, 'value': value}) + return [line] + + +def _set_if_unset(name, value): + global env_state + line = FORMAT_STR_SET_ENV_VAR.format_map( + {'name': name, 'value': value}) + if env_state.get(name, os.environ.get(name)): + line = FORMAT_STR_COMMENT_LINE.format_map({'comment': line}) + return [line] + + +if __name__ == '__main__': # pragma: no cover + try: + rc = main() + except RuntimeError as e: + print(str(e), file=sys.stderr) + rc = 1 + sys.exit(rc) diff --git a/install/chamo/share/ament_index/resource_index/packages/chamo b/install/chamo/share/ament_index/resource_index/packages/chamo new file mode 100644 index 0000000..e69de29 diff --git a/install/chamo/share/chamo/hook/ament_prefix_path.dsv b/install/chamo/share/chamo/hook/ament_prefix_path.dsv new file mode 100644 index 0000000..79d4c95 --- /dev/null +++ b/install/chamo/share/chamo/hook/ament_prefix_path.dsv @@ -0,0 +1 @@ +prepend-non-duplicate;AMENT_PREFIX_PATH; diff --git a/install/chamo/share/chamo/hook/ament_prefix_path.ps1 b/install/chamo/share/chamo/hook/ament_prefix_path.ps1 new file mode 100644 index 0000000..26b9997 --- /dev/null +++ b/install/chamo/share/chamo/hook/ament_prefix_path.ps1 @@ -0,0 +1,3 @@ +# generated from colcon_powershell/shell/template/hook_prepend_value.ps1.em + +colcon_prepend_unique_value AMENT_PREFIX_PATH "$env:COLCON_CURRENT_PREFIX" diff --git a/install/chamo/share/chamo/hook/ament_prefix_path.sh b/install/chamo/share/chamo/hook/ament_prefix_path.sh new file mode 100644 index 0000000..f3041f6 --- /dev/null +++ b/install/chamo/share/chamo/hook/ament_prefix_path.sh @@ -0,0 +1,3 @@ +# generated from colcon_core/shell/template/hook_prepend_value.sh.em + +_colcon_prepend_unique_value AMENT_PREFIX_PATH "$COLCON_CURRENT_PREFIX" diff --git a/install/chamo/share/chamo/hook/pythonpath.dsv b/install/chamo/share/chamo/hook/pythonpath.dsv new file mode 100644 index 0000000..84dbc4c --- /dev/null +++ b/install/chamo/share/chamo/hook/pythonpath.dsv @@ -0,0 +1 @@ +prepend-non-duplicate;PYTHONPATH;lib/python3.8/site-packages diff --git a/install/chamo/share/chamo/hook/pythonpath.ps1 b/install/chamo/share/chamo/hook/pythonpath.ps1 new file mode 100644 index 0000000..12877ef --- /dev/null +++ b/install/chamo/share/chamo/hook/pythonpath.ps1 @@ -0,0 +1,3 @@ +# generated from colcon_powershell/shell/template/hook_prepend_value.ps1.em + +colcon_prepend_unique_value PYTHONPATH "$env:COLCON_CURRENT_PREFIX\lib/python3.8/site-packages" diff --git a/install/chamo/share/chamo/hook/pythonpath.sh b/install/chamo/share/chamo/hook/pythonpath.sh new file mode 100644 index 0000000..ed8efd9 --- /dev/null +++ b/install/chamo/share/chamo/hook/pythonpath.sh @@ -0,0 +1,3 @@ +# generated from colcon_core/shell/template/hook_prepend_value.sh.em + +_colcon_prepend_unique_value PYTHONPATH "$COLCON_CURRENT_PREFIX/lib/python3.8/site-packages" diff --git a/install/chamo/share/chamo/package.bash b/install/chamo/share/chamo/package.bash new file mode 100644 index 0000000..a5a0062 --- /dev/null +++ b/install/chamo/share/chamo/package.bash @@ -0,0 +1,31 @@ +# generated from colcon_bash/shell/template/package.bash.em + +# This script extends the environment for this package. + +# a bash script is able to determine its own path if necessary +if [ -z "$COLCON_CURRENT_PREFIX" ]; then + # the prefix is two levels up from the package specific share directory + _colcon_package_bash_COLCON_CURRENT_PREFIX="$(builtin cd "`dirname "${BASH_SOURCE[0]}"`/../.." > /dev/null && pwd)" +else + _colcon_package_bash_COLCON_CURRENT_PREFIX="$COLCON_CURRENT_PREFIX" +fi + +# function to source another script with conditional trace output +# first argument: the path of the script +# additional arguments: arguments to the script +_colcon_package_bash_source_script() { + if [ -f "$1" ]; then + if [ -n "$COLCON_TRACE" ]; then + echo ". \"$1\"" + fi + . "$@" + else + echo "not found: \"$1\"" 1>&2 + fi +} + +# source sh script of this package +_colcon_package_bash_source_script "$_colcon_package_bash_COLCON_CURRENT_PREFIX/share/chamo/package.sh" + +unset _colcon_package_bash_source_script +unset _colcon_package_bash_COLCON_CURRENT_PREFIX diff --git a/install/chamo/share/chamo/package.dsv b/install/chamo/share/chamo/package.dsv new file mode 100644 index 0000000..1d2b059 --- /dev/null +++ b/install/chamo/share/chamo/package.dsv @@ -0,0 +1,6 @@ +source;share/chamo/hook/pythonpath.ps1 +source;share/chamo/hook/pythonpath.dsv +source;share/chamo/hook/pythonpath.sh +source;share/chamo/hook/ament_prefix_path.ps1 +source;share/chamo/hook/ament_prefix_path.dsv +source;share/chamo/hook/ament_prefix_path.sh diff --git a/install/chamo/share/chamo/package.ps1 b/install/chamo/share/chamo/package.ps1 new file mode 100644 index 0000000..b4df3cd --- /dev/null +++ b/install/chamo/share/chamo/package.ps1 @@ -0,0 +1,116 @@ +# generated from colcon_powershell/shell/template/package.ps1.em + +# function to append a value to a variable +# which uses colons as separators +# duplicates as well as leading separators are avoided +# first argument: the name of the result variable +# second argument: the value to be prepended +function colcon_append_unique_value { + param ( + $_listname, + $_value + ) + + # get values from variable + if (Test-Path Env:$_listname) { + $_values=(Get-Item env:$_listname).Value + } else { + $_values="" + } + $_duplicate="" + # start with no values + $_all_values="" + # iterate over existing values in the variable + if ($_values) { + $_values.Split(";") | ForEach { + # not an empty string + if ($_) { + # not a duplicate of _value + if ($_ -eq $_value) { + $_duplicate="1" + } + if ($_all_values) { + $_all_values="${_all_values};$_" + } else { + $_all_values="$_" + } + } + } + } + # append only non-duplicates + if (!$_duplicate) { + # avoid leading separator + if ($_all_values) { + $_all_values="${_all_values};${_value}" + } else { + $_all_values="${_value}" + } + } + + # export the updated variable + Set-Item env:\$_listname -Value "$_all_values" +} + +# function to prepend a value to a variable +# which uses colons as separators +# duplicates as well as trailing separators are avoided +# first argument: the name of the result variable +# second argument: the value to be prepended +function colcon_prepend_unique_value { + param ( + $_listname, + $_value + ) + + # get values from variable + if (Test-Path Env:$_listname) { + $_values=(Get-Item env:$_listname).Value + } else { + $_values="" + } + # start with the new value + $_all_values="$_value" + # iterate over existing values in the variable + if ($_values) { + $_values.Split(";") | ForEach { + # not an empty string + if ($_) { + # not a duplicate of _value + if ($_ -ne $_value) { + # keep non-duplicate values + $_all_values="${_all_values};$_" + } + } + } + } + # export the updated variable + Set-Item env:\$_listname -Value "$_all_values" +} + +# function to source another script with conditional trace output +# first argument: the path of the script +# additional arguments: arguments to the script +function colcon_package_source_powershell_script { + param ( + $_colcon_package_source_powershell_script + ) + # source script with conditional trace output + if (Test-Path $_colcon_package_source_powershell_script) { + if ($env:COLCON_TRACE) { + echo ". '$_colcon_package_source_powershell_script'" + } + . "$_colcon_package_source_powershell_script" + } else { + Write-Error "not found: '$_colcon_package_source_powershell_script'" + } +} + + +# a powershell script is able to determine its own path +# the prefix is two levels up from the package specific share directory +$env:COLCON_CURRENT_PREFIX=(Get-Item $PSCommandPath).Directory.Parent.Parent.FullName + +colcon_package_source_powershell_script "$env:COLCON_CURRENT_PREFIX\share/chamo/hook/pythonpath.ps1" +colcon_package_source_powershell_script "$env:COLCON_CURRENT_PREFIX\share/chamo/hook/ament_prefix_path.ps1" + +Remove-Item Env:\COLCON_CURRENT_PREFIX diff --git a/install/chamo/share/chamo/package.sh b/install/chamo/share/chamo/package.sh new file mode 100644 index 0000000..d258915 --- /dev/null +++ b/install/chamo/share/chamo/package.sh @@ -0,0 +1,87 @@ +# generated from colcon_core/shell/template/package.sh.em + +# This script extends the environment for this package. + +# function to prepend a value to a variable +# which uses colons as separators +# duplicates as well as trailing separators are avoided +# first argument: the name of the result variable +# second argument: the value to be prepended +_colcon_prepend_unique_value() { + # arguments + _listname="$1" + _value="$2" + + # get values from variable + eval _values=\"\$$_listname\" + # backup the field separator + _colcon_prepend_unique_value_IFS=$IFS + IFS=":" + # start with the new value + _all_values="$_value" + # workaround SH_WORD_SPLIT not being set in zsh + if [ "$(command -v colcon_zsh_convert_to_array)" ]; then + colcon_zsh_convert_to_array _values + fi + # iterate over existing values in the variable + for _item in $_values; do + # ignore empty strings + if [ -z "$_item" ]; then + continue + fi + # ignore duplicates of _value + if [ "$_item" = "$_value" ]; then + continue + fi + # keep non-duplicate values + _all_values="$_all_values:$_item" + done + unset _item + # restore the field separator + IFS=$_colcon_prepend_unique_value_IFS + unset _colcon_prepend_unique_value_IFS + # export the updated variable + eval export $_listname=\"$_all_values\" + unset _all_values + unset _values + + unset _value + unset _listname +} + +# since a plain shell script can't determine its own path when being sourced +# either use the provided COLCON_CURRENT_PREFIX +# or fall back to the build time prefix (if it exists) +_colcon_package_sh_COLCON_CURRENT_PREFIX="/home/jackson/chamito/src/install/chamo" +if [ -z "$COLCON_CURRENT_PREFIX" ]; then + if [ ! -d "$_colcon_package_sh_COLCON_CURRENT_PREFIX" ]; then + echo "The build time path \"$_colcon_package_sh_COLCON_CURRENT_PREFIX\" doesn't exist. Either source a script for a different shell or set the environment variable \"COLCON_CURRENT_PREFIX\" explicitly." 1>&2 + unset _colcon_package_sh_COLCON_CURRENT_PREFIX + return 1 + fi + COLCON_CURRENT_PREFIX="$_colcon_package_sh_COLCON_CURRENT_PREFIX" +fi +unset _colcon_package_sh_COLCON_CURRENT_PREFIX + +# function to source another script with conditional trace output +# first argument: the path of the script +# additional arguments: arguments to the script +_colcon_package_sh_source_script() { + if [ -f "$1" ]; then + if [ -n "$COLCON_TRACE" ]; then + echo "# . \"$1\"" + fi + . "$@" + else + echo "not found: \"$1\"" 1>&2 + fi +} + +# source sh hooks +_colcon_package_sh_source_script "$COLCON_CURRENT_PREFIX/share/chamo/hook/pythonpath.sh" +_colcon_package_sh_source_script "$COLCON_CURRENT_PREFIX/share/chamo/hook/ament_prefix_path.sh" + +unset _colcon_package_sh_source_script +unset COLCON_CURRENT_PREFIX + +# do not unset _colcon_prepend_unique_value since it might be used by non-primary shell hooks diff --git a/install/chamo/share/chamo/package.xml b/install/chamo/share/chamo/package.xml new file mode 100644 index 0000000..2498757 --- /dev/null +++ b/install/chamo/share/chamo/package.xml @@ -0,0 +1,18 @@ + + + + chamo + 0.0.0 + TODO: Package description + jackson + TODO: License declaration + + ament_copyright + ament_flake8 + ament_pep257 + python3-pytest + + + ament_python + + diff --git a/install/chamo/share/chamo/package.zsh b/install/chamo/share/chamo/package.zsh new file mode 100644 index 0000000..288e384 --- /dev/null +++ b/install/chamo/share/chamo/package.zsh @@ -0,0 +1,42 @@ +# generated from colcon_zsh/shell/template/package.zsh.em + +# This script extends the environment for this package. + +# a zsh script is able to determine its own path if necessary +if [ -z "$COLCON_CURRENT_PREFIX" ]; then + # the prefix is two levels up from the package specific share directory + _colcon_package_zsh_COLCON_CURRENT_PREFIX="$(builtin cd -q "`dirname "${(%):-%N}"`/../.." > /dev/null && pwd)" +else + _colcon_package_zsh_COLCON_CURRENT_PREFIX="$COLCON_CURRENT_PREFIX" +fi + +# function to source another script with conditional trace output +# first argument: the path of the script +# additional arguments: arguments to the script +_colcon_package_zsh_source_script() { + if [ -f "$1" ]; then + if [ -n "$COLCON_TRACE" ]; then + echo ". \"$1\"" + fi + . "$@" + else + echo "not found: \"$1\"" 1>&2 + fi +} + +# function to convert array-like strings into arrays +# to workaround SH_WORD_SPLIT not being set +colcon_zsh_convert_to_array() { + local _listname=$1 + local _dollar="$" + local _split="{=" + local _to_array="(\"$_dollar$_split$_listname}\")" + eval $_listname=$_to_array +} + +# source sh script of this package +_colcon_package_zsh_source_script "$_colcon_package_zsh_COLCON_CURRENT_PREFIX/share/chamo/package.sh" +unset convert_zsh_to_array + +unset _colcon_package_zsh_source_script +unset _colcon_package_zsh_COLCON_CURRENT_PREFIX diff --git a/install/chamo/share/colcon-core/packages/chamo b/install/chamo/share/colcon-core/packages/chamo new file mode 100644 index 0000000..e69de29 diff --git a/install/local_setup.bash b/install/local_setup.bash new file mode 100644 index 0000000..efd5f8c --- /dev/null +++ b/install/local_setup.bash @@ -0,0 +1,107 @@ +# generated from colcon_bash/shell/template/prefix.bash.em + +# This script extends the environment with all packages contained in this +# prefix path. + +# a bash script is able to determine its own path if necessary +if [ -z "$COLCON_CURRENT_PREFIX" ]; then + _colcon_prefix_bash_COLCON_CURRENT_PREFIX="$(builtin cd "`dirname "${BASH_SOURCE[0]}"`" > /dev/null && pwd)" +else + _colcon_prefix_bash_COLCON_CURRENT_PREFIX="$COLCON_CURRENT_PREFIX" +fi + +# function to prepend a value to a variable +# which uses colons as separators +# duplicates as well as trailing separators are avoided +# first argument: the name of the result variable +# second argument: the value to be prepended +_colcon_prefix_bash_prepend_unique_value() { + # arguments + _listname="$1" + _value="$2" + + # get values from variable + eval _values=\"\$$_listname\" + # backup the field separator + _colcon_prefix_bash_prepend_unique_value_IFS="$IFS" + IFS=":" + # start with the new value + _all_values="$_value" + # iterate over existing values in the variable + for _item in $_values; do + # ignore empty strings + if [ -z "$_item" ]; then + continue + fi + # ignore duplicates of _value + if [ "$_item" = "$_value" ]; then + continue + fi + # keep non-duplicate values + _all_values="$_all_values:$_item" + done + unset _item + # restore the field separator + IFS="$_colcon_prefix_bash_prepend_unique_value_IFS" + unset _colcon_prefix_bash_prepend_unique_value_IFS + # export the updated variable + eval export $_listname=\"$_all_values\" + unset _all_values + unset _values + + unset _value + unset _listname +} + +# add this prefix to the COLCON_PREFIX_PATH +_colcon_prefix_bash_prepend_unique_value COLCON_PREFIX_PATH "$_colcon_prefix_bash_COLCON_CURRENT_PREFIX" +unset _colcon_prefix_bash_prepend_unique_value + +# check environment variable for custom Python executable +if [ -n "$COLCON_PYTHON_EXECUTABLE" ]; then + if [ ! -f "$COLCON_PYTHON_EXECUTABLE" ]; then + echo "error: COLCON_PYTHON_EXECUTABLE '$COLCON_PYTHON_EXECUTABLE' doesn't exist" + return 1 + fi + _colcon_python_executable="$COLCON_PYTHON_EXECUTABLE" +else + # try the Python executable known at configure time + _colcon_python_executable="/usr/bin/python3" + # if it doesn't exist try a fall back + if [ ! -f "$_colcon_python_executable" ]; then + if ! /usr/bin/env python3 --version > /dev/null 2> /dev/null; then + echo "error: unable to find python3 executable" + return 1 + fi + _colcon_python_executable=`/usr/bin/env python3 -c "import sys; print(sys.executable)"` + fi +fi + +# function to source another script with conditional trace output +# first argument: the path of the script +_colcon_prefix_sh_source_script() { + if [ -f "$1" ]; then + if [ -n "$COLCON_TRACE" ]; then + echo ". \"$1\"" + fi + . "$1" + else + echo "not found: \"$1\"" 1>&2 + fi +} + +# get all commands in topological order +_colcon_ordered_commands="$($_colcon_python_executable "$_colcon_prefix_bash_COLCON_CURRENT_PREFIX/_local_setup_util_sh.py" sh bash)" +unset _colcon_python_executable +if [ -n "$COLCON_TRACE" ]; then + echo "Execute generated script:" + echo "<<<" + echo "${_colcon_ordered_commands}" + echo ">>>" +fi +eval "${_colcon_ordered_commands}" +unset _colcon_ordered_commands + +unset _colcon_prefix_sh_source_script + +unset _colcon_prefix_bash_COLCON_CURRENT_PREFIX diff --git a/install/local_setup.ps1 b/install/local_setup.ps1 new file mode 100644 index 0000000..6f68c8d --- /dev/null +++ b/install/local_setup.ps1 @@ -0,0 +1,55 @@ +# generated from colcon_powershell/shell/template/prefix.ps1.em + +# This script extends the environment with all packages contained in this +# prefix path. + +# check environment variable for custom Python executable +if ($env:COLCON_PYTHON_EXECUTABLE) { + if (!(Test-Path "$env:COLCON_PYTHON_EXECUTABLE" -PathType Leaf)) { + echo "error: COLCON_PYTHON_EXECUTABLE '$env:COLCON_PYTHON_EXECUTABLE' doesn't exist" + exit 1 + } + $_colcon_python_executable="$env:COLCON_PYTHON_EXECUTABLE" +} else { + # use the Python executable known at configure time + $_colcon_python_executable="/usr/bin/python3" + # if it doesn't exist try a fall back + if (!(Test-Path "$_colcon_python_executable" -PathType Leaf)) { + if (!(Get-Command "python3" -ErrorAction SilentlyContinue)) { + echo "error: unable to find python3 executable" + exit 1 + } + $_colcon_python_executable="python3" + } +} + +# function to source another script with conditional trace output +# first argument: the path of the script +function _colcon_prefix_powershell_source_script { + param ( + $_colcon_prefix_powershell_source_script_param + ) + # source script with conditional trace output + if (Test-Path $_colcon_prefix_powershell_source_script_param) { + if ($env:COLCON_TRACE) { + echo ". '$_colcon_prefix_powershell_source_script_param'" + } + . "$_colcon_prefix_powershell_source_script_param" + } else { + Write-Error "not found: '$_colcon_prefix_powershell_source_script_param'" + } +} + +# get all commands in topological order +$_colcon_ordered_commands = & "$_colcon_python_executable" "$(Split-Path $PSCommandPath -Parent)/_local_setup_util_ps1.py" ps1 + +# execute all commands in topological order +if ($env:COLCON_TRACE) { + echo "Execute generated script:" + echo "<<<" + $_colcon_ordered_commands.Split([Environment]::NewLine, [StringSplitOptions]::RemoveEmptyEntries) | Write-Output + echo ">>>" +} +if ($_colcon_ordered_commands) { + $_colcon_ordered_commands.Split([Environment]::NewLine, [StringSplitOptions]::RemoveEmptyEntries) | Invoke-Expression +} diff --git a/install/local_setup.sh b/install/local_setup.sh new file mode 100644 index 0000000..9025d40 --- /dev/null +++ b/install/local_setup.sh @@ -0,0 +1,137 @@ +# generated from colcon_core/shell/template/prefix.sh.em + +# This script extends the environment with all packages contained in this +# prefix path. + +# since a plain shell script can't determine its own path when being sourced +# either use the provided COLCON_CURRENT_PREFIX +# or fall back to the build time prefix (if it exists) +_colcon_prefix_sh_COLCON_CURRENT_PREFIX="/home/jackson/chamito/src/install" +if [ -z "$COLCON_CURRENT_PREFIX" ]; then + if [ ! -d "$_colcon_prefix_sh_COLCON_CURRENT_PREFIX" ]; then + echo "The build time path \"$_colcon_prefix_sh_COLCON_CURRENT_PREFIX\" doesn't exist. Either source a script for a different shell or set the environment variable \"COLCON_CURRENT_PREFIX\" explicitly." 1>&2 + unset _colcon_prefix_sh_COLCON_CURRENT_PREFIX + return 1 + fi +else + _colcon_prefix_sh_COLCON_CURRENT_PREFIX="$COLCON_CURRENT_PREFIX" +fi + +# function to prepend a value to a variable +# which uses colons as separators +# duplicates as well as trailing separators are avoided +# first argument: the name of the result variable +# second argument: the value to be prepended +_colcon_prefix_sh_prepend_unique_value() { + # arguments + _listname="$1" + _value="$2" + + # get values from variable + eval _values=\"\$$_listname\" + # backup the field separator + _colcon_prefix_sh_prepend_unique_value_IFS="$IFS" + IFS=":" + # start with the new value + _all_values="$_value" + _contained_value="" + # iterate over existing values in the variable + for _item in $_values; do + # ignore empty strings + if [ -z "$_item" ]; then + continue + fi + # ignore duplicates of _value + if [ "$_item" = "$_value" ]; then + _contained_value=1 + continue + fi + # keep non-duplicate values + _all_values="$_all_values:$_item" + done + unset _item + if [ -z "$_contained_value" ]; then + if [ -n "$COLCON_TRACE" ]; then + if [ "$_all_values" = "$_value" ]; then + echo "export $_listname=$_value" + else + echo "export $_listname=$_value:\$$_listname" + fi + fi + fi + unset _contained_value + # restore the field separator + IFS="$_colcon_prefix_sh_prepend_unique_value_IFS" + unset _colcon_prefix_sh_prepend_unique_value_IFS + # export the updated variable + eval export $_listname=\"$_all_values\" + unset _all_values + unset _values + + unset _value + unset _listname +} + +# add this prefix to the COLCON_PREFIX_PATH +_colcon_prefix_sh_prepend_unique_value COLCON_PREFIX_PATH "$_colcon_prefix_sh_COLCON_CURRENT_PREFIX" +unset _colcon_prefix_sh_prepend_unique_value + +# check environment variable for custom Python executable +if [ -n "$COLCON_PYTHON_EXECUTABLE" ]; then + if [ ! -f "$COLCON_PYTHON_EXECUTABLE" ]; then + echo "error: COLCON_PYTHON_EXECUTABLE '$COLCON_PYTHON_EXECUTABLE' doesn't exist" + return 1 + fi + _colcon_python_executable="$COLCON_PYTHON_EXECUTABLE" +else + # try the Python executable known at configure time + _colcon_python_executable="/usr/bin/python3" + # if it doesn't exist try a fall back + if [ ! -f "$_colcon_python_executable" ]; then + if ! /usr/bin/env python3 --version > /dev/null 2> /dev/null; then + echo "error: unable to find python3 executable" + return 1 + fi + _colcon_python_executable=`/usr/bin/env python3 -c "import sys; print(sys.executable)"` + fi +fi + +# function to source another script with conditional trace output +# first argument: the path of the script +_colcon_prefix_sh_source_script() { + if [ -f "$1" ]; then + if [ -n "$COLCON_TRACE" ]; then + echo "# . \"$1\"" + fi + . "$1" + else + echo "not found: \"$1\"" 1>&2 + fi +} + +# get all commands in topological order +_colcon_ordered_commands="$($_colcon_python_executable "$_colcon_prefix_sh_COLCON_CURRENT_PREFIX/_local_setup_util_sh.py" sh)" +unset _colcon_python_executable +if [ -n "$COLCON_TRACE" ]; then + echo "_colcon_prefix_sh_source_script() { + if [ -f \"\$1\" ]; then + if [ -n \"\$COLCON_TRACE\" ]; then + echo \"# . \\\"\$1\\\"\" + fi + . \"\$1\" + else + echo \"not found: \\\"\$1\\\"\" 1>&2 + fi + }" + echo "# Execute generated script:" + echo "# <<<" + echo "${_colcon_ordered_commands}" + echo "# >>>" + echo "unset _colcon_prefix_sh_source_script" +fi +eval "${_colcon_ordered_commands}" +unset _colcon_ordered_commands + +unset _colcon_prefix_sh_source_script + +unset _colcon_prefix_sh_COLCON_CURRENT_PREFIX diff --git a/install/local_setup.zsh b/install/local_setup.zsh new file mode 100644 index 0000000..f7a8d90 --- /dev/null +++ b/install/local_setup.zsh @@ -0,0 +1,120 @@ +# generated from colcon_zsh/shell/template/prefix.zsh.em + +# This script extends the environment with all packages contained in this +# prefix path. + +# a zsh script is able to determine its own path if necessary +if [ -z "$COLCON_CURRENT_PREFIX" ]; then + _colcon_prefix_zsh_COLCON_CURRENT_PREFIX="$(builtin cd -q "`dirname "${(%):-%N}"`" > /dev/null && pwd)" +else + _colcon_prefix_zsh_COLCON_CURRENT_PREFIX="$COLCON_CURRENT_PREFIX" +fi + +# function to convert array-like strings into arrays +# to workaround SH_WORD_SPLIT not being set +_colcon_prefix_zsh_convert_to_array() { + local _listname=$1 + local _dollar="$" + local _split="{=" + local _to_array="(\"$_dollar$_split$_listname}\")" + eval $_listname=$_to_array +} + +# function to prepend a value to a variable +# which uses colons as separators +# duplicates as well as trailing separators are avoided +# first argument: the name of the result variable +# second argument: the value to be prepended +_colcon_prefix_zsh_prepend_unique_value() { + # arguments + _listname="$1" + _value="$2" + + # get values from variable + eval _values=\"\$$_listname\" + # backup the field separator + _colcon_prefix_zsh_prepend_unique_value_IFS="$IFS" + IFS=":" + # start with the new value + _all_values="$_value" + # workaround SH_WORD_SPLIT not being set + _colcon_prefix_zsh_convert_to_array _values + # iterate over existing values in the variable + for _item in $_values; do + # ignore empty strings + if [ -z "$_item" ]; then + continue + fi + # ignore duplicates of _value + if [ "$_item" = "$_value" ]; then + continue + fi + # keep non-duplicate values + _all_values="$_all_values:$_item" + done + unset _item + # restore the field separator + IFS="$_colcon_prefix_zsh_prepend_unique_value_IFS" + unset _colcon_prefix_zsh_prepend_unique_value_IFS + # export the updated variable + eval export $_listname=\"$_all_values\" + unset _all_values + unset _values + + unset _value + unset _listname +} + +# add this prefix to the COLCON_PREFIX_PATH +_colcon_prefix_zsh_prepend_unique_value COLCON_PREFIX_PATH "$_colcon_prefix_zsh_COLCON_CURRENT_PREFIX" +unset _colcon_prefix_zsh_prepend_unique_value +unset _colcon_prefix_zsh_convert_to_array + +# check environment variable for custom Python executable +if [ -n "$COLCON_PYTHON_EXECUTABLE" ]; then + if [ ! -f "$COLCON_PYTHON_EXECUTABLE" ]; then + echo "error: COLCON_PYTHON_EXECUTABLE '$COLCON_PYTHON_EXECUTABLE' doesn't exist" + return 1 + fi + _colcon_python_executable="$COLCON_PYTHON_EXECUTABLE" +else + # try the Python executable known at configure time + _colcon_python_executable="/usr/bin/python3" + # if it doesn't exist try a fall back + if [ ! -f "$_colcon_python_executable" ]; then + if ! /usr/bin/env python3 --version > /dev/null 2> /dev/null; then + echo "error: unable to find python3 executable" + return 1 + fi + _colcon_python_executable=`/usr/bin/env python3 -c "import sys; print(sys.executable)"` + fi +fi + +# function to source another script with conditional trace output +# first argument: the path of the script +_colcon_prefix_sh_source_script() { + if [ -f "$1" ]; then + if [ -n "$COLCON_TRACE" ]; then + echo ". \"$1\"" + fi + . "$1" + else + echo "not found: \"$1\"" 1>&2 + fi +} + +# get all commands in topological order +_colcon_ordered_commands="$($_colcon_python_executable "$_colcon_prefix_zsh_COLCON_CURRENT_PREFIX/_local_setup_util_sh.py" sh zsh)" +unset _colcon_python_executable +if [ -n "$COLCON_TRACE" ]; then + echo "Execute generated script:" + echo "<<<" + echo "${_colcon_ordered_commands}" + echo ">>>" +fi +eval "${_colcon_ordered_commands}" +unset _colcon_ordered_commands + +unset _colcon_prefix_sh_source_script + +unset _colcon_prefix_zsh_COLCON_CURRENT_PREFIX diff --git a/install/lolito/share/ament_index/resource_index/package_run_dependencies/lolito b/install/lolito/share/ament_index/resource_index/package_run_dependencies/lolito new file mode 100644 index 0000000..86cf3ee --- /dev/null +++ b/install/lolito/share/ament_index/resource_index/package_run_dependencies/lolito @@ -0,0 +1 @@ +rclpy;std_msgs;ament_lint_auto;ament_lint_common \ No newline at end of file diff --git a/install/lolito/share/ament_index/resource_index/packages/lolito b/install/lolito/share/ament_index/resource_index/packages/lolito new file mode 100644 index 0000000..e69de29 diff --git a/install/lolito/share/ament_index/resource_index/parent_prefix_path/lolito b/install/lolito/share/ament_index/resource_index/parent_prefix_path/lolito new file mode 100644 index 0000000..8f3e2f5 --- /dev/null +++ b/install/lolito/share/ament_index/resource_index/parent_prefix_path/lolito @@ -0,0 +1 @@ +/opt/ros/foxy \ No newline at end of file diff --git a/install/lolito/share/colcon-core/packages/lolito b/install/lolito/share/colcon-core/packages/lolito new file mode 100644 index 0000000..de58d89 --- /dev/null +++ b/install/lolito/share/colcon-core/packages/lolito @@ -0,0 +1 @@ +rclpy:std_msgs \ No newline at end of file diff --git a/install/lolito/share/lolito/cmake/lolitoConfig-version.cmake b/install/lolito/share/lolito/cmake/lolitoConfig-version.cmake new file mode 100644 index 0000000..7beb732 --- /dev/null +++ b/install/lolito/share/lolito/cmake/lolitoConfig-version.cmake @@ -0,0 +1,14 @@ +# generated from ament/cmake/core/templates/nameConfig-version.cmake.in +set(PACKAGE_VERSION "0.0.0") + +set(PACKAGE_VERSION_EXACT False) +set(PACKAGE_VERSION_COMPATIBLE False) + +if("${PACKAGE_FIND_VERSION}" VERSION_EQUAL "${PACKAGE_VERSION}") + set(PACKAGE_VERSION_EXACT True) + set(PACKAGE_VERSION_COMPATIBLE True) +endif() + +if("${PACKAGE_FIND_VERSION}" VERSION_LESS "${PACKAGE_VERSION}") + set(PACKAGE_VERSION_COMPATIBLE True) +endif() diff --git a/install/lolito/share/lolito/cmake/lolitoConfig.cmake b/install/lolito/share/lolito/cmake/lolitoConfig.cmake new file mode 100644 index 0000000..54c0bd7 --- /dev/null +++ b/install/lolito/share/lolito/cmake/lolitoConfig.cmake @@ -0,0 +1,42 @@ +# generated from ament/cmake/core/templates/nameConfig.cmake.in + +# prevent multiple inclusion +if(_lolito_CONFIG_INCLUDED) + # ensure to keep the found flag the same + if(NOT DEFINED lolito_FOUND) + # explicitly set it to FALSE, otherwise CMake will set it to TRUE + set(lolito_FOUND FALSE) + elseif(NOT lolito_FOUND) + # use separate condition to avoid uninitialized variable warning + set(lolito_FOUND FALSE) + endif() + return() +endif() +set(_lolito_CONFIG_INCLUDED TRUE) + +# output package information +if(NOT lolito_FIND_QUIETLY) + message(STATUS "Found lolito: 0.0.0 (${lolito_DIR})") +endif() + +# warn when using a deprecated package +if(NOT "" STREQUAL "") + set(_msg "Package 'lolito' is deprecated") + # append custom deprecation text if available + if(NOT "" STREQUAL "TRUE") + set(_msg "${_msg} ()") + endif() + # optionally quiet the deprecation message + if(NOT ${lolito_DEPRECATED_QUIET}) + message(DEPRECATION "${_msg}") + endif() +endif() + +# flag package as ament-based to distinguish it after being find_package()-ed +set(lolito_FOUND_AMENT_PACKAGE TRUE) + +# include all config extra files +set(_extras "") +foreach(_extra ${_extras}) + include("${lolito_DIR}/${_extra}") +endforeach() diff --git a/install/lolito/share/lolito/environment/ament_prefix_path.dsv b/install/lolito/share/lolito/environment/ament_prefix_path.dsv new file mode 100644 index 0000000..79d4c95 --- /dev/null +++ b/install/lolito/share/lolito/environment/ament_prefix_path.dsv @@ -0,0 +1 @@ +prepend-non-duplicate;AMENT_PREFIX_PATH; diff --git a/install/lolito/share/lolito/environment/ament_prefix_path.sh b/install/lolito/share/lolito/environment/ament_prefix_path.sh new file mode 100644 index 0000000..02e441b --- /dev/null +++ b/install/lolito/share/lolito/environment/ament_prefix_path.sh @@ -0,0 +1,4 @@ +# copied from +# ament_cmake_core/cmake/environment_hooks/environment/ament_prefix_path.sh + +ament_prepend_unique_value AMENT_PREFIX_PATH "$AMENT_CURRENT_PREFIX" diff --git a/install/lolito/share/lolito/environment/path.dsv b/install/lolito/share/lolito/environment/path.dsv new file mode 100644 index 0000000..b94426a --- /dev/null +++ b/install/lolito/share/lolito/environment/path.dsv @@ -0,0 +1 @@ +prepend-non-duplicate-if-exists;PATH;bin diff --git a/install/lolito/share/lolito/environment/path.sh b/install/lolito/share/lolito/environment/path.sh new file mode 100644 index 0000000..e59b749 --- /dev/null +++ b/install/lolito/share/lolito/environment/path.sh @@ -0,0 +1,5 @@ +# copied from ament_cmake_core/cmake/environment_hooks/environment/path.sh + +if [ -d "$AMENT_CURRENT_PREFIX/bin" ]; then + ament_prepend_unique_value PATH "$AMENT_CURRENT_PREFIX/bin" +fi diff --git a/install/lolito/share/lolito/environment/pythonpath.dsv b/install/lolito/share/lolito/environment/pythonpath.dsv new file mode 100644 index 0000000..84dbc4c --- /dev/null +++ b/install/lolito/share/lolito/environment/pythonpath.dsv @@ -0,0 +1 @@ +prepend-non-duplicate;PYTHONPATH;lib/python3.8/site-packages diff --git a/install/lolito/share/lolito/environment/pythonpath.sh b/install/lolito/share/lolito/environment/pythonpath.sh new file mode 100644 index 0000000..7fe2b2f --- /dev/null +++ b/install/lolito/share/lolito/environment/pythonpath.sh @@ -0,0 +1,3 @@ +# generated from ament_package/template/environment_hook/pythonpath.sh.in + +ament_prepend_unique_value PYTHONPATH "$AMENT_CURRENT_PREFIX/lib/python3.8/site-packages" diff --git a/install/lolito/share/lolito/hook/cmake_prefix_path.dsv b/install/lolito/share/lolito/hook/cmake_prefix_path.dsv new file mode 100644 index 0000000..e119f32 --- /dev/null +++ b/install/lolito/share/lolito/hook/cmake_prefix_path.dsv @@ -0,0 +1 @@ +prepend-non-duplicate;CMAKE_PREFIX_PATH; diff --git a/install/lolito/share/lolito/hook/cmake_prefix_path.ps1 b/install/lolito/share/lolito/hook/cmake_prefix_path.ps1 new file mode 100644 index 0000000..d03facc --- /dev/null +++ b/install/lolito/share/lolito/hook/cmake_prefix_path.ps1 @@ -0,0 +1,3 @@ +# generated from colcon_powershell/shell/template/hook_prepend_value.ps1.em + +colcon_prepend_unique_value CMAKE_PREFIX_PATH "$env:COLCON_CURRENT_PREFIX" diff --git a/install/lolito/share/lolito/hook/cmake_prefix_path.sh b/install/lolito/share/lolito/hook/cmake_prefix_path.sh new file mode 100644 index 0000000..a948e68 --- /dev/null +++ b/install/lolito/share/lolito/hook/cmake_prefix_path.sh @@ -0,0 +1,3 @@ +# generated from colcon_core/shell/template/hook_prepend_value.sh.em + +_colcon_prepend_unique_value CMAKE_PREFIX_PATH "$COLCON_CURRENT_PREFIX" diff --git a/install/lolito/share/lolito/hook/pythonpath.dsv b/install/lolito/share/lolito/hook/pythonpath.dsv new file mode 100644 index 0000000..84dbc4c --- /dev/null +++ b/install/lolito/share/lolito/hook/pythonpath.dsv @@ -0,0 +1 @@ +prepend-non-duplicate;PYTHONPATH;lib/python3.8/site-packages diff --git a/install/lolito/share/lolito/hook/pythonpath.ps1 b/install/lolito/share/lolito/hook/pythonpath.ps1 new file mode 100644 index 0000000..12877ef --- /dev/null +++ b/install/lolito/share/lolito/hook/pythonpath.ps1 @@ -0,0 +1,3 @@ +# generated from colcon_powershell/shell/template/hook_prepend_value.ps1.em + +colcon_prepend_unique_value PYTHONPATH "$env:COLCON_CURRENT_PREFIX\lib/python3.8/site-packages" diff --git a/install/lolito/share/lolito/hook/pythonpath.sh b/install/lolito/share/lolito/hook/pythonpath.sh new file mode 100644 index 0000000..ed8efd9 --- /dev/null +++ b/install/lolito/share/lolito/hook/pythonpath.sh @@ -0,0 +1,3 @@ +# generated from colcon_core/shell/template/hook_prepend_value.sh.em + +_colcon_prepend_unique_value PYTHONPATH "$COLCON_CURRENT_PREFIX/lib/python3.8/site-packages" diff --git a/install/lolito/share/lolito/local_setup.bash b/install/lolito/share/lolito/local_setup.bash new file mode 100644 index 0000000..49782f2 --- /dev/null +++ b/install/lolito/share/lolito/local_setup.bash @@ -0,0 +1,46 @@ +# generated from ament_package/template/package_level/local_setup.bash.in + +# source local_setup.sh from same directory as this file +_this_path=$(builtin cd "`dirname "${BASH_SOURCE[0]}"`" && pwd) +# provide AMENT_CURRENT_PREFIX to shell script +AMENT_CURRENT_PREFIX=$(builtin cd "`dirname "${BASH_SOURCE[0]}"`/../.." && pwd) +# store AMENT_CURRENT_PREFIX to restore it before each environment hook +_package_local_setup_AMENT_CURRENT_PREFIX=$AMENT_CURRENT_PREFIX + +# trace output +if [ -n "$AMENT_TRACE_SETUP_FILES" ]; then + echo "# . \"$_this_path/local_setup.sh\"" +fi +. "$_this_path/local_setup.sh" +unset _this_path + +# unset AMENT_ENVIRONMENT_HOOKS +# if not appending to them for return +if [ -z "$AMENT_RETURN_ENVIRONMENT_HOOKS" ]; then + unset AMENT_ENVIRONMENT_HOOKS +fi + +# restore AMENT_CURRENT_PREFIX before evaluating the environment hooks +AMENT_CURRENT_PREFIX=$_package_local_setup_AMENT_CURRENT_PREFIX +# list all environment hooks of this package + +# source all shell-specific environment hooks of this package +# if not returning them +if [ -z "$AMENT_RETURN_ENVIRONMENT_HOOKS" ]; then + _package_local_setup_IFS=$IFS + IFS=":" + for _hook in $AMENT_ENVIRONMENT_HOOKS; do + # restore AMENT_CURRENT_PREFIX for each environment hook + AMENT_CURRENT_PREFIX=$_package_local_setup_AMENT_CURRENT_PREFIX + # restore IFS before sourcing other files + IFS=$_package_local_setup_IFS + . "$_hook" + done + unset _hook + IFS=$_package_local_setup_IFS + unset _package_local_setup_IFS + unset AMENT_ENVIRONMENT_HOOKS +fi + +unset _package_local_setup_AMENT_CURRENT_PREFIX +unset AMENT_CURRENT_PREFIX diff --git a/install/lolito/share/lolito/local_setup.dsv b/install/lolito/share/lolito/local_setup.dsv new file mode 100644 index 0000000..fae34cf --- /dev/null +++ b/install/lolito/share/lolito/local_setup.dsv @@ -0,0 +1,3 @@ +source;share/lolito/environment/ament_prefix_path.sh +source;share/lolito/environment/path.sh +source;share/lolito/environment/pythonpath.sh diff --git a/install/lolito/share/lolito/local_setup.sh b/install/lolito/share/lolito/local_setup.sh new file mode 100644 index 0000000..8de50c0 --- /dev/null +++ b/install/lolito/share/lolito/local_setup.sh @@ -0,0 +1,134 @@ +# generated from ament_package/template/package_level/local_setup.sh.in + +# since this file is sourced use either the provided AMENT_CURRENT_PREFIX +# or fall back to the destination set at configure time +: ${AMENT_CURRENT_PREFIX:="/home/jackson/chamito/src/install/lolito"} +if [ ! -d "$AMENT_CURRENT_PREFIX" ]; then + if [ -z "$COLCON_CURRENT_PREFIX" ]; then + echo "The compile time prefix path '$AMENT_CURRENT_PREFIX' doesn't " \ + "exist. Consider sourcing a different extension than '.sh'." 1>&2 + else + AMENT_CURRENT_PREFIX="$COLCON_CURRENT_PREFIX" + fi +fi + +# function to append values to environment variables +# using colons as separators and avoiding leading separators +ament_append_value() { + # arguments + _listname="$1" + _value="$2" + #echo "listname $_listname" + #eval echo "list value \$$_listname" + #echo "value $_value" + + # avoid leading separator + eval _values=\"\$$_listname\" + if [ -z "$_values" ]; then + eval export $_listname=\"$_value\" + #eval echo "set list \$$_listname" + else + # field separator must not be a colon + _ament_append_value_IFS=$IFS + unset IFS + eval export $_listname=\"\$$_listname:$_value\" + #eval echo "append list \$$_listname" + IFS=$_ament_append_value_IFS + unset _ament_append_value_IFS + fi + unset _values + + unset _value + unset _listname +} + +# function to prepend non-duplicate values to environment variables +# using colons as separators and avoiding trailing separators +ament_prepend_unique_value() { + # arguments + _listname="$1" + _value="$2" + #echo "listname $_listname" + #eval echo "list value \$$_listname" + #echo "value $_value" + + # check if the list contains the value + eval _values=\"\$$_listname\" + _duplicate= + _ament_prepend_unique_value_IFS=$IFS + IFS=":" + if [ "$AMENT_SHELL" = "zsh" ]; then + ament_zsh_to_array _values + fi + for _item in $_values; do + # ignore empty strings + if [ -z "$_item" ]; then + continue + fi + if [ "$_item" = "$_value" ]; then + _duplicate=1 + fi + done + unset _item + + # prepend only non-duplicates + if [ -z "$_duplicate" ]; then + # avoid trailing separator + if [ -z "$_values" ]; then + eval export $_listname=\"$_value\" + #eval echo "set list \$$_listname" + else + # field separator must not be a colon + unset IFS + eval export $_listname=\"$_value:\$$_listname\" + #eval echo "prepend list \$$_listname" + fi + fi + IFS=$_ament_prepend_unique_value_IFS + unset _ament_prepend_unique_value_IFS + unset _duplicate + unset _values + + unset _value + unset _listname +} + +# unset AMENT_ENVIRONMENT_HOOKS +# if not appending to them for return +if [ -z "$AMENT_RETURN_ENVIRONMENT_HOOKS" ]; then + unset AMENT_ENVIRONMENT_HOOKS +fi + +# list all environment hooks of this package +ament_append_value AMENT_ENVIRONMENT_HOOKS "$AMENT_CURRENT_PREFIX/share/lolito/environment/ament_prefix_path.sh" +ament_append_value AMENT_ENVIRONMENT_HOOKS "$AMENT_CURRENT_PREFIX/share/lolito/environment/path.sh" +ament_append_value AMENT_ENVIRONMENT_HOOKS "$AMENT_CURRENT_PREFIX/share/lolito/environment/pythonpath.sh" + +# source all shell-specific environment hooks of this package +# if not returning them +if [ -z "$AMENT_RETURN_ENVIRONMENT_HOOKS" ]; then + _package_local_setup_IFS=$IFS + IFS=":" + if [ "$AMENT_SHELL" = "zsh" ]; then + ament_zsh_to_array AMENT_ENVIRONMENT_HOOKS + fi + for _hook in $AMENT_ENVIRONMENT_HOOKS; do + if [ -f "$_hook" ]; then + # restore IFS before sourcing other files + IFS=$_package_local_setup_IFS + # trace output + if [ -n "$AMENT_TRACE_SETUP_FILES" ]; then + echo "# . \"$_hook\"" + fi + . "$_hook" + fi + done + unset _hook + IFS=$_package_local_setup_IFS + unset _package_local_setup_IFS + unset AMENT_ENVIRONMENT_HOOKS +fi + +# reset AMENT_CURRENT_PREFIX after each package +# allowing to source multiple package-level setup files +unset AMENT_CURRENT_PREFIX diff --git a/install/lolito/share/lolito/local_setup.zsh b/install/lolito/share/lolito/local_setup.zsh new file mode 100644 index 0000000..fe161be --- /dev/null +++ b/install/lolito/share/lolito/local_setup.zsh @@ -0,0 +1,59 @@ +# generated from ament_package/template/package_level/local_setup.zsh.in + +AMENT_SHELL=zsh + +# source local_setup.sh from same directory as this file +_this_path=$(builtin cd -q "`dirname "${(%):-%N}"`" > /dev/null && pwd) +# provide AMENT_CURRENT_PREFIX to shell script +AMENT_CURRENT_PREFIX=$(builtin cd -q "`dirname "${(%):-%N}"`/../.." > /dev/null && pwd) +# store AMENT_CURRENT_PREFIX to restore it before each environment hook +_package_local_setup_AMENT_CURRENT_PREFIX=$AMENT_CURRENT_PREFIX + +# function to convert array-like strings into arrays +# to wordaround SH_WORD_SPLIT not being set +ament_zsh_to_array() { + local _listname=$1 + local _dollar="$" + local _split="{=" + local _to_array="(\"$_dollar$_split$_listname}\")" + eval $_listname=$_to_array +} + +# trace output +if [ -n "$AMENT_TRACE_SETUP_FILES" ]; then + echo "# . \"$_this_path/local_setup.sh\"" +fi +# the package-level local_setup file unsets AMENT_CURRENT_PREFIX +. "$_this_path/local_setup.sh" +unset _this_path + +# unset AMENT_ENVIRONMENT_HOOKS +# if not appending to them for return +if [ -z "$AMENT_RETURN_ENVIRONMENT_HOOKS" ]; then + unset AMENT_ENVIRONMENT_HOOKS +fi + +# restore AMENT_CURRENT_PREFIX before evaluating the environment hooks +AMENT_CURRENT_PREFIX=$_package_local_setup_AMENT_CURRENT_PREFIX +# list all environment hooks of this package + +# source all shell-specific environment hooks of this package +# if not returning them +if [ -z "$AMENT_RETURN_ENVIRONMENT_HOOKS" ]; then + _package_local_setup_IFS=$IFS + IFS=":" + for _hook in $AMENT_ENVIRONMENT_HOOKS; do + # restore AMENT_CURRENT_PREFIX for each environment hook + AMENT_CURRENT_PREFIX=$_package_local_setup_AMENT_CURRENT_PREFIX + # restore IFS before sourcing other files + IFS=$_package_local_setup_IFS + . "$_hook" + done + unset _hook + IFS=$_package_local_setup_IFS + unset _package_local_setup_IFS + unset AMENT_ENVIRONMENT_HOOKS +fi + +unset _package_local_setup_AMENT_CURRENT_PREFIX +unset AMENT_CURRENT_PREFIX diff --git a/install/lolito/share/lolito/package.bash b/install/lolito/share/lolito/package.bash new file mode 100644 index 0000000..bba3f4c --- /dev/null +++ b/install/lolito/share/lolito/package.bash @@ -0,0 +1,39 @@ +# generated from colcon_bash/shell/template/package.bash.em + +# This script extends the environment for this package. + +# a bash script is able to determine its own path if necessary +if [ -z "$COLCON_CURRENT_PREFIX" ]; then + # the prefix is two levels up from the package specific share directory + _colcon_package_bash_COLCON_CURRENT_PREFIX="$(builtin cd "`dirname "${BASH_SOURCE[0]}"`/../.." > /dev/null && pwd)" +else + _colcon_package_bash_COLCON_CURRENT_PREFIX="$COLCON_CURRENT_PREFIX" +fi + +# function to source another script with conditional trace output +# first argument: the path of the script +# additional arguments: arguments to the script +_colcon_package_bash_source_script() { + if [ -f "$1" ]; then + if [ -n "$COLCON_TRACE" ]; then + echo ". \"$1\"" + fi + . "$@" + else + echo "not found: \"$1\"" 1>&2 + fi +} + +# source sh script of this package +_colcon_package_bash_source_script "$_colcon_package_bash_COLCON_CURRENT_PREFIX/share/lolito/package.sh" + +# setting COLCON_CURRENT_PREFIX avoids determining the prefix in the sourced scripts +COLCON_CURRENT_PREFIX="$_colcon_package_bash_COLCON_CURRENT_PREFIX" + +# source bash hooks +_colcon_package_bash_source_script "$COLCON_CURRENT_PREFIX/share/lolito/local_setup.bash" + +unset COLCON_CURRENT_PREFIX + +unset _colcon_package_bash_source_script +unset _colcon_package_bash_COLCON_CURRENT_PREFIX diff --git a/install/lolito/share/lolito/package.dsv b/install/lolito/share/lolito/package.dsv new file mode 100644 index 0000000..14589bf --- /dev/null +++ b/install/lolito/share/lolito/package.dsv @@ -0,0 +1,11 @@ +source;share/lolito/hook/cmake_prefix_path.ps1 +source;share/lolito/hook/cmake_prefix_path.dsv +source;share/lolito/hook/cmake_prefix_path.sh +source;share/lolito/hook/pythonpath.ps1 +source;share/lolito/hook/pythonpath.dsv +source;share/lolito/hook/pythonpath.sh +source;share/lolito/local_setup.bash +source;share/lolito/local_setup.dsv +source;share/lolito/local_setup.ps1 +source;share/lolito/local_setup.sh +source;share/lolito/local_setup.zsh diff --git a/install/lolito/share/lolito/package.ps1 b/install/lolito/share/lolito/package.ps1 new file mode 100644 index 0000000..a3a646c --- /dev/null +++ b/install/lolito/share/lolito/package.ps1 @@ -0,0 +1,117 @@ +# generated from colcon_powershell/shell/template/package.ps1.em + +# function to append a value to a variable +# which uses colons as separators +# duplicates as well as leading separators are avoided +# first argument: the name of the result variable +# second argument: the value to be prepended +function colcon_append_unique_value { + param ( + $_listname, + $_value + ) + + # get values from variable + if (Test-Path Env:$_listname) { + $_values=(Get-Item env:$_listname).Value + } else { + $_values="" + } + $_duplicate="" + # start with no values + $_all_values="" + # iterate over existing values in the variable + if ($_values) { + $_values.Split(";") | ForEach { + # not an empty string + if ($_) { + # not a duplicate of _value + if ($_ -eq $_value) { + $_duplicate="1" + } + if ($_all_values) { + $_all_values="${_all_values};$_" + } else { + $_all_values="$_" + } + } + } + } + # append only non-duplicates + if (!$_duplicate) { + # avoid leading separator + if ($_all_values) { + $_all_values="${_all_values};${_value}" + } else { + $_all_values="${_value}" + } + } + + # export the updated variable + Set-Item env:\$_listname -Value "$_all_values" +} + +# function to prepend a value to a variable +# which uses colons as separators +# duplicates as well as trailing separators are avoided +# first argument: the name of the result variable +# second argument: the value to be prepended +function colcon_prepend_unique_value { + param ( + $_listname, + $_value + ) + + # get values from variable + if (Test-Path Env:$_listname) { + $_values=(Get-Item env:$_listname).Value + } else { + $_values="" + } + # start with the new value + $_all_values="$_value" + # iterate over existing values in the variable + if ($_values) { + $_values.Split(";") | ForEach { + # not an empty string + if ($_) { + # not a duplicate of _value + if ($_ -ne $_value) { + # keep non-duplicate values + $_all_values="${_all_values};$_" + } + } + } + } + # export the updated variable + Set-Item env:\$_listname -Value "$_all_values" +} + +# function to source another script with conditional trace output +# first argument: the path of the script +# additional arguments: arguments to the script +function colcon_package_source_powershell_script { + param ( + $_colcon_package_source_powershell_script + ) + # source script with conditional trace output + if (Test-Path $_colcon_package_source_powershell_script) { + if ($env:COLCON_TRACE) { + echo ". '$_colcon_package_source_powershell_script'" + } + . "$_colcon_package_source_powershell_script" + } else { + Write-Error "not found: '$_colcon_package_source_powershell_script'" + } +} + + +# a powershell script is able to determine its own path +# the prefix is two levels up from the package specific share directory +$env:COLCON_CURRENT_PREFIX=(Get-Item $PSCommandPath).Directory.Parent.Parent.FullName + +colcon_package_source_powershell_script "$env:COLCON_CURRENT_PREFIX\share/lolito/hook/cmake_prefix_path.ps1" +colcon_package_source_powershell_script "$env:COLCON_CURRENT_PREFIX\share/lolito/hook/pythonpath.ps1" +colcon_package_source_powershell_script "$env:COLCON_CURRENT_PREFIX\share/lolito/local_setup.ps1" + +Remove-Item Env:\COLCON_CURRENT_PREFIX diff --git a/install/lolito/share/lolito/package.sh b/install/lolito/share/lolito/package.sh new file mode 100644 index 0000000..bf82d22 --- /dev/null +++ b/install/lolito/share/lolito/package.sh @@ -0,0 +1,88 @@ +# generated from colcon_core/shell/template/package.sh.em + +# This script extends the environment for this package. + +# function to prepend a value to a variable +# which uses colons as separators +# duplicates as well as trailing separators are avoided +# first argument: the name of the result variable +# second argument: the value to be prepended +_colcon_prepend_unique_value() { + # arguments + _listname="$1" + _value="$2" + + # get values from variable + eval _values=\"\$$_listname\" + # backup the field separator + _colcon_prepend_unique_value_IFS=$IFS + IFS=":" + # start with the new value + _all_values="$_value" + # workaround SH_WORD_SPLIT not being set in zsh + if [ "$(command -v colcon_zsh_convert_to_array)" ]; then + colcon_zsh_convert_to_array _values + fi + # iterate over existing values in the variable + for _item in $_values; do + # ignore empty strings + if [ -z "$_item" ]; then + continue + fi + # ignore duplicates of _value + if [ "$_item" = "$_value" ]; then + continue + fi + # keep non-duplicate values + _all_values="$_all_values:$_item" + done + unset _item + # restore the field separator + IFS=$_colcon_prepend_unique_value_IFS + unset _colcon_prepend_unique_value_IFS + # export the updated variable + eval export $_listname=\"$_all_values\" + unset _all_values + unset _values + + unset _value + unset _listname +} + +# since a plain shell script can't determine its own path when being sourced +# either use the provided COLCON_CURRENT_PREFIX +# or fall back to the build time prefix (if it exists) +_colcon_package_sh_COLCON_CURRENT_PREFIX="/home/jackson/chamito/src/install/lolito" +if [ -z "$COLCON_CURRENT_PREFIX" ]; then + if [ ! -d "$_colcon_package_sh_COLCON_CURRENT_PREFIX" ]; then + echo "The build time path \"$_colcon_package_sh_COLCON_CURRENT_PREFIX\" doesn't exist. Either source a script for a different shell or set the environment variable \"COLCON_CURRENT_PREFIX\" explicitly." 1>&2 + unset _colcon_package_sh_COLCON_CURRENT_PREFIX + return 1 + fi + COLCON_CURRENT_PREFIX="$_colcon_package_sh_COLCON_CURRENT_PREFIX" +fi +unset _colcon_package_sh_COLCON_CURRENT_PREFIX + +# function to source another script with conditional trace output +# first argument: the path of the script +# additional arguments: arguments to the script +_colcon_package_sh_source_script() { + if [ -f "$1" ]; then + if [ -n "$COLCON_TRACE" ]; then + echo "# . \"$1\"" + fi + . "$@" + else + echo "not found: \"$1\"" 1>&2 + fi +} + +# source sh hooks +_colcon_package_sh_source_script "$COLCON_CURRENT_PREFIX/share/lolito/hook/cmake_prefix_path.sh" +_colcon_package_sh_source_script "$COLCON_CURRENT_PREFIX/share/lolito/hook/pythonpath.sh" +_colcon_package_sh_source_script "$COLCON_CURRENT_PREFIX/share/lolito/local_setup.sh" + +unset _colcon_package_sh_source_script +unset COLCON_CURRENT_PREFIX + +# do not unset _colcon_prepend_unique_value since it might be used by non-primary shell hooks diff --git a/install/lolito/share/lolito/package.xml b/install/lolito/share/lolito/package.xml new file mode 100644 index 0000000..4c6480f --- /dev/null +++ b/install/lolito/share/lolito/package.xml @@ -0,0 +1,21 @@ + + + + lolito + 0.0.0 + TODO: Package description + roncanciovl + TODO: License declaration + + ament_cmake + ament_cmake_python + rclpy + std_msgs + + ament_lint_auto + ament_lint_common + + + ament_cmake + + diff --git a/install/lolito/share/lolito/package.zsh b/install/lolito/share/lolito/package.zsh new file mode 100644 index 0000000..c28b8a1 --- /dev/null +++ b/install/lolito/share/lolito/package.zsh @@ -0,0 +1,50 @@ +# generated from colcon_zsh/shell/template/package.zsh.em + +# This script extends the environment for this package. + +# a zsh script is able to determine its own path if necessary +if [ -z "$COLCON_CURRENT_PREFIX" ]; then + # the prefix is two levels up from the package specific share directory + _colcon_package_zsh_COLCON_CURRENT_PREFIX="$(builtin cd -q "`dirname "${(%):-%N}"`/../.." > /dev/null && pwd)" +else + _colcon_package_zsh_COLCON_CURRENT_PREFIX="$COLCON_CURRENT_PREFIX" +fi + +# function to source another script with conditional trace output +# first argument: the path of the script +# additional arguments: arguments to the script +_colcon_package_zsh_source_script() { + if [ -f "$1" ]; then + if [ -n "$COLCON_TRACE" ]; then + echo ". \"$1\"" + fi + . "$@" + else + echo "not found: \"$1\"" 1>&2 + fi +} + +# function to convert array-like strings into arrays +# to workaround SH_WORD_SPLIT not being set +colcon_zsh_convert_to_array() { + local _listname=$1 + local _dollar="$" + local _split="{=" + local _to_array="(\"$_dollar$_split$_listname}\")" + eval $_listname=$_to_array +} + +# source sh script of this package +_colcon_package_zsh_source_script "$_colcon_package_zsh_COLCON_CURRENT_PREFIX/share/lolito/package.sh" +unset convert_zsh_to_array + +# setting COLCON_CURRENT_PREFIX avoids determining the prefix in the sourced scripts +COLCON_CURRENT_PREFIX="$_colcon_package_zsh_COLCON_CURRENT_PREFIX" + +# source zsh hooks +_colcon_package_zsh_source_script "$COLCON_CURRENT_PREFIX/share/lolito/local_setup.zsh" + +unset COLCON_CURRENT_PREFIX + +unset _colcon_package_zsh_source_script +unset _colcon_package_zsh_COLCON_CURRENT_PREFIX diff --git a/install/my_package/share/ament_index/resource_index/packages/my_package b/install/my_package/share/ament_index/resource_index/packages/my_package new file mode 100644 index 0000000..e69de29 diff --git a/install/my_package/share/colcon-core/packages/my_package b/install/my_package/share/colcon-core/packages/my_package new file mode 100644 index 0000000..e69de29 diff --git a/install/my_package/share/my_package/hook/ament_prefix_path.dsv b/install/my_package/share/my_package/hook/ament_prefix_path.dsv new file mode 100644 index 0000000..79d4c95 --- /dev/null +++ b/install/my_package/share/my_package/hook/ament_prefix_path.dsv @@ -0,0 +1 @@ +prepend-non-duplicate;AMENT_PREFIX_PATH; diff --git a/install/my_package/share/my_package/hook/ament_prefix_path.ps1 b/install/my_package/share/my_package/hook/ament_prefix_path.ps1 new file mode 100644 index 0000000..26b9997 --- /dev/null +++ b/install/my_package/share/my_package/hook/ament_prefix_path.ps1 @@ -0,0 +1,3 @@ +# generated from colcon_powershell/shell/template/hook_prepend_value.ps1.em + +colcon_prepend_unique_value AMENT_PREFIX_PATH "$env:COLCON_CURRENT_PREFIX" diff --git a/install/my_package/share/my_package/hook/ament_prefix_path.sh b/install/my_package/share/my_package/hook/ament_prefix_path.sh new file mode 100644 index 0000000..f3041f6 --- /dev/null +++ b/install/my_package/share/my_package/hook/ament_prefix_path.sh @@ -0,0 +1,3 @@ +# generated from colcon_core/shell/template/hook_prepend_value.sh.em + +_colcon_prepend_unique_value AMENT_PREFIX_PATH "$COLCON_CURRENT_PREFIX" diff --git a/install/my_package/share/my_package/hook/pythonpath.dsv b/install/my_package/share/my_package/hook/pythonpath.dsv new file mode 100644 index 0000000..84dbc4c --- /dev/null +++ b/install/my_package/share/my_package/hook/pythonpath.dsv @@ -0,0 +1 @@ +prepend-non-duplicate;PYTHONPATH;lib/python3.8/site-packages diff --git a/install/my_package/share/my_package/hook/pythonpath.ps1 b/install/my_package/share/my_package/hook/pythonpath.ps1 new file mode 100644 index 0000000..12877ef --- /dev/null +++ b/install/my_package/share/my_package/hook/pythonpath.ps1 @@ -0,0 +1,3 @@ +# generated from colcon_powershell/shell/template/hook_prepend_value.ps1.em + +colcon_prepend_unique_value PYTHONPATH "$env:COLCON_CURRENT_PREFIX\lib/python3.8/site-packages" diff --git a/install/my_package/share/my_package/hook/pythonpath.sh b/install/my_package/share/my_package/hook/pythonpath.sh new file mode 100644 index 0000000..ed8efd9 --- /dev/null +++ b/install/my_package/share/my_package/hook/pythonpath.sh @@ -0,0 +1,3 @@ +# generated from colcon_core/shell/template/hook_prepend_value.sh.em + +_colcon_prepend_unique_value PYTHONPATH "$COLCON_CURRENT_PREFIX/lib/python3.8/site-packages" diff --git a/install/my_package/share/my_package/package.bash b/install/my_package/share/my_package/package.bash new file mode 100644 index 0000000..c9caece --- /dev/null +++ b/install/my_package/share/my_package/package.bash @@ -0,0 +1,31 @@ +# generated from colcon_bash/shell/template/package.bash.em + +# This script extends the environment for this package. + +# a bash script is able to determine its own path if necessary +if [ -z "$COLCON_CURRENT_PREFIX" ]; then + # the prefix is two levels up from the package specific share directory + _colcon_package_bash_COLCON_CURRENT_PREFIX="$(builtin cd "`dirname "${BASH_SOURCE[0]}"`/../.." > /dev/null && pwd)" +else + _colcon_package_bash_COLCON_CURRENT_PREFIX="$COLCON_CURRENT_PREFIX" +fi + +# function to source another script with conditional trace output +# first argument: the path of the script +# additional arguments: arguments to the script +_colcon_package_bash_source_script() { + if [ -f "$1" ]; then + if [ -n "$COLCON_TRACE" ]; then + echo ". \"$1\"" + fi + . "$@" + else + echo "not found: \"$1\"" 1>&2 + fi +} + +# source sh script of this package +_colcon_package_bash_source_script "$_colcon_package_bash_COLCON_CURRENT_PREFIX/share/my_package/package.sh" + +unset _colcon_package_bash_source_script +unset _colcon_package_bash_COLCON_CURRENT_PREFIX diff --git a/install/my_package/share/my_package/package.dsv b/install/my_package/share/my_package/package.dsv new file mode 100644 index 0000000..83a6199 --- /dev/null +++ b/install/my_package/share/my_package/package.dsv @@ -0,0 +1,6 @@ +source;share/my_package/hook/pythonpath.ps1 +source;share/my_package/hook/pythonpath.dsv +source;share/my_package/hook/pythonpath.sh +source;share/my_package/hook/ament_prefix_path.ps1 +source;share/my_package/hook/ament_prefix_path.dsv +source;share/my_package/hook/ament_prefix_path.sh diff --git a/install/my_package/share/my_package/package.ps1 b/install/my_package/share/my_package/package.ps1 new file mode 100644 index 0000000..d54be3c --- /dev/null +++ b/install/my_package/share/my_package/package.ps1 @@ -0,0 +1,116 @@ +# generated from colcon_powershell/shell/template/package.ps1.em + +# function to append a value to a variable +# which uses colons as separators +# duplicates as well as leading separators are avoided +# first argument: the name of the result variable +# second argument: the value to be prepended +function colcon_append_unique_value { + param ( + $_listname, + $_value + ) + + # get values from variable + if (Test-Path Env:$_listname) { + $_values=(Get-Item env:$_listname).Value + } else { + $_values="" + } + $_duplicate="" + # start with no values + $_all_values="" + # iterate over existing values in the variable + if ($_values) { + $_values.Split(";") | ForEach { + # not an empty string + if ($_) { + # not a duplicate of _value + if ($_ -eq $_value) { + $_duplicate="1" + } + if ($_all_values) { + $_all_values="${_all_values};$_" + } else { + $_all_values="$_" + } + } + } + } + # append only non-duplicates + if (!$_duplicate) { + # avoid leading separator + if ($_all_values) { + $_all_values="${_all_values};${_value}" + } else { + $_all_values="${_value}" + } + } + + # export the updated variable + Set-Item env:\$_listname -Value "$_all_values" +} + +# function to prepend a value to a variable +# which uses colons as separators +# duplicates as well as trailing separators are avoided +# first argument: the name of the result variable +# second argument: the value to be prepended +function colcon_prepend_unique_value { + param ( + $_listname, + $_value + ) + + # get values from variable + if (Test-Path Env:$_listname) { + $_values=(Get-Item env:$_listname).Value + } else { + $_values="" + } + # start with the new value + $_all_values="$_value" + # iterate over existing values in the variable + if ($_values) { + $_values.Split(";") | ForEach { + # not an empty string + if ($_) { + # not a duplicate of _value + if ($_ -ne $_value) { + # keep non-duplicate values + $_all_values="${_all_values};$_" + } + } + } + } + # export the updated variable + Set-Item env:\$_listname -Value "$_all_values" +} + +# function to source another script with conditional trace output +# first argument: the path of the script +# additional arguments: arguments to the script +function colcon_package_source_powershell_script { + param ( + $_colcon_package_source_powershell_script + ) + # source script with conditional trace output + if (Test-Path $_colcon_package_source_powershell_script) { + if ($env:COLCON_TRACE) { + echo ". '$_colcon_package_source_powershell_script'" + } + . "$_colcon_package_source_powershell_script" + } else { + Write-Error "not found: '$_colcon_package_source_powershell_script'" + } +} + + +# a powershell script is able to determine its own path +# the prefix is two levels up from the package specific share directory +$env:COLCON_CURRENT_PREFIX=(Get-Item $PSCommandPath).Directory.Parent.Parent.FullName + +colcon_package_source_powershell_script "$env:COLCON_CURRENT_PREFIX\share/my_package/hook/pythonpath.ps1" +colcon_package_source_powershell_script "$env:COLCON_CURRENT_PREFIX\share/my_package/hook/ament_prefix_path.ps1" + +Remove-Item Env:\COLCON_CURRENT_PREFIX diff --git a/install/my_package/share/my_package/package.sh b/install/my_package/share/my_package/package.sh new file mode 100644 index 0000000..3683e5b --- /dev/null +++ b/install/my_package/share/my_package/package.sh @@ -0,0 +1,87 @@ +# generated from colcon_core/shell/template/package.sh.em + +# This script extends the environment for this package. + +# function to prepend a value to a variable +# which uses colons as separators +# duplicates as well as trailing separators are avoided +# first argument: the name of the result variable +# second argument: the value to be prepended +_colcon_prepend_unique_value() { + # arguments + _listname="$1" + _value="$2" + + # get values from variable + eval _values=\"\$$_listname\" + # backup the field separator + _colcon_prepend_unique_value_IFS=$IFS + IFS=":" + # start with the new value + _all_values="$_value" + # workaround SH_WORD_SPLIT not being set in zsh + if [ "$(command -v colcon_zsh_convert_to_array)" ]; then + colcon_zsh_convert_to_array _values + fi + # iterate over existing values in the variable + for _item in $_values; do + # ignore empty strings + if [ -z "$_item" ]; then + continue + fi + # ignore duplicates of _value + if [ "$_item" = "$_value" ]; then + continue + fi + # keep non-duplicate values + _all_values="$_all_values:$_item" + done + unset _item + # restore the field separator + IFS=$_colcon_prepend_unique_value_IFS + unset _colcon_prepend_unique_value_IFS + # export the updated variable + eval export $_listname=\"$_all_values\" + unset _all_values + unset _values + + unset _value + unset _listname +} + +# since a plain shell script can't determine its own path when being sourced +# either use the provided COLCON_CURRENT_PREFIX +# or fall back to the build time prefix (if it exists) +_colcon_package_sh_COLCON_CURRENT_PREFIX="/home/jackson/chamito/src/install/my_package" +if [ -z "$COLCON_CURRENT_PREFIX" ]; then + if [ ! -d "$_colcon_package_sh_COLCON_CURRENT_PREFIX" ]; then + echo "The build time path \"$_colcon_package_sh_COLCON_CURRENT_PREFIX\" doesn't exist. Either source a script for a different shell or set the environment variable \"COLCON_CURRENT_PREFIX\" explicitly." 1>&2 + unset _colcon_package_sh_COLCON_CURRENT_PREFIX + return 1 + fi + COLCON_CURRENT_PREFIX="$_colcon_package_sh_COLCON_CURRENT_PREFIX" +fi +unset _colcon_package_sh_COLCON_CURRENT_PREFIX + +# function to source another script with conditional trace output +# first argument: the path of the script +# additional arguments: arguments to the script +_colcon_package_sh_source_script() { + if [ -f "$1" ]; then + if [ -n "$COLCON_TRACE" ]; then + echo "# . \"$1\"" + fi + . "$@" + else + echo "not found: \"$1\"" 1>&2 + fi +} + +# source sh hooks +_colcon_package_sh_source_script "$COLCON_CURRENT_PREFIX/share/my_package/hook/pythonpath.sh" +_colcon_package_sh_source_script "$COLCON_CURRENT_PREFIX/share/my_package/hook/ament_prefix_path.sh" + +unset _colcon_package_sh_source_script +unset COLCON_CURRENT_PREFIX + +# do not unset _colcon_prepend_unique_value since it might be used by non-primary shell hooks diff --git a/install/my_package/share/my_package/package.xml b/install/my_package/share/my_package/package.xml new file mode 100644 index 0000000..78be50c --- /dev/null +++ b/install/my_package/share/my_package/package.xml @@ -0,0 +1,18 @@ + + + + my_package + 0.0.0 + TODO: Package description + jackson + TODO: License declaration + + ament_copyright + ament_flake8 + ament_pep257 + python3-pytest + + + ament_python + + diff --git a/install/my_package/share/my_package/package.zsh b/install/my_package/share/my_package/package.zsh new file mode 100644 index 0000000..42d562c --- /dev/null +++ b/install/my_package/share/my_package/package.zsh @@ -0,0 +1,42 @@ +# generated from colcon_zsh/shell/template/package.zsh.em + +# This script extends the environment for this package. + +# a zsh script is able to determine its own path if necessary +if [ -z "$COLCON_CURRENT_PREFIX" ]; then + # the prefix is two levels up from the package specific share directory + _colcon_package_zsh_COLCON_CURRENT_PREFIX="$(builtin cd -q "`dirname "${(%):-%N}"`/../.." > /dev/null && pwd)" +else + _colcon_package_zsh_COLCON_CURRENT_PREFIX="$COLCON_CURRENT_PREFIX" +fi + +# function to source another script with conditional trace output +# first argument: the path of the script +# additional arguments: arguments to the script +_colcon_package_zsh_source_script() { + if [ -f "$1" ]; then + if [ -n "$COLCON_TRACE" ]; then + echo ". \"$1\"" + fi + . "$@" + else + echo "not found: \"$1\"" 1>&2 + fi +} + +# function to convert array-like strings into arrays +# to workaround SH_WORD_SPLIT not being set +colcon_zsh_convert_to_array() { + local _listname=$1 + local _dollar="$" + local _split="{=" + local _to_array="(\"$_dollar$_split$_listname}\")" + eval $_listname=$_to_array +} + +# source sh script of this package +_colcon_package_zsh_source_script "$_colcon_package_zsh_COLCON_CURRENT_PREFIX/share/my_package/package.sh" +unset convert_zsh_to_array + +unset _colcon_package_zsh_source_script +unset _colcon_package_zsh_COLCON_CURRENT_PREFIX diff --git a/install/setup.bash b/install/setup.bash new file mode 100644 index 0000000..b19cab0 --- /dev/null +++ b/install/setup.bash @@ -0,0 +1,31 @@ +# generated from colcon_bash/shell/template/prefix_chain.bash.em + +# This script extends the environment with the environment of other prefix +# paths which were sourced when this file was generated as well as all packages +# contained in this prefix path. + +# function to source another script with conditional trace output +# first argument: the path of the script +_colcon_prefix_chain_bash_source_script() { + if [ -f "$1" ]; then + if [ -n "$COLCON_TRACE" ]; then + echo ". \"$1\"" + fi + . "$1" + else + echo "not found: \"$1\"" 1>&2 + fi +} + +# source chained prefixes +# setting COLCON_CURRENT_PREFIX avoids determining the prefix in the sourced script +COLCON_CURRENT_PREFIX="/opt/ros/foxy" +_colcon_prefix_chain_bash_source_script "$COLCON_CURRENT_PREFIX/local_setup.bash" + +# source this prefix +# setting COLCON_CURRENT_PREFIX avoids determining the prefix in the sourced script +COLCON_CURRENT_PREFIX="$(builtin cd "`dirname "${BASH_SOURCE[0]}"`" > /dev/null && pwd)" +_colcon_prefix_chain_bash_source_script "$COLCON_CURRENT_PREFIX/local_setup.bash" + +unset COLCON_CURRENT_PREFIX +unset _colcon_prefix_chain_bash_source_script diff --git a/install/setup.ps1 b/install/setup.ps1 new file mode 100644 index 0000000..412726f --- /dev/null +++ b/install/setup.ps1 @@ -0,0 +1,29 @@ +# generated from colcon_powershell/shell/template/prefix_chain.ps1.em + +# This script extends the environment with the environment of other prefix +# paths which were sourced when this file was generated as well as all packages +# contained in this prefix path. + +# function to source another script with conditional trace output +# first argument: the path of the script +function _colcon_prefix_chain_powershell_source_script { + param ( + $_colcon_prefix_chain_powershell_source_script_param + ) + # source script with conditional trace output + if (Test-Path $_colcon_prefix_chain_powershell_source_script_param) { + if ($env:COLCON_TRACE) { + echo ". '$_colcon_prefix_chain_powershell_source_script_param'" + } + . "$_colcon_prefix_chain_powershell_source_script_param" + } else { + Write-Error "not found: '$_colcon_prefix_chain_powershell_source_script_param'" + } +} + +# source chained prefixes +_colcon_prefix_chain_powershell_source_script "/opt/ros/foxy\local_setup.ps1" + +# source this prefix +$env:COLCON_CURRENT_PREFIX=(Split-Path $PSCommandPath -Parent) +_colcon_prefix_chain_powershell_source_script "$env:COLCON_CURRENT_PREFIX\local_setup.ps1" diff --git a/install/setup.sh b/install/setup.sh new file mode 100644 index 0000000..471f31c --- /dev/null +++ b/install/setup.sh @@ -0,0 +1,45 @@ +# generated from colcon_core/shell/template/prefix_chain.sh.em + +# This script extends the environment with the environment of other prefix +# paths which were sourced when this file was generated as well as all packages +# contained in this prefix path. + +# since a plain shell script can't determine its own path when being sourced +# either use the provided COLCON_CURRENT_PREFIX +# or fall back to the build time prefix (if it exists) +_colcon_prefix_chain_sh_COLCON_CURRENT_PREFIX=/home/jackson/chamito/src/install +if [ ! -z "$COLCON_CURRENT_PREFIX" ]; then + _colcon_prefix_chain_sh_COLCON_CURRENT_PREFIX="$COLCON_CURRENT_PREFIX" +elif [ ! -d "$_colcon_prefix_chain_sh_COLCON_CURRENT_PREFIX" ]; then + echo "The build time path \"$_colcon_prefix_chain_sh_COLCON_CURRENT_PREFIX\" doesn't exist. Either source a script for a different shell or set the environment variable \"COLCON_CURRENT_PREFIX\" explicitly." 1>&2 + unset _colcon_prefix_chain_sh_COLCON_CURRENT_PREFIX + return 1 +fi + +# function to source another script with conditional trace output +# first argument: the path of the script +_colcon_prefix_chain_sh_source_script() { + if [ -f "$1" ]; then + if [ -n "$COLCON_TRACE" ]; then + echo "# . \"$1\"" + fi + . "$1" + else + echo "not found: \"$1\"" 1>&2 + fi +} + +# source chained prefixes +# setting COLCON_CURRENT_PREFIX avoids relying on the build time prefix of the sourced script +COLCON_CURRENT_PREFIX="/opt/ros/foxy" +_colcon_prefix_chain_sh_source_script "$COLCON_CURRENT_PREFIX/local_setup.sh" + + +# source this prefix +# setting COLCON_CURRENT_PREFIX avoids relying on the build time prefix of the sourced script +COLCON_CURRENT_PREFIX="$_colcon_prefix_chain_sh_COLCON_CURRENT_PREFIX" +_colcon_prefix_chain_sh_source_script "$COLCON_CURRENT_PREFIX/local_setup.sh" + +unset _colcon_prefix_chain_sh_COLCON_CURRENT_PREFIX +unset _colcon_prefix_chain_sh_source_script +unset COLCON_CURRENT_PREFIX diff --git a/install/setup.zsh b/install/setup.zsh new file mode 100644 index 0000000..a98672a --- /dev/null +++ b/install/setup.zsh @@ -0,0 +1,31 @@ +# generated from colcon_zsh/shell/template/prefix_chain.zsh.em + +# This script extends the environment with the environment of other prefix +# paths which were sourced when this file was generated as well as all packages +# contained in this prefix path. + +# function to source another script with conditional trace output +# first argument: the path of the script +_colcon_prefix_chain_zsh_source_script() { + if [ -f "$1" ]; then + if [ -n "$COLCON_TRACE" ]; then + echo ". \"$1\"" + fi + . "$1" + else + echo "not found: \"$1\"" 1>&2 + fi +} + +# source chained prefixes +# setting COLCON_CURRENT_PREFIX avoids determining the prefix in the sourced script +COLCON_CURRENT_PREFIX="/opt/ros/foxy" +_colcon_prefix_chain_zsh_source_script "$COLCON_CURRENT_PREFIX/local_setup.zsh" + +# source this prefix +# setting COLCON_CURRENT_PREFIX avoids determining the prefix in the sourced script +COLCON_CURRENT_PREFIX="$(builtin cd -q "`dirname "${(%):-%N}"`" > /dev/null && pwd)" +_colcon_prefix_chain_zsh_source_script "$COLCON_CURRENT_PREFIX/local_setup.zsh" + +unset COLCON_CURRENT_PREFIX +unset _colcon_prefix_chain_zsh_source_script diff --git a/log/COLCON_IGNORE b/log/COLCON_IGNORE new file mode 100644 index 0000000..e69de29 diff --git a/log/latest b/log/latest new file mode 120000 index 0000000..b57d247 --- /dev/null +++ b/log/latest @@ -0,0 +1 @@ +latest_build \ No newline at end of file diff --git a/log/latest_build b/log/latest_build new file mode 120000 index 0000000..eb2fa28 --- /dev/null +++ b/log/latest_build @@ -0,0 +1 @@ +build_2023-03-08_17-04-03 \ No newline at end of file diff --git a/my_package/my_package/__init__.py b/my_package/my_package/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/my_package/my_package/my_node.py b/my_package/my_package/my_node.py new file mode 100644 index 0000000..dff03e3 --- /dev/null +++ b/my_package/my_package/my_node.py @@ -0,0 +1,6 @@ +def main(): + print('Hi from my_package.') + + +if __name__ == '__main__': + main() diff --git a/my_package/package.xml b/my_package/package.xml new file mode 100644 index 0000000..78be50c --- /dev/null +++ b/my_package/package.xml @@ -0,0 +1,18 @@ + + + + my_package + 0.0.0 + TODO: Package description + jackson + TODO: License declaration + + ament_copyright + ament_flake8 + ament_pep257 + python3-pytest + + + ament_python + + diff --git a/my_package/resource/my_package b/my_package/resource/my_package new file mode 100644 index 0000000..e69de29 diff --git a/my_package/setup.cfg b/my_package/setup.cfg new file mode 100644 index 0000000..f5e86e5 --- /dev/null +++ b/my_package/setup.cfg @@ -0,0 +1,4 @@ +[develop] +script-dir=$base/lib/my_package +[install] +install-scripts=$base/lib/my_package diff --git a/my_package/setup.py b/my_package/setup.py new file mode 100644 index 0000000..b7c1418 --- /dev/null +++ b/my_package/setup.py @@ -0,0 +1,26 @@ +from setuptools import setup + +package_name = 'my_package' + +setup( + name=package_name, + version='0.0.0', + packages=[package_name], + data_files=[ + ('share/ament_index/resource_index/packages', + ['resource/' + package_name]), + ('share/' + package_name, ['package.xml']), + ], + install_requires=['setuptools'], + zip_safe=True, + maintainer='jackson', + maintainer_email='jdicano1319@gmail.com', + description='TODO: Package description', + license='TODO: License declaration', + tests_require=['pytest'], + entry_points={ + 'console_scripts': [ + 'my_node = my_package.my_node:main' + ], + }, +) diff --git a/my_package/test/test_copyright.py b/my_package/test/test_copyright.py new file mode 100644 index 0000000..cc8ff03 --- /dev/null +++ b/my_package/test/test_copyright.py @@ -0,0 +1,23 @@ +# Copyright 2015 Open Source Robotics Foundation, Inc. +# +# 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. + +from ament_copyright.main import main +import pytest + + +@pytest.mark.copyright +@pytest.mark.linter +def test_copyright(): + rc = main(argv=['.', 'test']) + assert rc == 0, 'Found errors' diff --git a/my_package/test/test_flake8.py b/my_package/test/test_flake8.py new file mode 100644 index 0000000..27ee107 --- /dev/null +++ b/my_package/test/test_flake8.py @@ -0,0 +1,25 @@ +# Copyright 2017 Open Source Robotics Foundation, Inc. +# +# 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. + +from ament_flake8.main import main_with_errors +import pytest + + +@pytest.mark.flake8 +@pytest.mark.linter +def test_flake8(): + rc, errors = main_with_errors(argv=[]) + assert rc == 0, \ + 'Found %d code style errors / warnings:\n' % len(errors) + \ + '\n'.join(errors) diff --git a/my_package/test/test_pep257.py b/my_package/test/test_pep257.py new file mode 100644 index 0000000..b234a38 --- /dev/null +++ b/my_package/test/test_pep257.py @@ -0,0 +1,23 @@ +# Copyright 2015 Open Source Robotics Foundation, Inc. +# +# 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. + +from ament_pep257.main import main +import pytest + + +@pytest.mark.linter +@pytest.mark.pep257 +def test_pep257(): + rc = main(argv=['.', 'test']) + assert rc == 0, 'Found code style errors / warnings' From 5807421ced343d3aa3a9c7008bfb72f758dee527 Mon Sep 17 00:00:00 2001 From: Jacksiton Date: Wed, 8 Mar 2023 17:13:45 -0500 Subject: [PATCH 06/53] jackson --- chamo/chamo/pubhen.py | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 chamo/chamo/pubhen.py diff --git a/chamo/chamo/pubhen.py b/chamo/chamo/pubhen.py new file mode 100644 index 0000000..df56e09 --- /dev/null +++ b/chamo/chamo/pubhen.py @@ -0,0 +1,39 @@ +import rclpy +from rclpy.node import Node + +from std_msgs.msg import String + + +class MinimalPublisher(Node): + + def __init__(self): + super().__init__('minimal_publisher') + self.publisher_ = self.create_publisher(String, 'topic', 10) + timer_period = 0.5 # seconds + self.timer = self.create_timer(timer_period, self.timer_callback) + self.i = 0 + + def timer_callback(self): + msg = String() + msg.data = 'Carlos K: %d' % self.i + self.publisher_.publish(msg) + self.get_logger().info('Publishing: "%s"' % msg.data) + self.i += 1 + + +def main(args=None): + rclpy.init(args=args) + + minimal_publisher = MinimalPublisher() + + rclpy.spin(minimal_publisher) + + # Destroy the node explicitly + # (optional - otherwise it will be done automatically + # when the garbage collector destroys the node object) + minimal_publisher.destroy_node() + rclpy.shutdown() + + +if __name__ == '__main__': + main() \ No newline at end of file From 30b983ba55f08c51dbfe7b3db9d3c3e1d2db28ba Mon Sep 17 00:00:00 2001 From: Jacksiton Date: Wed, 8 Mar 2023 17:20:14 -0500 Subject: [PATCH 07/53] jackson --- chamo/package.xml | 18 ------------------ {chamo => chamo_pkg}/chamo/__init__.py | 0 {chamo => chamo_pkg}/chamo/pubhen.py | 0 chamo_pkg/package.xml | 20 ++++++++++++++++++++ {chamo => chamo_pkg}/resource/chamo | 0 {chamo => chamo_pkg}/setup.cfg | 0 {chamo => chamo_pkg}/setup.py | 0 {chamo => chamo_pkg}/test/test_copyright.py | 0 {chamo => chamo_pkg}/test/test_flake8.py | 0 {chamo => chamo_pkg}/test/test_pep257.py | 0 10 files changed, 20 insertions(+), 18 deletions(-) delete mode 100644 chamo/package.xml rename {chamo => chamo_pkg}/chamo/__init__.py (100%) rename {chamo => chamo_pkg}/chamo/pubhen.py (100%) create mode 100644 chamo_pkg/package.xml rename {chamo => chamo_pkg}/resource/chamo (100%) rename {chamo => chamo_pkg}/setup.cfg (100%) rename {chamo => chamo_pkg}/setup.py (100%) rename {chamo => chamo_pkg}/test/test_copyright.py (100%) rename {chamo => chamo_pkg}/test/test_flake8.py (100%) rename {chamo => chamo_pkg}/test/test_pep257.py (100%) diff --git a/chamo/package.xml b/chamo/package.xml deleted file mode 100644 index 2498757..0000000 --- a/chamo/package.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - chamo - 0.0.0 - TODO: Package description - jackson - TODO: License declaration - - ament_copyright - ament_flake8 - ament_pep257 - python3-pytest - - - ament_python - - diff --git a/chamo/chamo/__init__.py b/chamo_pkg/chamo/__init__.py similarity index 100% rename from chamo/chamo/__init__.py rename to chamo_pkg/chamo/__init__.py diff --git a/chamo/chamo/pubhen.py b/chamo_pkg/chamo/pubhen.py similarity index 100% rename from chamo/chamo/pubhen.py rename to chamo_pkg/chamo/pubhen.py diff --git a/chamo_pkg/package.xml b/chamo_pkg/package.xml new file mode 100644 index 0000000..48d57d2 --- /dev/null +++ b/chamo_pkg/package.xml @@ -0,0 +1,20 @@ + + + + my_package + 0.0.0 + TODO: Package description + user + TODO: License declaration + + ament_copyright + ament_flake8 + ament_pep257 + python3-pytest + + + ament_python + + diff --git a/chamo/resource/chamo b/chamo_pkg/resource/chamo similarity index 100% rename from chamo/resource/chamo rename to chamo_pkg/resource/chamo diff --git a/chamo/setup.cfg b/chamo_pkg/setup.cfg similarity index 100% rename from chamo/setup.cfg rename to chamo_pkg/setup.cfg diff --git a/chamo/setup.py b/chamo_pkg/setup.py similarity index 100% rename from chamo/setup.py rename to chamo_pkg/setup.py diff --git a/chamo/test/test_copyright.py b/chamo_pkg/test/test_copyright.py similarity index 100% rename from chamo/test/test_copyright.py rename to chamo_pkg/test/test_copyright.py diff --git a/chamo/test/test_flake8.py b/chamo_pkg/test/test_flake8.py similarity index 100% rename from chamo/test/test_flake8.py rename to chamo_pkg/test/test_flake8.py diff --git a/chamo/test/test_pep257.py b/chamo_pkg/test/test_pep257.py similarity index 100% rename from chamo/test/test_pep257.py rename to chamo_pkg/test/test_pep257.py From efd0ce14a86abf8845926ce54a0ab05485c579bd Mon Sep 17 00:00:00 2001 From: Jacksiton Date: Wed, 8 Mar 2023 17:23:03 -0500 Subject: [PATCH 08/53] cambios --- chamo_pkg/chamo/__init__.py | 0 chamo_pkg/chamo/pubhen.py | 39 ------------------------------- chamo_pkg/package.xml | 20 ---------------- chamo_pkg/resource/chamo | 0 chamo_pkg/setup.cfg | 4 ---- chamo_pkg/setup.py | 25 -------------------- chamo_pkg/test/test_copyright.py | 23 ------------------ chamo_pkg/test/test_flake8.py | 25 -------------------- chamo_pkg/test/test_pep257.py | 23 ------------------ my_package/my_package/__init__.py | 0 my_package/my_package/my_node.py | 6 ----- my_package/package.xml | 18 -------------- my_package/resource/my_package | 0 my_package/setup.cfg | 4 ---- my_package/setup.py | 26 --------------------- my_package/test/test_copyright.py | 23 ------------------ my_package/test/test_flake8.py | 25 -------------------- my_package/test/test_pep257.py | 23 ------------------ 18 files changed, 284 deletions(-) delete mode 100644 chamo_pkg/chamo/__init__.py delete mode 100644 chamo_pkg/chamo/pubhen.py delete mode 100644 chamo_pkg/package.xml delete mode 100644 chamo_pkg/resource/chamo delete mode 100644 chamo_pkg/setup.cfg delete mode 100644 chamo_pkg/setup.py delete mode 100644 chamo_pkg/test/test_copyright.py delete mode 100644 chamo_pkg/test/test_flake8.py delete mode 100644 chamo_pkg/test/test_pep257.py delete mode 100644 my_package/my_package/__init__.py delete mode 100644 my_package/my_package/my_node.py delete mode 100644 my_package/package.xml delete mode 100644 my_package/resource/my_package delete mode 100644 my_package/setup.cfg delete mode 100644 my_package/setup.py delete mode 100644 my_package/test/test_copyright.py delete mode 100644 my_package/test/test_flake8.py delete mode 100644 my_package/test/test_pep257.py diff --git a/chamo_pkg/chamo/__init__.py b/chamo_pkg/chamo/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/chamo_pkg/chamo/pubhen.py b/chamo_pkg/chamo/pubhen.py deleted file mode 100644 index df56e09..0000000 --- a/chamo_pkg/chamo/pubhen.py +++ /dev/null @@ -1,39 +0,0 @@ -import rclpy -from rclpy.node import Node - -from std_msgs.msg import String - - -class MinimalPublisher(Node): - - def __init__(self): - super().__init__('minimal_publisher') - self.publisher_ = self.create_publisher(String, 'topic', 10) - timer_period = 0.5 # seconds - self.timer = self.create_timer(timer_period, self.timer_callback) - self.i = 0 - - def timer_callback(self): - msg = String() - msg.data = 'Carlos K: %d' % self.i - self.publisher_.publish(msg) - self.get_logger().info('Publishing: "%s"' % msg.data) - self.i += 1 - - -def main(args=None): - rclpy.init(args=args) - - minimal_publisher = MinimalPublisher() - - rclpy.spin(minimal_publisher) - - # Destroy the node explicitly - # (optional - otherwise it will be done automatically - # when the garbage collector destroys the node object) - minimal_publisher.destroy_node() - rclpy.shutdown() - - -if __name__ == '__main__': - main() \ No newline at end of file diff --git a/chamo_pkg/package.xml b/chamo_pkg/package.xml deleted file mode 100644 index 48d57d2..0000000 --- a/chamo_pkg/package.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - my_package - 0.0.0 - TODO: Package description - user - TODO: License declaration - - ament_copyright - ament_flake8 - ament_pep257 - python3-pytest - - - ament_python - - diff --git a/chamo_pkg/resource/chamo b/chamo_pkg/resource/chamo deleted file mode 100644 index e69de29..0000000 diff --git a/chamo_pkg/setup.cfg b/chamo_pkg/setup.cfg deleted file mode 100644 index eaacc60..0000000 --- a/chamo_pkg/setup.cfg +++ /dev/null @@ -1,4 +0,0 @@ -[develop] -script-dir=$base/lib/chamo -[install] -install-scripts=$base/lib/chamo diff --git a/chamo_pkg/setup.py b/chamo_pkg/setup.py deleted file mode 100644 index 14695e1..0000000 --- a/chamo_pkg/setup.py +++ /dev/null @@ -1,25 +0,0 @@ -from setuptools import setup - -package_name = 'chamo' - -setup( - name=package_name, - version='0.0.0', - packages=[package_name], - data_files=[ - ('share/ament_index/resource_index/packages', - ['resource/' + package_name]), - ('share/' + package_name, ['package.xml']), - ], - install_requires=['setuptools'], - zip_safe=True, - maintainer='jackson', - maintainer_email='jdicano1319@gmail.com', - description='TODO: Package description', - license='TODO: License declaration', - tests_require=['pytest'], - entry_points={ - 'console_scripts': [ - ], - }, -) diff --git a/chamo_pkg/test/test_copyright.py b/chamo_pkg/test/test_copyright.py deleted file mode 100644 index cc8ff03..0000000 --- a/chamo_pkg/test/test_copyright.py +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright 2015 Open Source Robotics Foundation, Inc. -# -# 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. - -from ament_copyright.main import main -import pytest - - -@pytest.mark.copyright -@pytest.mark.linter -def test_copyright(): - rc = main(argv=['.', 'test']) - assert rc == 0, 'Found errors' diff --git a/chamo_pkg/test/test_flake8.py b/chamo_pkg/test/test_flake8.py deleted file mode 100644 index 27ee107..0000000 --- a/chamo_pkg/test/test_flake8.py +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright 2017 Open Source Robotics Foundation, Inc. -# -# 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. - -from ament_flake8.main import main_with_errors -import pytest - - -@pytest.mark.flake8 -@pytest.mark.linter -def test_flake8(): - rc, errors = main_with_errors(argv=[]) - assert rc == 0, \ - 'Found %d code style errors / warnings:\n' % len(errors) + \ - '\n'.join(errors) diff --git a/chamo_pkg/test/test_pep257.py b/chamo_pkg/test/test_pep257.py deleted file mode 100644 index b234a38..0000000 --- a/chamo_pkg/test/test_pep257.py +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright 2015 Open Source Robotics Foundation, Inc. -# -# 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. - -from ament_pep257.main import main -import pytest - - -@pytest.mark.linter -@pytest.mark.pep257 -def test_pep257(): - rc = main(argv=['.', 'test']) - assert rc == 0, 'Found code style errors / warnings' diff --git a/my_package/my_package/__init__.py b/my_package/my_package/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/my_package/my_package/my_node.py b/my_package/my_package/my_node.py deleted file mode 100644 index dff03e3..0000000 --- a/my_package/my_package/my_node.py +++ /dev/null @@ -1,6 +0,0 @@ -def main(): - print('Hi from my_package.') - - -if __name__ == '__main__': - main() diff --git a/my_package/package.xml b/my_package/package.xml deleted file mode 100644 index 78be50c..0000000 --- a/my_package/package.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - my_package - 0.0.0 - TODO: Package description - jackson - TODO: License declaration - - ament_copyright - ament_flake8 - ament_pep257 - python3-pytest - - - ament_python - - diff --git a/my_package/resource/my_package b/my_package/resource/my_package deleted file mode 100644 index e69de29..0000000 diff --git a/my_package/setup.cfg b/my_package/setup.cfg deleted file mode 100644 index f5e86e5..0000000 --- a/my_package/setup.cfg +++ /dev/null @@ -1,4 +0,0 @@ -[develop] -script-dir=$base/lib/my_package -[install] -install-scripts=$base/lib/my_package diff --git a/my_package/setup.py b/my_package/setup.py deleted file mode 100644 index b7c1418..0000000 --- a/my_package/setup.py +++ /dev/null @@ -1,26 +0,0 @@ -from setuptools import setup - -package_name = 'my_package' - -setup( - name=package_name, - version='0.0.0', - packages=[package_name], - data_files=[ - ('share/ament_index/resource_index/packages', - ['resource/' + package_name]), - ('share/' + package_name, ['package.xml']), - ], - install_requires=['setuptools'], - zip_safe=True, - maintainer='jackson', - maintainer_email='jdicano1319@gmail.com', - description='TODO: Package description', - license='TODO: License declaration', - tests_require=['pytest'], - entry_points={ - 'console_scripts': [ - 'my_node = my_package.my_node:main' - ], - }, -) diff --git a/my_package/test/test_copyright.py b/my_package/test/test_copyright.py deleted file mode 100644 index cc8ff03..0000000 --- a/my_package/test/test_copyright.py +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright 2015 Open Source Robotics Foundation, Inc. -# -# 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. - -from ament_copyright.main import main -import pytest - - -@pytest.mark.copyright -@pytest.mark.linter -def test_copyright(): - rc = main(argv=['.', 'test']) - assert rc == 0, 'Found errors' diff --git a/my_package/test/test_flake8.py b/my_package/test/test_flake8.py deleted file mode 100644 index 27ee107..0000000 --- a/my_package/test/test_flake8.py +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright 2017 Open Source Robotics Foundation, Inc. -# -# 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. - -from ament_flake8.main import main_with_errors -import pytest - - -@pytest.mark.flake8 -@pytest.mark.linter -def test_flake8(): - rc, errors = main_with_errors(argv=[]) - assert rc == 0, \ - 'Found %d code style errors / warnings:\n' % len(errors) + \ - '\n'.join(errors) diff --git a/my_package/test/test_pep257.py b/my_package/test/test_pep257.py deleted file mode 100644 index b234a38..0000000 --- a/my_package/test/test_pep257.py +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright 2015 Open Source Robotics Foundation, Inc. -# -# 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. - -from ament_pep257.main import main -import pytest - - -@pytest.mark.linter -@pytest.mark.pep257 -def test_pep257(): - rc = main(argv=['.', 'test']) - assert rc == 0, 'Found code style errors / warnings' From c8178b622157f09d45048a78e45f97f72017f9ac Mon Sep 17 00:00:00 2001 From: Jacksiton Date: Wed, 8 Mar 2023 17:25:56 -0500 Subject: [PATCH 09/53] cambios2 --- chamo_pkg/chamo_pkg/__init__.py | 0 chamo_pkg/package.xml | 18 ++++++++++++++++++ chamo_pkg/resource/chamo_pkg | 0 chamo_pkg/setup.cfg | 4 ++++ chamo_pkg/setup.py | 25 +++++++++++++++++++++++++ chamo_pkg/test/test_copyright.py | 23 +++++++++++++++++++++++ chamo_pkg/test/test_flake8.py | 25 +++++++++++++++++++++++++ chamo_pkg/test/test_pep257.py | 23 +++++++++++++++++++++++ 8 files changed, 118 insertions(+) create mode 100644 chamo_pkg/chamo_pkg/__init__.py create mode 100644 chamo_pkg/package.xml create mode 100644 chamo_pkg/resource/chamo_pkg create mode 100644 chamo_pkg/setup.cfg create mode 100644 chamo_pkg/setup.py create mode 100644 chamo_pkg/test/test_copyright.py create mode 100644 chamo_pkg/test/test_flake8.py create mode 100644 chamo_pkg/test/test_pep257.py diff --git a/chamo_pkg/chamo_pkg/__init__.py b/chamo_pkg/chamo_pkg/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/chamo_pkg/package.xml b/chamo_pkg/package.xml new file mode 100644 index 0000000..55f7918 --- /dev/null +++ b/chamo_pkg/package.xml @@ -0,0 +1,18 @@ + + + + chamo_pkg + 0.0.0 + TODO: Package description + jackson + TODO: License declaration + + ament_copyright + ament_flake8 + ament_pep257 + python3-pytest + + + ament_python + + diff --git a/chamo_pkg/resource/chamo_pkg b/chamo_pkg/resource/chamo_pkg new file mode 100644 index 0000000..e69de29 diff --git a/chamo_pkg/setup.cfg b/chamo_pkg/setup.cfg new file mode 100644 index 0000000..e96f86e --- /dev/null +++ b/chamo_pkg/setup.cfg @@ -0,0 +1,4 @@ +[develop] +script-dir=$base/lib/chamo_pkg +[install] +install-scripts=$base/lib/chamo_pkg diff --git a/chamo_pkg/setup.py b/chamo_pkg/setup.py new file mode 100644 index 0000000..1549200 --- /dev/null +++ b/chamo_pkg/setup.py @@ -0,0 +1,25 @@ +from setuptools import setup + +package_name = 'chamo_pkg' + +setup( + name=package_name, + version='0.0.0', + packages=[package_name], + data_files=[ + ('share/ament_index/resource_index/packages', + ['resource/' + package_name]), + ('share/' + package_name, ['package.xml']), + ], + install_requires=['setuptools'], + zip_safe=True, + maintainer='jackson', + maintainer_email='jdicano1319@gmail.com', + description='TODO: Package description', + license='TODO: License declaration', + tests_require=['pytest'], + entry_points={ + 'console_scripts': [ + ], + }, +) diff --git a/chamo_pkg/test/test_copyright.py b/chamo_pkg/test/test_copyright.py new file mode 100644 index 0000000..cc8ff03 --- /dev/null +++ b/chamo_pkg/test/test_copyright.py @@ -0,0 +1,23 @@ +# Copyright 2015 Open Source Robotics Foundation, Inc. +# +# 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. + +from ament_copyright.main import main +import pytest + + +@pytest.mark.copyright +@pytest.mark.linter +def test_copyright(): + rc = main(argv=['.', 'test']) + assert rc == 0, 'Found errors' diff --git a/chamo_pkg/test/test_flake8.py b/chamo_pkg/test/test_flake8.py new file mode 100644 index 0000000..27ee107 --- /dev/null +++ b/chamo_pkg/test/test_flake8.py @@ -0,0 +1,25 @@ +# Copyright 2017 Open Source Robotics Foundation, Inc. +# +# 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. + +from ament_flake8.main import main_with_errors +import pytest + + +@pytest.mark.flake8 +@pytest.mark.linter +def test_flake8(): + rc, errors = main_with_errors(argv=[]) + assert rc == 0, \ + 'Found %d code style errors / warnings:\n' % len(errors) + \ + '\n'.join(errors) diff --git a/chamo_pkg/test/test_pep257.py b/chamo_pkg/test/test_pep257.py new file mode 100644 index 0000000..b234a38 --- /dev/null +++ b/chamo_pkg/test/test_pep257.py @@ -0,0 +1,23 @@ +# Copyright 2015 Open Source Robotics Foundation, Inc. +# +# 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. + +from ament_pep257.main import main +import pytest + + +@pytest.mark.linter +@pytest.mark.pep257 +def test_pep257(): + rc = main(argv=['.', 'test']) + assert rc == 0, 'Found code style errors / warnings' From 7e6c0aafe392ff1629e58b4f600a125fdfa9e72e Mon Sep 17 00:00:00 2001 From: Jacksiton Date: Wed, 8 Mar 2023 17:30:33 -0500 Subject: [PATCH 10/53] da --- chamo_pkg/chamo_pkg/my_pub.py | 39 +++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 chamo_pkg/chamo_pkg/my_pub.py diff --git a/chamo_pkg/chamo_pkg/my_pub.py b/chamo_pkg/chamo_pkg/my_pub.py new file mode 100644 index 0000000..fff0ae1 --- /dev/null +++ b/chamo_pkg/chamo_pkg/my_pub.py @@ -0,0 +1,39 @@ +import rclpy +from rclpy.node import Node + +from std_msgs.msg import String + + +class MinimalPublisher(Node): + + def __init__(self): + super().__init__('minimal_publisher') + self.publisher_ = self.create_publisher(String, 'topic', 10) + timer_period = 0.5 # seconds + self.timer = self.create_timer(timer_period, self.timer_callback) + self.i = 0 + + def timer_callback(self): + msg = String() + msg.data = 'Hello World: %d' % self.i + self.publisher_.publish(msg) + self.get_logger().info('Publishing: "%s"' % msg.data) + self.i += 1 + + +def main(args=None): + rclpy.init(args=args) + + minimal_publisher = MinimalPublisher() + + rclpy.spin(minimal_publisher) + + # Destroy the node explicitly + # (optional - otherwise it will be done automatically + # when the garbage collector destroys the node object) + minimal_publisher.destroy_node() + rclpy.shutdown() + + +if __name__ == '__main__': + main() \ No newline at end of file From cac3bc9df5dd753edff010229f5e6b294c540107 Mon Sep 17 00:00:00 2001 From: Jacksiton Date: Wed, 8 Mar 2023 17:33:12 -0500 Subject: [PATCH 11/53] da --- chamo_pkg/chamo_pkg/my_pub.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chamo_pkg/chamo_pkg/my_pub.py b/chamo_pkg/chamo_pkg/my_pub.py index fff0ae1..3c7cd90 100644 --- a/chamo_pkg/chamo_pkg/my_pub.py +++ b/chamo_pkg/chamo_pkg/my_pub.py @@ -7,7 +7,7 @@ class MinimalPublisher(Node): def __init__(self): - super().__init__('minimal_publisher') + super().__init__('Nodo_Chamo') self.publisher_ = self.create_publisher(String, 'topic', 10) timer_period = 0.5 # seconds self.timer = self.create_timer(timer_period, self.timer_callback) From 19f389c50629a4637f9ddf69d900244f14bbe72d Mon Sep 17 00:00:00 2001 From: Jacksiton Date: Wed, 8 Mar 2023 17:36:45 -0500 Subject: [PATCH 12/53] otro --- chamo_pkg/chamo_pkg/my_sub.py | 37 +++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 chamo_pkg/chamo_pkg/my_sub.py diff --git a/chamo_pkg/chamo_pkg/my_sub.py b/chamo_pkg/chamo_pkg/my_sub.py new file mode 100644 index 0000000..5ac9507 --- /dev/null +++ b/chamo_pkg/chamo_pkg/my_sub.py @@ -0,0 +1,37 @@ +import rclpy +from rclpy.node import Node + +from std_msgs.msg import String + + +class MinimalSubscriber(Node): + + def __init__(self): + super().__init__('') + self.subscription = self.create_subscription( + String, + 'topic', + self.listener_callback, + 10) + self.subscription # prevent unused variable warning + + def listener_callback(self, msg): + self.get_logger().info('I heard: "%s"' % msg.data) + + +def main(args=None): + rclpy.init(args=args) + + minimal_subscriber = MinimalSubscriber() + + rclpy.spin(minimal_subscriber) + + # Destroy the node explicitly + # (optional - otherwise it will be done automatically + # when the garbage collector destroys the node object) + minimal_subscriber.destroy_node() + rclpy.shutdown() + + +if __name__ == '__main__': + main() \ No newline at end of file From ff3d3e15d78c56f4a319795b86d66b7950277400 Mon Sep 17 00:00:00 2001 From: Jacksiton Date: Wed, 8 Mar 2023 17:36:50 -0500 Subject: [PATCH 13/53] awd --- chamo_pkg/chamo_pkg/my_pub.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chamo_pkg/chamo_pkg/my_pub.py b/chamo_pkg/chamo_pkg/my_pub.py index 3c7cd90..fff0ae1 100644 --- a/chamo_pkg/chamo_pkg/my_pub.py +++ b/chamo_pkg/chamo_pkg/my_pub.py @@ -7,7 +7,7 @@ class MinimalPublisher(Node): def __init__(self): - super().__init__('Nodo_Chamo') + super().__init__('minimal_publisher') self.publisher_ = self.create_publisher(String, 'topic', 10) timer_period = 0.5 # seconds self.timer = self.create_timer(timer_period, self.timer_callback) From e6d0a053e42fb352d6916a5554e3e23ad35105a6 Mon Sep 17 00:00:00 2001 From: Jacksiton Date: Wed, 8 Mar 2023 17:39:08 -0500 Subject: [PATCH 14/53] daw --- chamo_pkg/setup.py | 39 ++++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/chamo_pkg/setup.py b/chamo_pkg/setup.py index 1549200..0c25216 100644 --- a/chamo_pkg/setup.py +++ b/chamo_pkg/setup.py @@ -3,23 +3,24 @@ package_name = 'chamo_pkg' setup( - name=package_name, - version='0.0.0', - packages=[package_name], - data_files=[ - ('share/ament_index/resource_index/packages', - ['resource/' + package_name]), - ('share/' + package_name, ['package.xml']), - ], - install_requires=['setuptools'], - zip_safe=True, - maintainer='jackson', - maintainer_email='jdicano1319@gmail.com', - description='TODO: Package description', - license='TODO: License declaration', - tests_require=['pytest'], - entry_points={ - 'console_scripts': [ - ], - }, + name=package_name, + version='0.0.0', + packages=[package_name], + data_files=[ + ('share/ament_index/resource_index/packages', + ['resource/' + package_name]), + ('share/' + package_name, ['package.xml']), + ], + install_requires=['setuptools'], + zip_safe=True, + maintainer='TODO', + maintainer_email='TODO', + description='TODO: Package description', + license='TODO: License declaration', + tests_require=['pytest'], + entry_points={ + 'console_scripts': [ + 'my_node = my_py_pkg.my_node:main' + ], + }, ) From 50d62ef26cff7a7f36edb74ce50a83ec144ea581 Mon Sep 17 00:00:00 2001 From: Jacksiton Date: Wed, 8 Mar 2023 17:43:12 -0500 Subject: [PATCH 15/53] daw --- chamo_pkg/setup.py | 41 +++++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/chamo_pkg/setup.py b/chamo_pkg/setup.py index 0c25216..ce4a2b2 100644 --- a/chamo_pkg/setup.py +++ b/chamo_pkg/setup.py @@ -3,24 +3,25 @@ package_name = 'chamo_pkg' setup( - name=package_name, - version='0.0.0', - packages=[package_name], - data_files=[ - ('share/ament_index/resource_index/packages', - ['resource/' + package_name]), - ('share/' + package_name, ['package.xml']), - ], - install_requires=['setuptools'], - zip_safe=True, - maintainer='TODO', - maintainer_email='TODO', - description='TODO: Package description', - license='TODO: License declaration', - tests_require=['pytest'], - entry_points={ - 'console_scripts': [ - 'my_node = my_py_pkg.my_node:main' - ], - }, + name=package_name, + version='0.0.0', + packages=[package_name], + data_files=[ + ('share/ament_index/resource_index/packages', + ['resource/' + package_name]), + ('share/' + package_name, ['package.xml']), + ], + install_requires=['setuptools'], + zip_safe=True, + maintainer='chamo', + maintainer_email='jdicano1319@gmail.com', + description='TODO: Package description', + license='Apache License 2.0', + tests_require=['pytest'], + entry_points={ + 'console_scripts': [ + 'talker = chamo_pkg.my_pub:main', + 'listener = chamo_pkg.my_sub:main', + ], + }, ) From bede69eed18b5a5669e3391f12a2a1c8423c3e3a Mon Sep 17 00:00:00 2001 From: Jacksiton Date: Wed, 8 Mar 2023 17:49:57 -0500 Subject: [PATCH 16/53] chamo --- chamo_pkg/chamo_pkg/my_pub.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chamo_pkg/chamo_pkg/my_pub.py b/chamo_pkg/chamo_pkg/my_pub.py index fff0ae1..56eb8e4 100644 --- a/chamo_pkg/chamo_pkg/my_pub.py +++ b/chamo_pkg/chamo_pkg/my_pub.py @@ -15,7 +15,7 @@ def __init__(self): def timer_callback(self): msg = String() - msg.data = 'Hello World: %d' % self.i + msg.data = 'Identificate chamo: %d' % self.i self.publisher_.publish(msg) self.get_logger().info('Publishing: "%s"' % msg.data) self.i += 1 From b808516cff783635e2558070df9c1fbe9619ff7d Mon Sep 17 00:00:00 2001 From: Jacksiton Date: Wed, 8 Mar 2023 17:54:28 -0500 Subject: [PATCH 17/53] jhk --- raul_pkg/setup.py | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 raul_pkg/setup.py diff --git a/raul_pkg/setup.py b/raul_pkg/setup.py new file mode 100644 index 0000000..0917f9c --- /dev/null +++ b/raul_pkg/setup.py @@ -0,0 +1,27 @@ +from setuptools import setup + +package_name = 'raul_pkg' + +setup( + name=package_name, + version='0.0.0', + packages=[package_name], + data_files=[ + ('share/ament_index/resource_index/packages', + ['resource/' + package_name]), + ('share/' + package_name, ['package.xml']), + ], + install_requires=['setuptools'], + zip_safe=True, + maintainer='raul', + maintainer_email='alvaroraulurdanetag@gmail.com', + description='TODO: Package description', + license='Apache License 2.0', + tests_require=['pytest'], + entry_points={ + 'console_scripts': [ + 'talker = raul_pkg.pub_raul:main', + 'listener = raul_pkg.sub_raul:main', + ], + }, +) From 336d8a2afda11e357b692193bf25f3596dca7cc5 Mon Sep 17 00:00:00 2001 From: Jacksiton Date: Thu, 9 Mar 2023 08:24:18 -0500 Subject: [PATCH 18/53] chamo --- README.md | 95 ---- chamo_pkg/chamo_pkg/my_pub.py | 39 -- chamo_pkg/chamo_pkg/my_sub.py | 37 -- chamo_pkg/package.xml | 18 - chamo_pkg/setup.cfg | 4 - chamo_pkg/setup.py | 27 -- chamo_pkg/test/test_copyright.py | 23 - chamo_pkg/test/test_flake8.py | 25 -- chamo_pkg/test/test_pep257.py | 23 - install/.colcon_install_layout | 1 - install/_local_setup_util_ps1.py | 404 ------------------ install/_local_setup_util_sh.py | 404 ------------------ .../share/chamo/hook/ament_prefix_path.dsv | 1 - .../share/chamo/hook/ament_prefix_path.ps1 | 3 - .../share/chamo/hook/ament_prefix_path.sh | 3 - install/chamo/share/chamo/hook/pythonpath.dsv | 1 - install/chamo/share/chamo/hook/pythonpath.ps1 | 3 - install/chamo/share/chamo/hook/pythonpath.sh | 3 - install/chamo/share/chamo/package.bash | 31 -- install/chamo/share/chamo/package.dsv | 6 - install/chamo/share/chamo/package.ps1 | 116 ----- install/chamo/share/chamo/package.sh | 87 ---- install/chamo/share/chamo/package.xml | 18 - install/chamo/share/chamo/package.zsh | 42 -- install/local_setup.bash | 107 ----- install/local_setup.ps1 | 55 --- install/local_setup.sh | 137 ------ install/local_setup.zsh | 120 ------ .../package_run_dependencies/lolito | 1 - .../resource_index/parent_prefix_path/lolito | 1 - .../lolito/share/colcon-core/packages/lolito | 1 - .../lolito/cmake/lolitoConfig-version.cmake | 14 - .../share/lolito/cmake/lolitoConfig.cmake | 42 -- .../lolito/environment/ament_prefix_path.dsv | 1 - .../lolito/environment/ament_prefix_path.sh | 4 - .../lolito/share/lolito/environment/path.dsv | 1 - .../lolito/share/lolito/environment/path.sh | 5 - .../share/lolito/environment/pythonpath.dsv | 1 - .../share/lolito/environment/pythonpath.sh | 3 - .../share/lolito/hook/cmake_prefix_path.dsv | 1 - .../share/lolito/hook/cmake_prefix_path.ps1 | 3 - .../share/lolito/hook/cmake_prefix_path.sh | 3 - .../lolito/share/lolito/hook/pythonpath.dsv | 1 - .../lolito/share/lolito/hook/pythonpath.ps1 | 3 - .../lolito/share/lolito/hook/pythonpath.sh | 3 - install/lolito/share/lolito/local_setup.bash | 46 -- install/lolito/share/lolito/local_setup.dsv | 3 - install/lolito/share/lolito/local_setup.sh | 134 ------ install/lolito/share/lolito/local_setup.zsh | 59 --- install/lolito/share/lolito/package.bash | 39 -- install/lolito/share/lolito/package.dsv | 11 - install/lolito/share/lolito/package.ps1 | 117 ----- install/lolito/share/lolito/package.sh | 88 ---- install/lolito/share/lolito/package.xml | 21 - install/lolito/share/lolito/package.zsh | 50 --- .../my_package/hook/ament_prefix_path.dsv | 1 - .../my_package/hook/ament_prefix_path.ps1 | 3 - .../my_package/hook/ament_prefix_path.sh | 3 - .../share/my_package/hook/pythonpath.dsv | 1 - .../share/my_package/hook/pythonpath.ps1 | 3 - .../share/my_package/hook/pythonpath.sh | 3 - .../my_package/share/my_package/package.bash | 31 -- .../my_package/share/my_package/package.dsv | 6 - .../my_package/share/my_package/package.ps1 | 116 ----- .../my_package/share/my_package/package.sh | 87 ---- .../my_package/share/my_package/package.xml | 18 - .../my_package/share/my_package/package.zsh | 42 -- install/setup.bash | 31 -- install/setup.ps1 | 29 -- install/setup.sh | 45 -- install/setup.zsh | 31 -- lolito/CMakeLists.txt | 46 -- lolito/package.xml | 21 - lolito/scripts/pubhen.py | 39 -- raul_pkg/setup.py | 27 -- 75 files changed, 3072 deletions(-) diff --git a/README.md b/README.md index ac04d45..e69de29 100644 --- a/README.md +++ b/README.md @@ -1,95 +0,0 @@ -# Robot-over-ROS2 -Robot implementation using Robot Operating System V2 - -PUblisher/subscriber nodes -HOLA -Test on branches -HOLA alo123 - -pruebita lolo -alosito el mejor -\n \\ AmigoblesssOG -pruebita otra 2 - -Test on branches - - -## Setup - -Ref: https://docs.ros.org/en/foxy/Tutorials/Beginner-Client-Libraries/Creating-A-Workspace/Creating-A-Workspace.html - -1. Create a workspace folder in home -2. Create a new folder named src inside your workspace -3. Go to home in a terminal: - -```shell script -cd ~ -``` - -4. Go to src folder in your workspace. Change my_name_ws accordingly - -```shell script -cd my_name_ws/src/ -``` - -Clone without folder instructions> https://stackoverflow.com/questions/17581379/git-clone-without-project-folder - -command example: -```shell script -git clone https://github.com/roncanciovl/Robot-over-ROS2.git . -``` - -4. Resolve dependencies according to your distro -```shell script -cd .. -rosdep install -i --from-path src --rosdistro foxy -y -``` -Return: All required rosdeps installed successfully - -This may requiere before - -```shell script -sudo rosdep init -``` -```shell script -rosdep update -``` - -5. Open VSCode, got to the menu and select file, an then select open folder and select our workspace in home. This show our workspace in the VScode explorer - -6. In a terminal go to your workspace - -```shell script -colcon build -``` - -7. Sourve the overlay according to your distro - -```shell script -source /opt/ros/foxy/setup.bash -``` -8. - -```shell script -. install/local_setup.bash -``` - - - - -## Source Control Recommendations - - -2. For new features, create a new branch. Name it according to the feature. You may add it to the github repo. - - - - - -BUENOS DIAS :) -ADIOS -hola willy -HOla reyes - - -hello cgamo re hpt diff --git a/chamo_pkg/chamo_pkg/my_pub.py b/chamo_pkg/chamo_pkg/my_pub.py index 56eb8e4..e69de29 100644 --- a/chamo_pkg/chamo_pkg/my_pub.py +++ b/chamo_pkg/chamo_pkg/my_pub.py @@ -1,39 +0,0 @@ -import rclpy -from rclpy.node import Node - -from std_msgs.msg import String - - -class MinimalPublisher(Node): - - def __init__(self): - super().__init__('minimal_publisher') - self.publisher_ = self.create_publisher(String, 'topic', 10) - timer_period = 0.5 # seconds - self.timer = self.create_timer(timer_period, self.timer_callback) - self.i = 0 - - def timer_callback(self): - msg = String() - msg.data = 'Identificate chamo: %d' % self.i - self.publisher_.publish(msg) - self.get_logger().info('Publishing: "%s"' % msg.data) - self.i += 1 - - -def main(args=None): - rclpy.init(args=args) - - minimal_publisher = MinimalPublisher() - - rclpy.spin(minimal_publisher) - - # Destroy the node explicitly - # (optional - otherwise it will be done automatically - # when the garbage collector destroys the node object) - minimal_publisher.destroy_node() - rclpy.shutdown() - - -if __name__ == '__main__': - main() \ No newline at end of file diff --git a/chamo_pkg/chamo_pkg/my_sub.py b/chamo_pkg/chamo_pkg/my_sub.py index 5ac9507..e69de29 100644 --- a/chamo_pkg/chamo_pkg/my_sub.py +++ b/chamo_pkg/chamo_pkg/my_sub.py @@ -1,37 +0,0 @@ -import rclpy -from rclpy.node import Node - -from std_msgs.msg import String - - -class MinimalSubscriber(Node): - - def __init__(self): - super().__init__('') - self.subscription = self.create_subscription( - String, - 'topic', - self.listener_callback, - 10) - self.subscription # prevent unused variable warning - - def listener_callback(self, msg): - self.get_logger().info('I heard: "%s"' % msg.data) - - -def main(args=None): - rclpy.init(args=args) - - minimal_subscriber = MinimalSubscriber() - - rclpy.spin(minimal_subscriber) - - # Destroy the node explicitly - # (optional - otherwise it will be done automatically - # when the garbage collector destroys the node object) - minimal_subscriber.destroy_node() - rclpy.shutdown() - - -if __name__ == '__main__': - main() \ No newline at end of file diff --git a/chamo_pkg/package.xml b/chamo_pkg/package.xml index 55f7918..e69de29 100644 --- a/chamo_pkg/package.xml +++ b/chamo_pkg/package.xml @@ -1,18 +0,0 @@ - - - - chamo_pkg - 0.0.0 - TODO: Package description - jackson - TODO: License declaration - - ament_copyright - ament_flake8 - ament_pep257 - python3-pytest - - - ament_python - - diff --git a/chamo_pkg/setup.cfg b/chamo_pkg/setup.cfg index e96f86e..e69de29 100644 --- a/chamo_pkg/setup.cfg +++ b/chamo_pkg/setup.cfg @@ -1,4 +0,0 @@ -[develop] -script-dir=$base/lib/chamo_pkg -[install] -install-scripts=$base/lib/chamo_pkg diff --git a/chamo_pkg/setup.py b/chamo_pkg/setup.py index ce4a2b2..e69de29 100644 --- a/chamo_pkg/setup.py +++ b/chamo_pkg/setup.py @@ -1,27 +0,0 @@ -from setuptools import setup - -package_name = 'chamo_pkg' - -setup( - name=package_name, - version='0.0.0', - packages=[package_name], - data_files=[ - ('share/ament_index/resource_index/packages', - ['resource/' + package_name]), - ('share/' + package_name, ['package.xml']), - ], - install_requires=['setuptools'], - zip_safe=True, - maintainer='chamo', - maintainer_email='jdicano1319@gmail.com', - description='TODO: Package description', - license='Apache License 2.0', - tests_require=['pytest'], - entry_points={ - 'console_scripts': [ - 'talker = chamo_pkg.my_pub:main', - 'listener = chamo_pkg.my_sub:main', - ], - }, -) diff --git a/chamo_pkg/test/test_copyright.py b/chamo_pkg/test/test_copyright.py index cc8ff03..e69de29 100644 --- a/chamo_pkg/test/test_copyright.py +++ b/chamo_pkg/test/test_copyright.py @@ -1,23 +0,0 @@ -# Copyright 2015 Open Source Robotics Foundation, Inc. -# -# 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. - -from ament_copyright.main import main -import pytest - - -@pytest.mark.copyright -@pytest.mark.linter -def test_copyright(): - rc = main(argv=['.', 'test']) - assert rc == 0, 'Found errors' diff --git a/chamo_pkg/test/test_flake8.py b/chamo_pkg/test/test_flake8.py index 27ee107..e69de29 100644 --- a/chamo_pkg/test/test_flake8.py +++ b/chamo_pkg/test/test_flake8.py @@ -1,25 +0,0 @@ -# Copyright 2017 Open Source Robotics Foundation, Inc. -# -# 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. - -from ament_flake8.main import main_with_errors -import pytest - - -@pytest.mark.flake8 -@pytest.mark.linter -def test_flake8(): - rc, errors = main_with_errors(argv=[]) - assert rc == 0, \ - 'Found %d code style errors / warnings:\n' % len(errors) + \ - '\n'.join(errors) diff --git a/chamo_pkg/test/test_pep257.py b/chamo_pkg/test/test_pep257.py index b234a38..e69de29 100644 --- a/chamo_pkg/test/test_pep257.py +++ b/chamo_pkg/test/test_pep257.py @@ -1,23 +0,0 @@ -# Copyright 2015 Open Source Robotics Foundation, Inc. -# -# 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. - -from ament_pep257.main import main -import pytest - - -@pytest.mark.linter -@pytest.mark.pep257 -def test_pep257(): - rc = main(argv=['.', 'test']) - assert rc == 0, 'Found code style errors / warnings' diff --git a/install/.colcon_install_layout b/install/.colcon_install_layout index 3aad533..e69de29 100644 --- a/install/.colcon_install_layout +++ b/install/.colcon_install_layout @@ -1 +0,0 @@ -isolated diff --git a/install/_local_setup_util_ps1.py b/install/_local_setup_util_ps1.py index 98348ee..e69de29 100644 --- a/install/_local_setup_util_ps1.py +++ b/install/_local_setup_util_ps1.py @@ -1,404 +0,0 @@ -# Copyright 2016-2019 Dirk Thomas -# Licensed under the Apache License, Version 2.0 - -import argparse -from collections import OrderedDict -import os -from pathlib import Path -import sys - - -FORMAT_STR_COMMENT_LINE = '# {comment}' -FORMAT_STR_SET_ENV_VAR = 'Set-Item -Path "Env:{name}" -Value "{value}"' -FORMAT_STR_USE_ENV_VAR = '$env:{name}' -FORMAT_STR_INVOKE_SCRIPT = '_colcon_prefix_powershell_source_script "{script_path}"' -FORMAT_STR_REMOVE_LEADING_SEPARATOR = '' -FORMAT_STR_REMOVE_TRAILING_SEPARATOR = '' - -DSV_TYPE_APPEND_NON_DUPLICATE = 'append-non-duplicate' -DSV_TYPE_PREPEND_NON_DUPLICATE = 'prepend-non-duplicate' -DSV_TYPE_PREPEND_NON_DUPLICATE_IF_EXISTS = 'prepend-non-duplicate-if-exists' -DSV_TYPE_SET = 'set' -DSV_TYPE_SET_IF_UNSET = 'set-if-unset' -DSV_TYPE_SOURCE = 'source' - - -def main(argv=sys.argv[1:]): # noqa: D103 - parser = argparse.ArgumentParser( - description='Output shell commands for the packages in topological ' - 'order') - parser.add_argument( - 'primary_extension', - help='The file extension of the primary shell') - parser.add_argument( - 'additional_extension', nargs='?', - help='The additional file extension to be considered') - parser.add_argument( - '--merged-install', action='store_true', - help='All install prefixes are merged into a single location') - args = parser.parse_args(argv) - - packages = get_packages(Path(__file__).parent, args.merged_install) - - ordered_packages = order_packages(packages) - for pkg_name in ordered_packages: - if _include_comments(): - print( - FORMAT_STR_COMMENT_LINE.format_map( - {'comment': 'Package: ' + pkg_name})) - prefix = os.path.abspath(os.path.dirname(__file__)) - if not args.merged_install: - prefix = os.path.join(prefix, pkg_name) - for line in get_commands( - pkg_name, prefix, args.primary_extension, - args.additional_extension - ): - print(line) - - for line in _remove_ending_separators(): - print(line) - - -def get_packages(prefix_path, merged_install): - """ - Find packages based on colcon-specific files created during installation. - - :param Path prefix_path: The install prefix path of all packages - :param bool merged_install: The flag if the packages are all installed - directly in the prefix or if each package is installed in a subdirectory - named after the package - :returns: A mapping from the package name to the set of runtime - dependencies - :rtype: dict - """ - packages = {} - # since importing colcon_core isn't feasible here the following constant - # must match colcon_core.location.get_relative_package_index_path() - subdirectory = 'share/colcon-core/packages' - if merged_install: - # return if workspace is empty - if not (prefix_path / subdirectory).is_dir(): - return packages - # find all files in the subdirectory - for p in (prefix_path / subdirectory).iterdir(): - if not p.is_file(): - continue - if p.name.startswith('.'): - continue - add_package_runtime_dependencies(p, packages) - else: - # for each subdirectory look for the package specific file - for p in prefix_path.iterdir(): - if not p.is_dir(): - continue - if p.name.startswith('.'): - continue - p = p / subdirectory / p.name - if p.is_file(): - add_package_runtime_dependencies(p, packages) - - # remove unknown dependencies - pkg_names = set(packages.keys()) - for k in packages.keys(): - packages[k] = {d for d in packages[k] if d in pkg_names} - - return packages - - -def add_package_runtime_dependencies(path, packages): - """ - Check the path and if it exists extract the packages runtime dependencies. - - :param Path path: The resource file containing the runtime dependencies - :param dict packages: A mapping from package names to the sets of runtime - dependencies to add to - """ - content = path.read_text() - dependencies = set(content.split(os.pathsep) if content else []) - packages[path.name] = dependencies - - -def order_packages(packages): - """ - Order packages topologically. - - :param dict packages: A mapping from package name to the set of runtime - dependencies - :returns: The package names - :rtype: list - """ - # select packages with no dependencies in alphabetical order - to_be_ordered = list(packages.keys()) - ordered = [] - while to_be_ordered: - pkg_names_without_deps = [ - name for name in to_be_ordered if not packages[name]] - if not pkg_names_without_deps: - reduce_cycle_set(packages) - raise RuntimeError( - 'Circular dependency between: ' + ', '.join(sorted(packages))) - pkg_names_without_deps.sort() - pkg_name = pkg_names_without_deps[0] - to_be_ordered.remove(pkg_name) - ordered.append(pkg_name) - # remove item from dependency lists - for k in list(packages.keys()): - if pkg_name in packages[k]: - packages[k].remove(pkg_name) - return ordered - - -def reduce_cycle_set(packages): - """ - Reduce the set of packages to the ones part of the circular dependency. - - :param dict packages: A mapping from package name to the set of runtime - dependencies which is modified in place - """ - last_depended = None - while len(packages) > 0: - # get all remaining dependencies - depended = set() - for pkg_name, dependencies in packages.items(): - depended = depended.union(dependencies) - # remove all packages which are not dependent on - for name in list(packages.keys()): - if name not in depended: - del packages[name] - if last_depended: - # if remaining packages haven't changed return them - if last_depended == depended: - return packages.keys() - # otherwise reduce again - last_depended = depended - - -def _include_comments(): - # skipping comment lines when COLCON_TRACE is not set speeds up the - # processing especially on Windows - return bool(os.environ.get('COLCON_TRACE')) - - -def get_commands(pkg_name, prefix, primary_extension, additional_extension): - commands = [] - package_dsv_path = os.path.join(prefix, 'share', pkg_name, 'package.dsv') - if os.path.exists(package_dsv_path): - commands += process_dsv_file( - package_dsv_path, prefix, primary_extension, additional_extension) - return commands - - -def process_dsv_file( - dsv_path, prefix, primary_extension=None, additional_extension=None -): - commands = [] - if _include_comments(): - commands.append(FORMAT_STR_COMMENT_LINE.format_map({'comment': dsv_path})) - with open(dsv_path, 'r') as h: - content = h.read() - lines = content.splitlines() - - basenames = OrderedDict() - for i, line in enumerate(lines): - # skip over empty or whitespace-only lines - if not line.strip(): - continue - try: - type_, remainder = line.split(';', 1) - except ValueError: - raise RuntimeError( - "Line %d in '%s' doesn't contain a semicolon separating the " - 'type from the arguments' % (i + 1, dsv_path)) - if type_ != DSV_TYPE_SOURCE: - # handle non-source lines - try: - commands += handle_dsv_types_except_source( - type_, remainder, prefix) - except RuntimeError as e: - raise RuntimeError( - "Line %d in '%s' %s" % (i + 1, dsv_path, e)) from e - else: - # group remaining source lines by basename - path_without_ext, ext = os.path.splitext(remainder) - if path_without_ext not in basenames: - basenames[path_without_ext] = set() - assert ext.startswith('.') - ext = ext[1:] - if ext in (primary_extension, additional_extension): - basenames[path_without_ext].add(ext) - - # add the dsv extension to each basename if the file exists - for basename, extensions in basenames.items(): - if not os.path.isabs(basename): - basename = os.path.join(prefix, basename) - if os.path.exists(basename + '.dsv'): - extensions.add('dsv') - - for basename, extensions in basenames.items(): - if not os.path.isabs(basename): - basename = os.path.join(prefix, basename) - if 'dsv' in extensions: - # process dsv files recursively - commands += process_dsv_file( - basename + '.dsv', prefix, primary_extension=primary_extension, - additional_extension=additional_extension) - elif primary_extension in extensions and len(extensions) == 1: - # source primary-only files - commands += [ - FORMAT_STR_INVOKE_SCRIPT.format_map({ - 'prefix': prefix, - 'script_path': basename + '.' + primary_extension})] - elif additional_extension in extensions: - # source non-primary files - commands += [ - FORMAT_STR_INVOKE_SCRIPT.format_map({ - 'prefix': prefix, - 'script_path': basename + '.' + additional_extension})] - - return commands - - -def handle_dsv_types_except_source(type_, remainder, prefix): - commands = [] - if type_ in (DSV_TYPE_SET, DSV_TYPE_SET_IF_UNSET): - try: - env_name, value = remainder.split(';', 1) - except ValueError: - raise RuntimeError( - "doesn't contain a semicolon separating the environment name " - 'from the value') - try_prefixed_value = os.path.join(prefix, value) if value else prefix - if os.path.exists(try_prefixed_value): - value = try_prefixed_value - if type_ == DSV_TYPE_SET: - commands += _set(env_name, value) - elif type_ == DSV_TYPE_SET_IF_UNSET: - commands += _set_if_unset(env_name, value) - else: - assert False - elif type_ in ( - DSV_TYPE_APPEND_NON_DUPLICATE, - DSV_TYPE_PREPEND_NON_DUPLICATE, - DSV_TYPE_PREPEND_NON_DUPLICATE_IF_EXISTS - ): - try: - env_name_and_values = remainder.split(';') - except ValueError: - raise RuntimeError( - "doesn't contain a semicolon separating the environment name " - 'from the values') - env_name = env_name_and_values[0] - values = env_name_and_values[1:] - for value in values: - if not value: - value = prefix - elif not os.path.isabs(value): - value = os.path.join(prefix, value) - if ( - type_ == DSV_TYPE_PREPEND_NON_DUPLICATE_IF_EXISTS and - not os.path.exists(value) - ): - comment = f'skip extending {env_name} with not existing ' \ - f'path: {value}' - if _include_comments(): - commands.append( - FORMAT_STR_COMMENT_LINE.format_map({'comment': comment})) - elif type_ == DSV_TYPE_APPEND_NON_DUPLICATE: - commands += _append_unique_value(env_name, value) - else: - commands += _prepend_unique_value(env_name, value) - else: - raise RuntimeError( - 'contains an unknown environment hook type: ' + type_) - return commands - - -env_state = {} - - -def _append_unique_value(name, value): - global env_state - if name not in env_state: - if os.environ.get(name): - env_state[name] = set(os.environ[name].split(os.pathsep)) - else: - env_state[name] = set() - # append even if the variable has not been set yet, in case a shell script sets the - # same variable without the knowledge of this Python script. - # later _remove_ending_separators() will cleanup any unintentional leading separator - extend = FORMAT_STR_USE_ENV_VAR.format_map({'name': name}) + os.pathsep - line = FORMAT_STR_SET_ENV_VAR.format_map( - {'name': name, 'value': extend + value}) - if value not in env_state[name]: - env_state[name].add(value) - else: - if not _include_comments(): - return [] - line = FORMAT_STR_COMMENT_LINE.format_map({'comment': line}) - return [line] - - -def _prepend_unique_value(name, value): - global env_state - if name not in env_state: - if os.environ.get(name): - env_state[name] = set(os.environ[name].split(os.pathsep)) - else: - env_state[name] = set() - # prepend even if the variable has not been set yet, in case a shell script sets the - # same variable without the knowledge of this Python script. - # later _remove_ending_separators() will cleanup any unintentional trailing separator - extend = os.pathsep + FORMAT_STR_USE_ENV_VAR.format_map({'name': name}) - line = FORMAT_STR_SET_ENV_VAR.format_map( - {'name': name, 'value': value + extend}) - if value not in env_state[name]: - env_state[name].add(value) - else: - if not _include_comments(): - return [] - line = FORMAT_STR_COMMENT_LINE.format_map({'comment': line}) - return [line] - - -# generate commands for removing prepended underscores -def _remove_ending_separators(): - # do nothing if the shell extension does not implement the logic - if FORMAT_STR_REMOVE_TRAILING_SEPARATOR is None: - return [] - - global env_state - commands = [] - for name in env_state: - # skip variables that already had values before this script started prepending - if name in os.environ: - continue - commands += [ - FORMAT_STR_REMOVE_LEADING_SEPARATOR.format_map({'name': name}), - FORMAT_STR_REMOVE_TRAILING_SEPARATOR.format_map({'name': name})] - return commands - - -def _set(name, value): - global env_state - env_state[name] = value - line = FORMAT_STR_SET_ENV_VAR.format_map( - {'name': name, 'value': value}) - return [line] - - -def _set_if_unset(name, value): - global env_state - line = FORMAT_STR_SET_ENV_VAR.format_map( - {'name': name, 'value': value}) - if env_state.get(name, os.environ.get(name)): - line = FORMAT_STR_COMMENT_LINE.format_map({'comment': line}) - return [line] - - -if __name__ == '__main__': # pragma: no cover - try: - rc = main() - except RuntimeError as e: - print(str(e), file=sys.stderr) - rc = 1 - sys.exit(rc) diff --git a/install/_local_setup_util_sh.py b/install/_local_setup_util_sh.py index 35c017b..e69de29 100644 --- a/install/_local_setup_util_sh.py +++ b/install/_local_setup_util_sh.py @@ -1,404 +0,0 @@ -# Copyright 2016-2019 Dirk Thomas -# Licensed under the Apache License, Version 2.0 - -import argparse -from collections import OrderedDict -import os -from pathlib import Path -import sys - - -FORMAT_STR_COMMENT_LINE = '# {comment}' -FORMAT_STR_SET_ENV_VAR = 'export {name}="{value}"' -FORMAT_STR_USE_ENV_VAR = '${name}' -FORMAT_STR_INVOKE_SCRIPT = 'COLCON_CURRENT_PREFIX="{prefix}" _colcon_prefix_sh_source_script "{script_path}"' -FORMAT_STR_REMOVE_LEADING_SEPARATOR = 'if [ "$(echo -n ${name} | head -c 1)" = ":" ]; then export {name}=${{{name}#?}} ; fi' -FORMAT_STR_REMOVE_TRAILING_SEPARATOR = 'if [ "$(echo -n ${name} | tail -c 1)" = ":" ]; then export {name}=${{{name}%?}} ; fi' - -DSV_TYPE_APPEND_NON_DUPLICATE = 'append-non-duplicate' -DSV_TYPE_PREPEND_NON_DUPLICATE = 'prepend-non-duplicate' -DSV_TYPE_PREPEND_NON_DUPLICATE_IF_EXISTS = 'prepend-non-duplicate-if-exists' -DSV_TYPE_SET = 'set' -DSV_TYPE_SET_IF_UNSET = 'set-if-unset' -DSV_TYPE_SOURCE = 'source' - - -def main(argv=sys.argv[1:]): # noqa: D103 - parser = argparse.ArgumentParser( - description='Output shell commands for the packages in topological ' - 'order') - parser.add_argument( - 'primary_extension', - help='The file extension of the primary shell') - parser.add_argument( - 'additional_extension', nargs='?', - help='The additional file extension to be considered') - parser.add_argument( - '--merged-install', action='store_true', - help='All install prefixes are merged into a single location') - args = parser.parse_args(argv) - - packages = get_packages(Path(__file__).parent, args.merged_install) - - ordered_packages = order_packages(packages) - for pkg_name in ordered_packages: - if _include_comments(): - print( - FORMAT_STR_COMMENT_LINE.format_map( - {'comment': 'Package: ' + pkg_name})) - prefix = os.path.abspath(os.path.dirname(__file__)) - if not args.merged_install: - prefix = os.path.join(prefix, pkg_name) - for line in get_commands( - pkg_name, prefix, args.primary_extension, - args.additional_extension - ): - print(line) - - for line in _remove_ending_separators(): - print(line) - - -def get_packages(prefix_path, merged_install): - """ - Find packages based on colcon-specific files created during installation. - - :param Path prefix_path: The install prefix path of all packages - :param bool merged_install: The flag if the packages are all installed - directly in the prefix or if each package is installed in a subdirectory - named after the package - :returns: A mapping from the package name to the set of runtime - dependencies - :rtype: dict - """ - packages = {} - # since importing colcon_core isn't feasible here the following constant - # must match colcon_core.location.get_relative_package_index_path() - subdirectory = 'share/colcon-core/packages' - if merged_install: - # return if workspace is empty - if not (prefix_path / subdirectory).is_dir(): - return packages - # find all files in the subdirectory - for p in (prefix_path / subdirectory).iterdir(): - if not p.is_file(): - continue - if p.name.startswith('.'): - continue - add_package_runtime_dependencies(p, packages) - else: - # for each subdirectory look for the package specific file - for p in prefix_path.iterdir(): - if not p.is_dir(): - continue - if p.name.startswith('.'): - continue - p = p / subdirectory / p.name - if p.is_file(): - add_package_runtime_dependencies(p, packages) - - # remove unknown dependencies - pkg_names = set(packages.keys()) - for k in packages.keys(): - packages[k] = {d for d in packages[k] if d in pkg_names} - - return packages - - -def add_package_runtime_dependencies(path, packages): - """ - Check the path and if it exists extract the packages runtime dependencies. - - :param Path path: The resource file containing the runtime dependencies - :param dict packages: A mapping from package names to the sets of runtime - dependencies to add to - """ - content = path.read_text() - dependencies = set(content.split(os.pathsep) if content else []) - packages[path.name] = dependencies - - -def order_packages(packages): - """ - Order packages topologically. - - :param dict packages: A mapping from package name to the set of runtime - dependencies - :returns: The package names - :rtype: list - """ - # select packages with no dependencies in alphabetical order - to_be_ordered = list(packages.keys()) - ordered = [] - while to_be_ordered: - pkg_names_without_deps = [ - name for name in to_be_ordered if not packages[name]] - if not pkg_names_without_deps: - reduce_cycle_set(packages) - raise RuntimeError( - 'Circular dependency between: ' + ', '.join(sorted(packages))) - pkg_names_without_deps.sort() - pkg_name = pkg_names_without_deps[0] - to_be_ordered.remove(pkg_name) - ordered.append(pkg_name) - # remove item from dependency lists - for k in list(packages.keys()): - if pkg_name in packages[k]: - packages[k].remove(pkg_name) - return ordered - - -def reduce_cycle_set(packages): - """ - Reduce the set of packages to the ones part of the circular dependency. - - :param dict packages: A mapping from package name to the set of runtime - dependencies which is modified in place - """ - last_depended = None - while len(packages) > 0: - # get all remaining dependencies - depended = set() - for pkg_name, dependencies in packages.items(): - depended = depended.union(dependencies) - # remove all packages which are not dependent on - for name in list(packages.keys()): - if name not in depended: - del packages[name] - if last_depended: - # if remaining packages haven't changed return them - if last_depended == depended: - return packages.keys() - # otherwise reduce again - last_depended = depended - - -def _include_comments(): - # skipping comment lines when COLCON_TRACE is not set speeds up the - # processing especially on Windows - return bool(os.environ.get('COLCON_TRACE')) - - -def get_commands(pkg_name, prefix, primary_extension, additional_extension): - commands = [] - package_dsv_path = os.path.join(prefix, 'share', pkg_name, 'package.dsv') - if os.path.exists(package_dsv_path): - commands += process_dsv_file( - package_dsv_path, prefix, primary_extension, additional_extension) - return commands - - -def process_dsv_file( - dsv_path, prefix, primary_extension=None, additional_extension=None -): - commands = [] - if _include_comments(): - commands.append(FORMAT_STR_COMMENT_LINE.format_map({'comment': dsv_path})) - with open(dsv_path, 'r') as h: - content = h.read() - lines = content.splitlines() - - basenames = OrderedDict() - for i, line in enumerate(lines): - # skip over empty or whitespace-only lines - if not line.strip(): - continue - try: - type_, remainder = line.split(';', 1) - except ValueError: - raise RuntimeError( - "Line %d in '%s' doesn't contain a semicolon separating the " - 'type from the arguments' % (i + 1, dsv_path)) - if type_ != DSV_TYPE_SOURCE: - # handle non-source lines - try: - commands += handle_dsv_types_except_source( - type_, remainder, prefix) - except RuntimeError as e: - raise RuntimeError( - "Line %d in '%s' %s" % (i + 1, dsv_path, e)) from e - else: - # group remaining source lines by basename - path_without_ext, ext = os.path.splitext(remainder) - if path_without_ext not in basenames: - basenames[path_without_ext] = set() - assert ext.startswith('.') - ext = ext[1:] - if ext in (primary_extension, additional_extension): - basenames[path_without_ext].add(ext) - - # add the dsv extension to each basename if the file exists - for basename, extensions in basenames.items(): - if not os.path.isabs(basename): - basename = os.path.join(prefix, basename) - if os.path.exists(basename + '.dsv'): - extensions.add('dsv') - - for basename, extensions in basenames.items(): - if not os.path.isabs(basename): - basename = os.path.join(prefix, basename) - if 'dsv' in extensions: - # process dsv files recursively - commands += process_dsv_file( - basename + '.dsv', prefix, primary_extension=primary_extension, - additional_extension=additional_extension) - elif primary_extension in extensions and len(extensions) == 1: - # source primary-only files - commands += [ - FORMAT_STR_INVOKE_SCRIPT.format_map({ - 'prefix': prefix, - 'script_path': basename + '.' + primary_extension})] - elif additional_extension in extensions: - # source non-primary files - commands += [ - FORMAT_STR_INVOKE_SCRIPT.format_map({ - 'prefix': prefix, - 'script_path': basename + '.' + additional_extension})] - - return commands - - -def handle_dsv_types_except_source(type_, remainder, prefix): - commands = [] - if type_ in (DSV_TYPE_SET, DSV_TYPE_SET_IF_UNSET): - try: - env_name, value = remainder.split(';', 1) - except ValueError: - raise RuntimeError( - "doesn't contain a semicolon separating the environment name " - 'from the value') - try_prefixed_value = os.path.join(prefix, value) if value else prefix - if os.path.exists(try_prefixed_value): - value = try_prefixed_value - if type_ == DSV_TYPE_SET: - commands += _set(env_name, value) - elif type_ == DSV_TYPE_SET_IF_UNSET: - commands += _set_if_unset(env_name, value) - else: - assert False - elif type_ in ( - DSV_TYPE_APPEND_NON_DUPLICATE, - DSV_TYPE_PREPEND_NON_DUPLICATE, - DSV_TYPE_PREPEND_NON_DUPLICATE_IF_EXISTS - ): - try: - env_name_and_values = remainder.split(';') - except ValueError: - raise RuntimeError( - "doesn't contain a semicolon separating the environment name " - 'from the values') - env_name = env_name_and_values[0] - values = env_name_and_values[1:] - for value in values: - if not value: - value = prefix - elif not os.path.isabs(value): - value = os.path.join(prefix, value) - if ( - type_ == DSV_TYPE_PREPEND_NON_DUPLICATE_IF_EXISTS and - not os.path.exists(value) - ): - comment = f'skip extending {env_name} with not existing ' \ - f'path: {value}' - if _include_comments(): - commands.append( - FORMAT_STR_COMMENT_LINE.format_map({'comment': comment})) - elif type_ == DSV_TYPE_APPEND_NON_DUPLICATE: - commands += _append_unique_value(env_name, value) - else: - commands += _prepend_unique_value(env_name, value) - else: - raise RuntimeError( - 'contains an unknown environment hook type: ' + type_) - return commands - - -env_state = {} - - -def _append_unique_value(name, value): - global env_state - if name not in env_state: - if os.environ.get(name): - env_state[name] = set(os.environ[name].split(os.pathsep)) - else: - env_state[name] = set() - # append even if the variable has not been set yet, in case a shell script sets the - # same variable without the knowledge of this Python script. - # later _remove_ending_separators() will cleanup any unintentional leading separator - extend = FORMAT_STR_USE_ENV_VAR.format_map({'name': name}) + os.pathsep - line = FORMAT_STR_SET_ENV_VAR.format_map( - {'name': name, 'value': extend + value}) - if value not in env_state[name]: - env_state[name].add(value) - else: - if not _include_comments(): - return [] - line = FORMAT_STR_COMMENT_LINE.format_map({'comment': line}) - return [line] - - -def _prepend_unique_value(name, value): - global env_state - if name not in env_state: - if os.environ.get(name): - env_state[name] = set(os.environ[name].split(os.pathsep)) - else: - env_state[name] = set() - # prepend even if the variable has not been set yet, in case a shell script sets the - # same variable without the knowledge of this Python script. - # later _remove_ending_separators() will cleanup any unintentional trailing separator - extend = os.pathsep + FORMAT_STR_USE_ENV_VAR.format_map({'name': name}) - line = FORMAT_STR_SET_ENV_VAR.format_map( - {'name': name, 'value': value + extend}) - if value not in env_state[name]: - env_state[name].add(value) - else: - if not _include_comments(): - return [] - line = FORMAT_STR_COMMENT_LINE.format_map({'comment': line}) - return [line] - - -# generate commands for removing prepended underscores -def _remove_ending_separators(): - # do nothing if the shell extension does not implement the logic - if FORMAT_STR_REMOVE_TRAILING_SEPARATOR is None: - return [] - - global env_state - commands = [] - for name in env_state: - # skip variables that already had values before this script started prepending - if name in os.environ: - continue - commands += [ - FORMAT_STR_REMOVE_LEADING_SEPARATOR.format_map({'name': name}), - FORMAT_STR_REMOVE_TRAILING_SEPARATOR.format_map({'name': name})] - return commands - - -def _set(name, value): - global env_state - env_state[name] = value - line = FORMAT_STR_SET_ENV_VAR.format_map( - {'name': name, 'value': value}) - return [line] - - -def _set_if_unset(name, value): - global env_state - line = FORMAT_STR_SET_ENV_VAR.format_map( - {'name': name, 'value': value}) - if env_state.get(name, os.environ.get(name)): - line = FORMAT_STR_COMMENT_LINE.format_map({'comment': line}) - return [line] - - -if __name__ == '__main__': # pragma: no cover - try: - rc = main() - except RuntimeError as e: - print(str(e), file=sys.stderr) - rc = 1 - sys.exit(rc) diff --git a/install/chamo/share/chamo/hook/ament_prefix_path.dsv b/install/chamo/share/chamo/hook/ament_prefix_path.dsv index 79d4c95..e69de29 100644 --- a/install/chamo/share/chamo/hook/ament_prefix_path.dsv +++ b/install/chamo/share/chamo/hook/ament_prefix_path.dsv @@ -1 +0,0 @@ -prepend-non-duplicate;AMENT_PREFIX_PATH; diff --git a/install/chamo/share/chamo/hook/ament_prefix_path.ps1 b/install/chamo/share/chamo/hook/ament_prefix_path.ps1 index 26b9997..e69de29 100644 --- a/install/chamo/share/chamo/hook/ament_prefix_path.ps1 +++ b/install/chamo/share/chamo/hook/ament_prefix_path.ps1 @@ -1,3 +0,0 @@ -# generated from colcon_powershell/shell/template/hook_prepend_value.ps1.em - -colcon_prepend_unique_value AMENT_PREFIX_PATH "$env:COLCON_CURRENT_PREFIX" diff --git a/install/chamo/share/chamo/hook/ament_prefix_path.sh b/install/chamo/share/chamo/hook/ament_prefix_path.sh index f3041f6..e69de29 100644 --- a/install/chamo/share/chamo/hook/ament_prefix_path.sh +++ b/install/chamo/share/chamo/hook/ament_prefix_path.sh @@ -1,3 +0,0 @@ -# generated from colcon_core/shell/template/hook_prepend_value.sh.em - -_colcon_prepend_unique_value AMENT_PREFIX_PATH "$COLCON_CURRENT_PREFIX" diff --git a/install/chamo/share/chamo/hook/pythonpath.dsv b/install/chamo/share/chamo/hook/pythonpath.dsv index 84dbc4c..e69de29 100644 --- a/install/chamo/share/chamo/hook/pythonpath.dsv +++ b/install/chamo/share/chamo/hook/pythonpath.dsv @@ -1 +0,0 @@ -prepend-non-duplicate;PYTHONPATH;lib/python3.8/site-packages diff --git a/install/chamo/share/chamo/hook/pythonpath.ps1 b/install/chamo/share/chamo/hook/pythonpath.ps1 index 12877ef..e69de29 100644 --- a/install/chamo/share/chamo/hook/pythonpath.ps1 +++ b/install/chamo/share/chamo/hook/pythonpath.ps1 @@ -1,3 +0,0 @@ -# generated from colcon_powershell/shell/template/hook_prepend_value.ps1.em - -colcon_prepend_unique_value PYTHONPATH "$env:COLCON_CURRENT_PREFIX\lib/python3.8/site-packages" diff --git a/install/chamo/share/chamo/hook/pythonpath.sh b/install/chamo/share/chamo/hook/pythonpath.sh index ed8efd9..e69de29 100644 --- a/install/chamo/share/chamo/hook/pythonpath.sh +++ b/install/chamo/share/chamo/hook/pythonpath.sh @@ -1,3 +0,0 @@ -# generated from colcon_core/shell/template/hook_prepend_value.sh.em - -_colcon_prepend_unique_value PYTHONPATH "$COLCON_CURRENT_PREFIX/lib/python3.8/site-packages" diff --git a/install/chamo/share/chamo/package.bash b/install/chamo/share/chamo/package.bash index a5a0062..e69de29 100644 --- a/install/chamo/share/chamo/package.bash +++ b/install/chamo/share/chamo/package.bash @@ -1,31 +0,0 @@ -# generated from colcon_bash/shell/template/package.bash.em - -# This script extends the environment for this package. - -# a bash script is able to determine its own path if necessary -if [ -z "$COLCON_CURRENT_PREFIX" ]; then - # the prefix is two levels up from the package specific share directory - _colcon_package_bash_COLCON_CURRENT_PREFIX="$(builtin cd "`dirname "${BASH_SOURCE[0]}"`/../.." > /dev/null && pwd)" -else - _colcon_package_bash_COLCON_CURRENT_PREFIX="$COLCON_CURRENT_PREFIX" -fi - -# function to source another script with conditional trace output -# first argument: the path of the script -# additional arguments: arguments to the script -_colcon_package_bash_source_script() { - if [ -f "$1" ]; then - if [ -n "$COLCON_TRACE" ]; then - echo ". \"$1\"" - fi - . "$@" - else - echo "not found: \"$1\"" 1>&2 - fi -} - -# source sh script of this package -_colcon_package_bash_source_script "$_colcon_package_bash_COLCON_CURRENT_PREFIX/share/chamo/package.sh" - -unset _colcon_package_bash_source_script -unset _colcon_package_bash_COLCON_CURRENT_PREFIX diff --git a/install/chamo/share/chamo/package.dsv b/install/chamo/share/chamo/package.dsv index 1d2b059..e69de29 100644 --- a/install/chamo/share/chamo/package.dsv +++ b/install/chamo/share/chamo/package.dsv @@ -1,6 +0,0 @@ -source;share/chamo/hook/pythonpath.ps1 -source;share/chamo/hook/pythonpath.dsv -source;share/chamo/hook/pythonpath.sh -source;share/chamo/hook/ament_prefix_path.ps1 -source;share/chamo/hook/ament_prefix_path.dsv -source;share/chamo/hook/ament_prefix_path.sh diff --git a/install/chamo/share/chamo/package.ps1 b/install/chamo/share/chamo/package.ps1 index b4df3cd..e69de29 100644 --- a/install/chamo/share/chamo/package.ps1 +++ b/install/chamo/share/chamo/package.ps1 @@ -1,116 +0,0 @@ -# generated from colcon_powershell/shell/template/package.ps1.em - -# function to append a value to a variable -# which uses colons as separators -# duplicates as well as leading separators are avoided -# first argument: the name of the result variable -# second argument: the value to be prepended -function colcon_append_unique_value { - param ( - $_listname, - $_value - ) - - # get values from variable - if (Test-Path Env:$_listname) { - $_values=(Get-Item env:$_listname).Value - } else { - $_values="" - } - $_duplicate="" - # start with no values - $_all_values="" - # iterate over existing values in the variable - if ($_values) { - $_values.Split(";") | ForEach { - # not an empty string - if ($_) { - # not a duplicate of _value - if ($_ -eq $_value) { - $_duplicate="1" - } - if ($_all_values) { - $_all_values="${_all_values};$_" - } else { - $_all_values="$_" - } - } - } - } - # append only non-duplicates - if (!$_duplicate) { - # avoid leading separator - if ($_all_values) { - $_all_values="${_all_values};${_value}" - } else { - $_all_values="${_value}" - } - } - - # export the updated variable - Set-Item env:\$_listname -Value "$_all_values" -} - -# function to prepend a value to a variable -# which uses colons as separators -# duplicates as well as trailing separators are avoided -# first argument: the name of the result variable -# second argument: the value to be prepended -function colcon_prepend_unique_value { - param ( - $_listname, - $_value - ) - - # get values from variable - if (Test-Path Env:$_listname) { - $_values=(Get-Item env:$_listname).Value - } else { - $_values="" - } - # start with the new value - $_all_values="$_value" - # iterate over existing values in the variable - if ($_values) { - $_values.Split(";") | ForEach { - # not an empty string - if ($_) { - # not a duplicate of _value - if ($_ -ne $_value) { - # keep non-duplicate values - $_all_values="${_all_values};$_" - } - } - } - } - # export the updated variable - Set-Item env:\$_listname -Value "$_all_values" -} - -# function to source another script with conditional trace output -# first argument: the path of the script -# additional arguments: arguments to the script -function colcon_package_source_powershell_script { - param ( - $_colcon_package_source_powershell_script - ) - # source script with conditional trace output - if (Test-Path $_colcon_package_source_powershell_script) { - if ($env:COLCON_TRACE) { - echo ". '$_colcon_package_source_powershell_script'" - } - . "$_colcon_package_source_powershell_script" - } else { - Write-Error "not found: '$_colcon_package_source_powershell_script'" - } -} - - -# a powershell script is able to determine its own path -# the prefix is two levels up from the package specific share directory -$env:COLCON_CURRENT_PREFIX=(Get-Item $PSCommandPath).Directory.Parent.Parent.FullName - -colcon_package_source_powershell_script "$env:COLCON_CURRENT_PREFIX\share/chamo/hook/pythonpath.ps1" -colcon_package_source_powershell_script "$env:COLCON_CURRENT_PREFIX\share/chamo/hook/ament_prefix_path.ps1" - -Remove-Item Env:\COLCON_CURRENT_PREFIX diff --git a/install/chamo/share/chamo/package.sh b/install/chamo/share/chamo/package.sh index d258915..e69de29 100644 --- a/install/chamo/share/chamo/package.sh +++ b/install/chamo/share/chamo/package.sh @@ -1,87 +0,0 @@ -# generated from colcon_core/shell/template/package.sh.em - -# This script extends the environment for this package. - -# function to prepend a value to a variable -# which uses colons as separators -# duplicates as well as trailing separators are avoided -# first argument: the name of the result variable -# second argument: the value to be prepended -_colcon_prepend_unique_value() { - # arguments - _listname="$1" - _value="$2" - - # get values from variable - eval _values=\"\$$_listname\" - # backup the field separator - _colcon_prepend_unique_value_IFS=$IFS - IFS=":" - # start with the new value - _all_values="$_value" - # workaround SH_WORD_SPLIT not being set in zsh - if [ "$(command -v colcon_zsh_convert_to_array)" ]; then - colcon_zsh_convert_to_array _values - fi - # iterate over existing values in the variable - for _item in $_values; do - # ignore empty strings - if [ -z "$_item" ]; then - continue - fi - # ignore duplicates of _value - if [ "$_item" = "$_value" ]; then - continue - fi - # keep non-duplicate values - _all_values="$_all_values:$_item" - done - unset _item - # restore the field separator - IFS=$_colcon_prepend_unique_value_IFS - unset _colcon_prepend_unique_value_IFS - # export the updated variable - eval export $_listname=\"$_all_values\" - unset _all_values - unset _values - - unset _value - unset _listname -} - -# since a plain shell script can't determine its own path when being sourced -# either use the provided COLCON_CURRENT_PREFIX -# or fall back to the build time prefix (if it exists) -_colcon_package_sh_COLCON_CURRENT_PREFIX="/home/jackson/chamito/src/install/chamo" -if [ -z "$COLCON_CURRENT_PREFIX" ]; then - if [ ! -d "$_colcon_package_sh_COLCON_CURRENT_PREFIX" ]; then - echo "The build time path \"$_colcon_package_sh_COLCON_CURRENT_PREFIX\" doesn't exist. Either source a script for a different shell or set the environment variable \"COLCON_CURRENT_PREFIX\" explicitly." 1>&2 - unset _colcon_package_sh_COLCON_CURRENT_PREFIX - return 1 - fi - COLCON_CURRENT_PREFIX="$_colcon_package_sh_COLCON_CURRENT_PREFIX" -fi -unset _colcon_package_sh_COLCON_CURRENT_PREFIX - -# function to source another script with conditional trace output -# first argument: the path of the script -# additional arguments: arguments to the script -_colcon_package_sh_source_script() { - if [ -f "$1" ]; then - if [ -n "$COLCON_TRACE" ]; then - echo "# . \"$1\"" - fi - . "$@" - else - echo "not found: \"$1\"" 1>&2 - fi -} - -# source sh hooks -_colcon_package_sh_source_script "$COLCON_CURRENT_PREFIX/share/chamo/hook/pythonpath.sh" -_colcon_package_sh_source_script "$COLCON_CURRENT_PREFIX/share/chamo/hook/ament_prefix_path.sh" - -unset _colcon_package_sh_source_script -unset COLCON_CURRENT_PREFIX - -# do not unset _colcon_prepend_unique_value since it might be used by non-primary shell hooks diff --git a/install/chamo/share/chamo/package.xml b/install/chamo/share/chamo/package.xml index 2498757..e69de29 100644 --- a/install/chamo/share/chamo/package.xml +++ b/install/chamo/share/chamo/package.xml @@ -1,18 +0,0 @@ - - - - chamo - 0.0.0 - TODO: Package description - jackson - TODO: License declaration - - ament_copyright - ament_flake8 - ament_pep257 - python3-pytest - - - ament_python - - diff --git a/install/chamo/share/chamo/package.zsh b/install/chamo/share/chamo/package.zsh index 288e384..e69de29 100644 --- a/install/chamo/share/chamo/package.zsh +++ b/install/chamo/share/chamo/package.zsh @@ -1,42 +0,0 @@ -# generated from colcon_zsh/shell/template/package.zsh.em - -# This script extends the environment for this package. - -# a zsh script is able to determine its own path if necessary -if [ -z "$COLCON_CURRENT_PREFIX" ]; then - # the prefix is two levels up from the package specific share directory - _colcon_package_zsh_COLCON_CURRENT_PREFIX="$(builtin cd -q "`dirname "${(%):-%N}"`/../.." > /dev/null && pwd)" -else - _colcon_package_zsh_COLCON_CURRENT_PREFIX="$COLCON_CURRENT_PREFIX" -fi - -# function to source another script with conditional trace output -# first argument: the path of the script -# additional arguments: arguments to the script -_colcon_package_zsh_source_script() { - if [ -f "$1" ]; then - if [ -n "$COLCON_TRACE" ]; then - echo ". \"$1\"" - fi - . "$@" - else - echo "not found: \"$1\"" 1>&2 - fi -} - -# function to convert array-like strings into arrays -# to workaround SH_WORD_SPLIT not being set -colcon_zsh_convert_to_array() { - local _listname=$1 - local _dollar="$" - local _split="{=" - local _to_array="(\"$_dollar$_split$_listname}\")" - eval $_listname=$_to_array -} - -# source sh script of this package -_colcon_package_zsh_source_script "$_colcon_package_zsh_COLCON_CURRENT_PREFIX/share/chamo/package.sh" -unset convert_zsh_to_array - -unset _colcon_package_zsh_source_script -unset _colcon_package_zsh_COLCON_CURRENT_PREFIX diff --git a/install/local_setup.bash b/install/local_setup.bash index efd5f8c..e69de29 100644 --- a/install/local_setup.bash +++ b/install/local_setup.bash @@ -1,107 +0,0 @@ -# generated from colcon_bash/shell/template/prefix.bash.em - -# This script extends the environment with all packages contained in this -# prefix path. - -# a bash script is able to determine its own path if necessary -if [ -z "$COLCON_CURRENT_PREFIX" ]; then - _colcon_prefix_bash_COLCON_CURRENT_PREFIX="$(builtin cd "`dirname "${BASH_SOURCE[0]}"`" > /dev/null && pwd)" -else - _colcon_prefix_bash_COLCON_CURRENT_PREFIX="$COLCON_CURRENT_PREFIX" -fi - -# function to prepend a value to a variable -# which uses colons as separators -# duplicates as well as trailing separators are avoided -# first argument: the name of the result variable -# second argument: the value to be prepended -_colcon_prefix_bash_prepend_unique_value() { - # arguments - _listname="$1" - _value="$2" - - # get values from variable - eval _values=\"\$$_listname\" - # backup the field separator - _colcon_prefix_bash_prepend_unique_value_IFS="$IFS" - IFS=":" - # start with the new value - _all_values="$_value" - # iterate over existing values in the variable - for _item in $_values; do - # ignore empty strings - if [ -z "$_item" ]; then - continue - fi - # ignore duplicates of _value - if [ "$_item" = "$_value" ]; then - continue - fi - # keep non-duplicate values - _all_values="$_all_values:$_item" - done - unset _item - # restore the field separator - IFS="$_colcon_prefix_bash_prepend_unique_value_IFS" - unset _colcon_prefix_bash_prepend_unique_value_IFS - # export the updated variable - eval export $_listname=\"$_all_values\" - unset _all_values - unset _values - - unset _value - unset _listname -} - -# add this prefix to the COLCON_PREFIX_PATH -_colcon_prefix_bash_prepend_unique_value COLCON_PREFIX_PATH "$_colcon_prefix_bash_COLCON_CURRENT_PREFIX" -unset _colcon_prefix_bash_prepend_unique_value - -# check environment variable for custom Python executable -if [ -n "$COLCON_PYTHON_EXECUTABLE" ]; then - if [ ! -f "$COLCON_PYTHON_EXECUTABLE" ]; then - echo "error: COLCON_PYTHON_EXECUTABLE '$COLCON_PYTHON_EXECUTABLE' doesn't exist" - return 1 - fi - _colcon_python_executable="$COLCON_PYTHON_EXECUTABLE" -else - # try the Python executable known at configure time - _colcon_python_executable="/usr/bin/python3" - # if it doesn't exist try a fall back - if [ ! -f "$_colcon_python_executable" ]; then - if ! /usr/bin/env python3 --version > /dev/null 2> /dev/null; then - echo "error: unable to find python3 executable" - return 1 - fi - _colcon_python_executable=`/usr/bin/env python3 -c "import sys; print(sys.executable)"` - fi -fi - -# function to source another script with conditional trace output -# first argument: the path of the script -_colcon_prefix_sh_source_script() { - if [ -f "$1" ]; then - if [ -n "$COLCON_TRACE" ]; then - echo ". \"$1\"" - fi - . "$1" - else - echo "not found: \"$1\"" 1>&2 - fi -} - -# get all commands in topological order -_colcon_ordered_commands="$($_colcon_python_executable "$_colcon_prefix_bash_COLCON_CURRENT_PREFIX/_local_setup_util_sh.py" sh bash)" -unset _colcon_python_executable -if [ -n "$COLCON_TRACE" ]; then - echo "Execute generated script:" - echo "<<<" - echo "${_colcon_ordered_commands}" - echo ">>>" -fi -eval "${_colcon_ordered_commands}" -unset _colcon_ordered_commands - -unset _colcon_prefix_sh_source_script - -unset _colcon_prefix_bash_COLCON_CURRENT_PREFIX diff --git a/install/local_setup.ps1 b/install/local_setup.ps1 index 6f68c8d..e69de29 100644 --- a/install/local_setup.ps1 +++ b/install/local_setup.ps1 @@ -1,55 +0,0 @@ -# generated from colcon_powershell/shell/template/prefix.ps1.em - -# This script extends the environment with all packages contained in this -# prefix path. - -# check environment variable for custom Python executable -if ($env:COLCON_PYTHON_EXECUTABLE) { - if (!(Test-Path "$env:COLCON_PYTHON_EXECUTABLE" -PathType Leaf)) { - echo "error: COLCON_PYTHON_EXECUTABLE '$env:COLCON_PYTHON_EXECUTABLE' doesn't exist" - exit 1 - } - $_colcon_python_executable="$env:COLCON_PYTHON_EXECUTABLE" -} else { - # use the Python executable known at configure time - $_colcon_python_executable="/usr/bin/python3" - # if it doesn't exist try a fall back - if (!(Test-Path "$_colcon_python_executable" -PathType Leaf)) { - if (!(Get-Command "python3" -ErrorAction SilentlyContinue)) { - echo "error: unable to find python3 executable" - exit 1 - } - $_colcon_python_executable="python3" - } -} - -# function to source another script with conditional trace output -# first argument: the path of the script -function _colcon_prefix_powershell_source_script { - param ( - $_colcon_prefix_powershell_source_script_param - ) - # source script with conditional trace output - if (Test-Path $_colcon_prefix_powershell_source_script_param) { - if ($env:COLCON_TRACE) { - echo ". '$_colcon_prefix_powershell_source_script_param'" - } - . "$_colcon_prefix_powershell_source_script_param" - } else { - Write-Error "not found: '$_colcon_prefix_powershell_source_script_param'" - } -} - -# get all commands in topological order -$_colcon_ordered_commands = & "$_colcon_python_executable" "$(Split-Path $PSCommandPath -Parent)/_local_setup_util_ps1.py" ps1 - -# execute all commands in topological order -if ($env:COLCON_TRACE) { - echo "Execute generated script:" - echo "<<<" - $_colcon_ordered_commands.Split([Environment]::NewLine, [StringSplitOptions]::RemoveEmptyEntries) | Write-Output - echo ">>>" -} -if ($_colcon_ordered_commands) { - $_colcon_ordered_commands.Split([Environment]::NewLine, [StringSplitOptions]::RemoveEmptyEntries) | Invoke-Expression -} diff --git a/install/local_setup.sh b/install/local_setup.sh index 9025d40..e69de29 100644 --- a/install/local_setup.sh +++ b/install/local_setup.sh @@ -1,137 +0,0 @@ -# generated from colcon_core/shell/template/prefix.sh.em - -# This script extends the environment with all packages contained in this -# prefix path. - -# since a plain shell script can't determine its own path when being sourced -# either use the provided COLCON_CURRENT_PREFIX -# or fall back to the build time prefix (if it exists) -_colcon_prefix_sh_COLCON_CURRENT_PREFIX="/home/jackson/chamito/src/install" -if [ -z "$COLCON_CURRENT_PREFIX" ]; then - if [ ! -d "$_colcon_prefix_sh_COLCON_CURRENT_PREFIX" ]; then - echo "The build time path \"$_colcon_prefix_sh_COLCON_CURRENT_PREFIX\" doesn't exist. Either source a script for a different shell or set the environment variable \"COLCON_CURRENT_PREFIX\" explicitly." 1>&2 - unset _colcon_prefix_sh_COLCON_CURRENT_PREFIX - return 1 - fi -else - _colcon_prefix_sh_COLCON_CURRENT_PREFIX="$COLCON_CURRENT_PREFIX" -fi - -# function to prepend a value to a variable -# which uses colons as separators -# duplicates as well as trailing separators are avoided -# first argument: the name of the result variable -# second argument: the value to be prepended -_colcon_prefix_sh_prepend_unique_value() { - # arguments - _listname="$1" - _value="$2" - - # get values from variable - eval _values=\"\$$_listname\" - # backup the field separator - _colcon_prefix_sh_prepend_unique_value_IFS="$IFS" - IFS=":" - # start with the new value - _all_values="$_value" - _contained_value="" - # iterate over existing values in the variable - for _item in $_values; do - # ignore empty strings - if [ -z "$_item" ]; then - continue - fi - # ignore duplicates of _value - if [ "$_item" = "$_value" ]; then - _contained_value=1 - continue - fi - # keep non-duplicate values - _all_values="$_all_values:$_item" - done - unset _item - if [ -z "$_contained_value" ]; then - if [ -n "$COLCON_TRACE" ]; then - if [ "$_all_values" = "$_value" ]; then - echo "export $_listname=$_value" - else - echo "export $_listname=$_value:\$$_listname" - fi - fi - fi - unset _contained_value - # restore the field separator - IFS="$_colcon_prefix_sh_prepend_unique_value_IFS" - unset _colcon_prefix_sh_prepend_unique_value_IFS - # export the updated variable - eval export $_listname=\"$_all_values\" - unset _all_values - unset _values - - unset _value - unset _listname -} - -# add this prefix to the COLCON_PREFIX_PATH -_colcon_prefix_sh_prepend_unique_value COLCON_PREFIX_PATH "$_colcon_prefix_sh_COLCON_CURRENT_PREFIX" -unset _colcon_prefix_sh_prepend_unique_value - -# check environment variable for custom Python executable -if [ -n "$COLCON_PYTHON_EXECUTABLE" ]; then - if [ ! -f "$COLCON_PYTHON_EXECUTABLE" ]; then - echo "error: COLCON_PYTHON_EXECUTABLE '$COLCON_PYTHON_EXECUTABLE' doesn't exist" - return 1 - fi - _colcon_python_executable="$COLCON_PYTHON_EXECUTABLE" -else - # try the Python executable known at configure time - _colcon_python_executable="/usr/bin/python3" - # if it doesn't exist try a fall back - if [ ! -f "$_colcon_python_executable" ]; then - if ! /usr/bin/env python3 --version > /dev/null 2> /dev/null; then - echo "error: unable to find python3 executable" - return 1 - fi - _colcon_python_executable=`/usr/bin/env python3 -c "import sys; print(sys.executable)"` - fi -fi - -# function to source another script with conditional trace output -# first argument: the path of the script -_colcon_prefix_sh_source_script() { - if [ -f "$1" ]; then - if [ -n "$COLCON_TRACE" ]; then - echo "# . \"$1\"" - fi - . "$1" - else - echo "not found: \"$1\"" 1>&2 - fi -} - -# get all commands in topological order -_colcon_ordered_commands="$($_colcon_python_executable "$_colcon_prefix_sh_COLCON_CURRENT_PREFIX/_local_setup_util_sh.py" sh)" -unset _colcon_python_executable -if [ -n "$COLCON_TRACE" ]; then - echo "_colcon_prefix_sh_source_script() { - if [ -f \"\$1\" ]; then - if [ -n \"\$COLCON_TRACE\" ]; then - echo \"# . \\\"\$1\\\"\" - fi - . \"\$1\" - else - echo \"not found: \\\"\$1\\\"\" 1>&2 - fi - }" - echo "# Execute generated script:" - echo "# <<<" - echo "${_colcon_ordered_commands}" - echo "# >>>" - echo "unset _colcon_prefix_sh_source_script" -fi -eval "${_colcon_ordered_commands}" -unset _colcon_ordered_commands - -unset _colcon_prefix_sh_source_script - -unset _colcon_prefix_sh_COLCON_CURRENT_PREFIX diff --git a/install/local_setup.zsh b/install/local_setup.zsh index f7a8d90..e69de29 100644 --- a/install/local_setup.zsh +++ b/install/local_setup.zsh @@ -1,120 +0,0 @@ -# generated from colcon_zsh/shell/template/prefix.zsh.em - -# This script extends the environment with all packages contained in this -# prefix path. - -# a zsh script is able to determine its own path if necessary -if [ -z "$COLCON_CURRENT_PREFIX" ]; then - _colcon_prefix_zsh_COLCON_CURRENT_PREFIX="$(builtin cd -q "`dirname "${(%):-%N}"`" > /dev/null && pwd)" -else - _colcon_prefix_zsh_COLCON_CURRENT_PREFIX="$COLCON_CURRENT_PREFIX" -fi - -# function to convert array-like strings into arrays -# to workaround SH_WORD_SPLIT not being set -_colcon_prefix_zsh_convert_to_array() { - local _listname=$1 - local _dollar="$" - local _split="{=" - local _to_array="(\"$_dollar$_split$_listname}\")" - eval $_listname=$_to_array -} - -# function to prepend a value to a variable -# which uses colons as separators -# duplicates as well as trailing separators are avoided -# first argument: the name of the result variable -# second argument: the value to be prepended -_colcon_prefix_zsh_prepend_unique_value() { - # arguments - _listname="$1" - _value="$2" - - # get values from variable - eval _values=\"\$$_listname\" - # backup the field separator - _colcon_prefix_zsh_prepend_unique_value_IFS="$IFS" - IFS=":" - # start with the new value - _all_values="$_value" - # workaround SH_WORD_SPLIT not being set - _colcon_prefix_zsh_convert_to_array _values - # iterate over existing values in the variable - for _item in $_values; do - # ignore empty strings - if [ -z "$_item" ]; then - continue - fi - # ignore duplicates of _value - if [ "$_item" = "$_value" ]; then - continue - fi - # keep non-duplicate values - _all_values="$_all_values:$_item" - done - unset _item - # restore the field separator - IFS="$_colcon_prefix_zsh_prepend_unique_value_IFS" - unset _colcon_prefix_zsh_prepend_unique_value_IFS - # export the updated variable - eval export $_listname=\"$_all_values\" - unset _all_values - unset _values - - unset _value - unset _listname -} - -# add this prefix to the COLCON_PREFIX_PATH -_colcon_prefix_zsh_prepend_unique_value COLCON_PREFIX_PATH "$_colcon_prefix_zsh_COLCON_CURRENT_PREFIX" -unset _colcon_prefix_zsh_prepend_unique_value -unset _colcon_prefix_zsh_convert_to_array - -# check environment variable for custom Python executable -if [ -n "$COLCON_PYTHON_EXECUTABLE" ]; then - if [ ! -f "$COLCON_PYTHON_EXECUTABLE" ]; then - echo "error: COLCON_PYTHON_EXECUTABLE '$COLCON_PYTHON_EXECUTABLE' doesn't exist" - return 1 - fi - _colcon_python_executable="$COLCON_PYTHON_EXECUTABLE" -else - # try the Python executable known at configure time - _colcon_python_executable="/usr/bin/python3" - # if it doesn't exist try a fall back - if [ ! -f "$_colcon_python_executable" ]; then - if ! /usr/bin/env python3 --version > /dev/null 2> /dev/null; then - echo "error: unable to find python3 executable" - return 1 - fi - _colcon_python_executable=`/usr/bin/env python3 -c "import sys; print(sys.executable)"` - fi -fi - -# function to source another script with conditional trace output -# first argument: the path of the script -_colcon_prefix_sh_source_script() { - if [ -f "$1" ]; then - if [ -n "$COLCON_TRACE" ]; then - echo ". \"$1\"" - fi - . "$1" - else - echo "not found: \"$1\"" 1>&2 - fi -} - -# get all commands in topological order -_colcon_ordered_commands="$($_colcon_python_executable "$_colcon_prefix_zsh_COLCON_CURRENT_PREFIX/_local_setup_util_sh.py" sh zsh)" -unset _colcon_python_executable -if [ -n "$COLCON_TRACE" ]; then - echo "Execute generated script:" - echo "<<<" - echo "${_colcon_ordered_commands}" - echo ">>>" -fi -eval "${_colcon_ordered_commands}" -unset _colcon_ordered_commands - -unset _colcon_prefix_sh_source_script - -unset _colcon_prefix_zsh_COLCON_CURRENT_PREFIX diff --git a/install/lolito/share/ament_index/resource_index/package_run_dependencies/lolito b/install/lolito/share/ament_index/resource_index/package_run_dependencies/lolito index 86cf3ee..e69de29 100644 --- a/install/lolito/share/ament_index/resource_index/package_run_dependencies/lolito +++ b/install/lolito/share/ament_index/resource_index/package_run_dependencies/lolito @@ -1 +0,0 @@ -rclpy;std_msgs;ament_lint_auto;ament_lint_common \ No newline at end of file diff --git a/install/lolito/share/ament_index/resource_index/parent_prefix_path/lolito b/install/lolito/share/ament_index/resource_index/parent_prefix_path/lolito index 8f3e2f5..e69de29 100644 --- a/install/lolito/share/ament_index/resource_index/parent_prefix_path/lolito +++ b/install/lolito/share/ament_index/resource_index/parent_prefix_path/lolito @@ -1 +0,0 @@ -/opt/ros/foxy \ No newline at end of file diff --git a/install/lolito/share/colcon-core/packages/lolito b/install/lolito/share/colcon-core/packages/lolito index de58d89..e69de29 100644 --- a/install/lolito/share/colcon-core/packages/lolito +++ b/install/lolito/share/colcon-core/packages/lolito @@ -1 +0,0 @@ -rclpy:std_msgs \ No newline at end of file diff --git a/install/lolito/share/lolito/cmake/lolitoConfig-version.cmake b/install/lolito/share/lolito/cmake/lolitoConfig-version.cmake index 7beb732..e69de29 100644 --- a/install/lolito/share/lolito/cmake/lolitoConfig-version.cmake +++ b/install/lolito/share/lolito/cmake/lolitoConfig-version.cmake @@ -1,14 +0,0 @@ -# generated from ament/cmake/core/templates/nameConfig-version.cmake.in -set(PACKAGE_VERSION "0.0.0") - -set(PACKAGE_VERSION_EXACT False) -set(PACKAGE_VERSION_COMPATIBLE False) - -if("${PACKAGE_FIND_VERSION}" VERSION_EQUAL "${PACKAGE_VERSION}") - set(PACKAGE_VERSION_EXACT True) - set(PACKAGE_VERSION_COMPATIBLE True) -endif() - -if("${PACKAGE_FIND_VERSION}" VERSION_LESS "${PACKAGE_VERSION}") - set(PACKAGE_VERSION_COMPATIBLE True) -endif() diff --git a/install/lolito/share/lolito/cmake/lolitoConfig.cmake b/install/lolito/share/lolito/cmake/lolitoConfig.cmake index 54c0bd7..e69de29 100644 --- a/install/lolito/share/lolito/cmake/lolitoConfig.cmake +++ b/install/lolito/share/lolito/cmake/lolitoConfig.cmake @@ -1,42 +0,0 @@ -# generated from ament/cmake/core/templates/nameConfig.cmake.in - -# prevent multiple inclusion -if(_lolito_CONFIG_INCLUDED) - # ensure to keep the found flag the same - if(NOT DEFINED lolito_FOUND) - # explicitly set it to FALSE, otherwise CMake will set it to TRUE - set(lolito_FOUND FALSE) - elseif(NOT lolito_FOUND) - # use separate condition to avoid uninitialized variable warning - set(lolito_FOUND FALSE) - endif() - return() -endif() -set(_lolito_CONFIG_INCLUDED TRUE) - -# output package information -if(NOT lolito_FIND_QUIETLY) - message(STATUS "Found lolito: 0.0.0 (${lolito_DIR})") -endif() - -# warn when using a deprecated package -if(NOT "" STREQUAL "") - set(_msg "Package 'lolito' is deprecated") - # append custom deprecation text if available - if(NOT "" STREQUAL "TRUE") - set(_msg "${_msg} ()") - endif() - # optionally quiet the deprecation message - if(NOT ${lolito_DEPRECATED_QUIET}) - message(DEPRECATION "${_msg}") - endif() -endif() - -# flag package as ament-based to distinguish it after being find_package()-ed -set(lolito_FOUND_AMENT_PACKAGE TRUE) - -# include all config extra files -set(_extras "") -foreach(_extra ${_extras}) - include("${lolito_DIR}/${_extra}") -endforeach() diff --git a/install/lolito/share/lolito/environment/ament_prefix_path.dsv b/install/lolito/share/lolito/environment/ament_prefix_path.dsv index 79d4c95..e69de29 100644 --- a/install/lolito/share/lolito/environment/ament_prefix_path.dsv +++ b/install/lolito/share/lolito/environment/ament_prefix_path.dsv @@ -1 +0,0 @@ -prepend-non-duplicate;AMENT_PREFIX_PATH; diff --git a/install/lolito/share/lolito/environment/ament_prefix_path.sh b/install/lolito/share/lolito/environment/ament_prefix_path.sh index 02e441b..e69de29 100644 --- a/install/lolito/share/lolito/environment/ament_prefix_path.sh +++ b/install/lolito/share/lolito/environment/ament_prefix_path.sh @@ -1,4 +0,0 @@ -# copied from -# ament_cmake_core/cmake/environment_hooks/environment/ament_prefix_path.sh - -ament_prepend_unique_value AMENT_PREFIX_PATH "$AMENT_CURRENT_PREFIX" diff --git a/install/lolito/share/lolito/environment/path.dsv b/install/lolito/share/lolito/environment/path.dsv index b94426a..e69de29 100644 --- a/install/lolito/share/lolito/environment/path.dsv +++ b/install/lolito/share/lolito/environment/path.dsv @@ -1 +0,0 @@ -prepend-non-duplicate-if-exists;PATH;bin diff --git a/install/lolito/share/lolito/environment/path.sh b/install/lolito/share/lolito/environment/path.sh index e59b749..e69de29 100644 --- a/install/lolito/share/lolito/environment/path.sh +++ b/install/lolito/share/lolito/environment/path.sh @@ -1,5 +0,0 @@ -# copied from ament_cmake_core/cmake/environment_hooks/environment/path.sh - -if [ -d "$AMENT_CURRENT_PREFIX/bin" ]; then - ament_prepend_unique_value PATH "$AMENT_CURRENT_PREFIX/bin" -fi diff --git a/install/lolito/share/lolito/environment/pythonpath.dsv b/install/lolito/share/lolito/environment/pythonpath.dsv index 84dbc4c..e69de29 100644 --- a/install/lolito/share/lolito/environment/pythonpath.dsv +++ b/install/lolito/share/lolito/environment/pythonpath.dsv @@ -1 +0,0 @@ -prepend-non-duplicate;PYTHONPATH;lib/python3.8/site-packages diff --git a/install/lolito/share/lolito/environment/pythonpath.sh b/install/lolito/share/lolito/environment/pythonpath.sh index 7fe2b2f..e69de29 100644 --- a/install/lolito/share/lolito/environment/pythonpath.sh +++ b/install/lolito/share/lolito/environment/pythonpath.sh @@ -1,3 +0,0 @@ -# generated from ament_package/template/environment_hook/pythonpath.sh.in - -ament_prepend_unique_value PYTHONPATH "$AMENT_CURRENT_PREFIX/lib/python3.8/site-packages" diff --git a/install/lolito/share/lolito/hook/cmake_prefix_path.dsv b/install/lolito/share/lolito/hook/cmake_prefix_path.dsv index e119f32..e69de29 100644 --- a/install/lolito/share/lolito/hook/cmake_prefix_path.dsv +++ b/install/lolito/share/lolito/hook/cmake_prefix_path.dsv @@ -1 +0,0 @@ -prepend-non-duplicate;CMAKE_PREFIX_PATH; diff --git a/install/lolito/share/lolito/hook/cmake_prefix_path.ps1 b/install/lolito/share/lolito/hook/cmake_prefix_path.ps1 index d03facc..e69de29 100644 --- a/install/lolito/share/lolito/hook/cmake_prefix_path.ps1 +++ b/install/lolito/share/lolito/hook/cmake_prefix_path.ps1 @@ -1,3 +0,0 @@ -# generated from colcon_powershell/shell/template/hook_prepend_value.ps1.em - -colcon_prepend_unique_value CMAKE_PREFIX_PATH "$env:COLCON_CURRENT_PREFIX" diff --git a/install/lolito/share/lolito/hook/cmake_prefix_path.sh b/install/lolito/share/lolito/hook/cmake_prefix_path.sh index a948e68..e69de29 100644 --- a/install/lolito/share/lolito/hook/cmake_prefix_path.sh +++ b/install/lolito/share/lolito/hook/cmake_prefix_path.sh @@ -1,3 +0,0 @@ -# generated from colcon_core/shell/template/hook_prepend_value.sh.em - -_colcon_prepend_unique_value CMAKE_PREFIX_PATH "$COLCON_CURRENT_PREFIX" diff --git a/install/lolito/share/lolito/hook/pythonpath.dsv b/install/lolito/share/lolito/hook/pythonpath.dsv index 84dbc4c..e69de29 100644 --- a/install/lolito/share/lolito/hook/pythonpath.dsv +++ b/install/lolito/share/lolito/hook/pythonpath.dsv @@ -1 +0,0 @@ -prepend-non-duplicate;PYTHONPATH;lib/python3.8/site-packages diff --git a/install/lolito/share/lolito/hook/pythonpath.ps1 b/install/lolito/share/lolito/hook/pythonpath.ps1 index 12877ef..e69de29 100644 --- a/install/lolito/share/lolito/hook/pythonpath.ps1 +++ b/install/lolito/share/lolito/hook/pythonpath.ps1 @@ -1,3 +0,0 @@ -# generated from colcon_powershell/shell/template/hook_prepend_value.ps1.em - -colcon_prepend_unique_value PYTHONPATH "$env:COLCON_CURRENT_PREFIX\lib/python3.8/site-packages" diff --git a/install/lolito/share/lolito/hook/pythonpath.sh b/install/lolito/share/lolito/hook/pythonpath.sh index ed8efd9..e69de29 100644 --- a/install/lolito/share/lolito/hook/pythonpath.sh +++ b/install/lolito/share/lolito/hook/pythonpath.sh @@ -1,3 +0,0 @@ -# generated from colcon_core/shell/template/hook_prepend_value.sh.em - -_colcon_prepend_unique_value PYTHONPATH "$COLCON_CURRENT_PREFIX/lib/python3.8/site-packages" diff --git a/install/lolito/share/lolito/local_setup.bash b/install/lolito/share/lolito/local_setup.bash index 49782f2..e69de29 100644 --- a/install/lolito/share/lolito/local_setup.bash +++ b/install/lolito/share/lolito/local_setup.bash @@ -1,46 +0,0 @@ -# generated from ament_package/template/package_level/local_setup.bash.in - -# source local_setup.sh from same directory as this file -_this_path=$(builtin cd "`dirname "${BASH_SOURCE[0]}"`" && pwd) -# provide AMENT_CURRENT_PREFIX to shell script -AMENT_CURRENT_PREFIX=$(builtin cd "`dirname "${BASH_SOURCE[0]}"`/../.." && pwd) -# store AMENT_CURRENT_PREFIX to restore it before each environment hook -_package_local_setup_AMENT_CURRENT_PREFIX=$AMENT_CURRENT_PREFIX - -# trace output -if [ -n "$AMENT_TRACE_SETUP_FILES" ]; then - echo "# . \"$_this_path/local_setup.sh\"" -fi -. "$_this_path/local_setup.sh" -unset _this_path - -# unset AMENT_ENVIRONMENT_HOOKS -# if not appending to them for return -if [ -z "$AMENT_RETURN_ENVIRONMENT_HOOKS" ]; then - unset AMENT_ENVIRONMENT_HOOKS -fi - -# restore AMENT_CURRENT_PREFIX before evaluating the environment hooks -AMENT_CURRENT_PREFIX=$_package_local_setup_AMENT_CURRENT_PREFIX -# list all environment hooks of this package - -# source all shell-specific environment hooks of this package -# if not returning them -if [ -z "$AMENT_RETURN_ENVIRONMENT_HOOKS" ]; then - _package_local_setup_IFS=$IFS - IFS=":" - for _hook in $AMENT_ENVIRONMENT_HOOKS; do - # restore AMENT_CURRENT_PREFIX for each environment hook - AMENT_CURRENT_PREFIX=$_package_local_setup_AMENT_CURRENT_PREFIX - # restore IFS before sourcing other files - IFS=$_package_local_setup_IFS - . "$_hook" - done - unset _hook - IFS=$_package_local_setup_IFS - unset _package_local_setup_IFS - unset AMENT_ENVIRONMENT_HOOKS -fi - -unset _package_local_setup_AMENT_CURRENT_PREFIX -unset AMENT_CURRENT_PREFIX diff --git a/install/lolito/share/lolito/local_setup.dsv b/install/lolito/share/lolito/local_setup.dsv index fae34cf..e69de29 100644 --- a/install/lolito/share/lolito/local_setup.dsv +++ b/install/lolito/share/lolito/local_setup.dsv @@ -1,3 +0,0 @@ -source;share/lolito/environment/ament_prefix_path.sh -source;share/lolito/environment/path.sh -source;share/lolito/environment/pythonpath.sh diff --git a/install/lolito/share/lolito/local_setup.sh b/install/lolito/share/lolito/local_setup.sh index 8de50c0..e69de29 100644 --- a/install/lolito/share/lolito/local_setup.sh +++ b/install/lolito/share/lolito/local_setup.sh @@ -1,134 +0,0 @@ -# generated from ament_package/template/package_level/local_setup.sh.in - -# since this file is sourced use either the provided AMENT_CURRENT_PREFIX -# or fall back to the destination set at configure time -: ${AMENT_CURRENT_PREFIX:="/home/jackson/chamito/src/install/lolito"} -if [ ! -d "$AMENT_CURRENT_PREFIX" ]; then - if [ -z "$COLCON_CURRENT_PREFIX" ]; then - echo "The compile time prefix path '$AMENT_CURRENT_PREFIX' doesn't " \ - "exist. Consider sourcing a different extension than '.sh'." 1>&2 - else - AMENT_CURRENT_PREFIX="$COLCON_CURRENT_PREFIX" - fi -fi - -# function to append values to environment variables -# using colons as separators and avoiding leading separators -ament_append_value() { - # arguments - _listname="$1" - _value="$2" - #echo "listname $_listname" - #eval echo "list value \$$_listname" - #echo "value $_value" - - # avoid leading separator - eval _values=\"\$$_listname\" - if [ -z "$_values" ]; then - eval export $_listname=\"$_value\" - #eval echo "set list \$$_listname" - else - # field separator must not be a colon - _ament_append_value_IFS=$IFS - unset IFS - eval export $_listname=\"\$$_listname:$_value\" - #eval echo "append list \$$_listname" - IFS=$_ament_append_value_IFS - unset _ament_append_value_IFS - fi - unset _values - - unset _value - unset _listname -} - -# function to prepend non-duplicate values to environment variables -# using colons as separators and avoiding trailing separators -ament_prepend_unique_value() { - # arguments - _listname="$1" - _value="$2" - #echo "listname $_listname" - #eval echo "list value \$$_listname" - #echo "value $_value" - - # check if the list contains the value - eval _values=\"\$$_listname\" - _duplicate= - _ament_prepend_unique_value_IFS=$IFS - IFS=":" - if [ "$AMENT_SHELL" = "zsh" ]; then - ament_zsh_to_array _values - fi - for _item in $_values; do - # ignore empty strings - if [ -z "$_item" ]; then - continue - fi - if [ "$_item" = "$_value" ]; then - _duplicate=1 - fi - done - unset _item - - # prepend only non-duplicates - if [ -z "$_duplicate" ]; then - # avoid trailing separator - if [ -z "$_values" ]; then - eval export $_listname=\"$_value\" - #eval echo "set list \$$_listname" - else - # field separator must not be a colon - unset IFS - eval export $_listname=\"$_value:\$$_listname\" - #eval echo "prepend list \$$_listname" - fi - fi - IFS=$_ament_prepend_unique_value_IFS - unset _ament_prepend_unique_value_IFS - unset _duplicate - unset _values - - unset _value - unset _listname -} - -# unset AMENT_ENVIRONMENT_HOOKS -# if not appending to them for return -if [ -z "$AMENT_RETURN_ENVIRONMENT_HOOKS" ]; then - unset AMENT_ENVIRONMENT_HOOKS -fi - -# list all environment hooks of this package -ament_append_value AMENT_ENVIRONMENT_HOOKS "$AMENT_CURRENT_PREFIX/share/lolito/environment/ament_prefix_path.sh" -ament_append_value AMENT_ENVIRONMENT_HOOKS "$AMENT_CURRENT_PREFIX/share/lolito/environment/path.sh" -ament_append_value AMENT_ENVIRONMENT_HOOKS "$AMENT_CURRENT_PREFIX/share/lolito/environment/pythonpath.sh" - -# source all shell-specific environment hooks of this package -# if not returning them -if [ -z "$AMENT_RETURN_ENVIRONMENT_HOOKS" ]; then - _package_local_setup_IFS=$IFS - IFS=":" - if [ "$AMENT_SHELL" = "zsh" ]; then - ament_zsh_to_array AMENT_ENVIRONMENT_HOOKS - fi - for _hook in $AMENT_ENVIRONMENT_HOOKS; do - if [ -f "$_hook" ]; then - # restore IFS before sourcing other files - IFS=$_package_local_setup_IFS - # trace output - if [ -n "$AMENT_TRACE_SETUP_FILES" ]; then - echo "# . \"$_hook\"" - fi - . "$_hook" - fi - done - unset _hook - IFS=$_package_local_setup_IFS - unset _package_local_setup_IFS - unset AMENT_ENVIRONMENT_HOOKS -fi - -# reset AMENT_CURRENT_PREFIX after each package -# allowing to source multiple package-level setup files -unset AMENT_CURRENT_PREFIX diff --git a/install/lolito/share/lolito/local_setup.zsh b/install/lolito/share/lolito/local_setup.zsh index fe161be..e69de29 100644 --- a/install/lolito/share/lolito/local_setup.zsh +++ b/install/lolito/share/lolito/local_setup.zsh @@ -1,59 +0,0 @@ -# generated from ament_package/template/package_level/local_setup.zsh.in - -AMENT_SHELL=zsh - -# source local_setup.sh from same directory as this file -_this_path=$(builtin cd -q "`dirname "${(%):-%N}"`" > /dev/null && pwd) -# provide AMENT_CURRENT_PREFIX to shell script -AMENT_CURRENT_PREFIX=$(builtin cd -q "`dirname "${(%):-%N}"`/../.." > /dev/null && pwd) -# store AMENT_CURRENT_PREFIX to restore it before each environment hook -_package_local_setup_AMENT_CURRENT_PREFIX=$AMENT_CURRENT_PREFIX - -# function to convert array-like strings into arrays -# to wordaround SH_WORD_SPLIT not being set -ament_zsh_to_array() { - local _listname=$1 - local _dollar="$" - local _split="{=" - local _to_array="(\"$_dollar$_split$_listname}\")" - eval $_listname=$_to_array -} - -# trace output -if [ -n "$AMENT_TRACE_SETUP_FILES" ]; then - echo "# . \"$_this_path/local_setup.sh\"" -fi -# the package-level local_setup file unsets AMENT_CURRENT_PREFIX -. "$_this_path/local_setup.sh" -unset _this_path - -# unset AMENT_ENVIRONMENT_HOOKS -# if not appending to them for return -if [ -z "$AMENT_RETURN_ENVIRONMENT_HOOKS" ]; then - unset AMENT_ENVIRONMENT_HOOKS -fi - -# restore AMENT_CURRENT_PREFIX before evaluating the environment hooks -AMENT_CURRENT_PREFIX=$_package_local_setup_AMENT_CURRENT_PREFIX -# list all environment hooks of this package - -# source all shell-specific environment hooks of this package -# if not returning them -if [ -z "$AMENT_RETURN_ENVIRONMENT_HOOKS" ]; then - _package_local_setup_IFS=$IFS - IFS=":" - for _hook in $AMENT_ENVIRONMENT_HOOKS; do - # restore AMENT_CURRENT_PREFIX for each environment hook - AMENT_CURRENT_PREFIX=$_package_local_setup_AMENT_CURRENT_PREFIX - # restore IFS before sourcing other files - IFS=$_package_local_setup_IFS - . "$_hook" - done - unset _hook - IFS=$_package_local_setup_IFS - unset _package_local_setup_IFS - unset AMENT_ENVIRONMENT_HOOKS -fi - -unset _package_local_setup_AMENT_CURRENT_PREFIX -unset AMENT_CURRENT_PREFIX diff --git a/install/lolito/share/lolito/package.bash b/install/lolito/share/lolito/package.bash index bba3f4c..e69de29 100644 --- a/install/lolito/share/lolito/package.bash +++ b/install/lolito/share/lolito/package.bash @@ -1,39 +0,0 @@ -# generated from colcon_bash/shell/template/package.bash.em - -# This script extends the environment for this package. - -# a bash script is able to determine its own path if necessary -if [ -z "$COLCON_CURRENT_PREFIX" ]; then - # the prefix is two levels up from the package specific share directory - _colcon_package_bash_COLCON_CURRENT_PREFIX="$(builtin cd "`dirname "${BASH_SOURCE[0]}"`/../.." > /dev/null && pwd)" -else - _colcon_package_bash_COLCON_CURRENT_PREFIX="$COLCON_CURRENT_PREFIX" -fi - -# function to source another script with conditional trace output -# first argument: the path of the script -# additional arguments: arguments to the script -_colcon_package_bash_source_script() { - if [ -f "$1" ]; then - if [ -n "$COLCON_TRACE" ]; then - echo ". \"$1\"" - fi - . "$@" - else - echo "not found: \"$1\"" 1>&2 - fi -} - -# source sh script of this package -_colcon_package_bash_source_script "$_colcon_package_bash_COLCON_CURRENT_PREFIX/share/lolito/package.sh" - -# setting COLCON_CURRENT_PREFIX avoids determining the prefix in the sourced scripts -COLCON_CURRENT_PREFIX="$_colcon_package_bash_COLCON_CURRENT_PREFIX" - -# source bash hooks -_colcon_package_bash_source_script "$COLCON_CURRENT_PREFIX/share/lolito/local_setup.bash" - -unset COLCON_CURRENT_PREFIX - -unset _colcon_package_bash_source_script -unset _colcon_package_bash_COLCON_CURRENT_PREFIX diff --git a/install/lolito/share/lolito/package.dsv b/install/lolito/share/lolito/package.dsv index 14589bf..e69de29 100644 --- a/install/lolito/share/lolito/package.dsv +++ b/install/lolito/share/lolito/package.dsv @@ -1,11 +0,0 @@ -source;share/lolito/hook/cmake_prefix_path.ps1 -source;share/lolito/hook/cmake_prefix_path.dsv -source;share/lolito/hook/cmake_prefix_path.sh -source;share/lolito/hook/pythonpath.ps1 -source;share/lolito/hook/pythonpath.dsv -source;share/lolito/hook/pythonpath.sh -source;share/lolito/local_setup.bash -source;share/lolito/local_setup.dsv -source;share/lolito/local_setup.ps1 -source;share/lolito/local_setup.sh -source;share/lolito/local_setup.zsh diff --git a/install/lolito/share/lolito/package.ps1 b/install/lolito/share/lolito/package.ps1 index a3a646c..e69de29 100644 --- a/install/lolito/share/lolito/package.ps1 +++ b/install/lolito/share/lolito/package.ps1 @@ -1,117 +0,0 @@ -# generated from colcon_powershell/shell/template/package.ps1.em - -# function to append a value to a variable -# which uses colons as separators -# duplicates as well as leading separators are avoided -# first argument: the name of the result variable -# second argument: the value to be prepended -function colcon_append_unique_value { - param ( - $_listname, - $_value - ) - - # get values from variable - if (Test-Path Env:$_listname) { - $_values=(Get-Item env:$_listname).Value - } else { - $_values="" - } - $_duplicate="" - # start with no values - $_all_values="" - # iterate over existing values in the variable - if ($_values) { - $_values.Split(";") | ForEach { - # not an empty string - if ($_) { - # not a duplicate of _value - if ($_ -eq $_value) { - $_duplicate="1" - } - if ($_all_values) { - $_all_values="${_all_values};$_" - } else { - $_all_values="$_" - } - } - } - } - # append only non-duplicates - if (!$_duplicate) { - # avoid leading separator - if ($_all_values) { - $_all_values="${_all_values};${_value}" - } else { - $_all_values="${_value}" - } - } - - # export the updated variable - Set-Item env:\$_listname -Value "$_all_values" -} - -# function to prepend a value to a variable -# which uses colons as separators -# duplicates as well as trailing separators are avoided -# first argument: the name of the result variable -# second argument: the value to be prepended -function colcon_prepend_unique_value { - param ( - $_listname, - $_value - ) - - # get values from variable - if (Test-Path Env:$_listname) { - $_values=(Get-Item env:$_listname).Value - } else { - $_values="" - } - # start with the new value - $_all_values="$_value" - # iterate over existing values in the variable - if ($_values) { - $_values.Split(";") | ForEach { - # not an empty string - if ($_) { - # not a duplicate of _value - if ($_ -ne $_value) { - # keep non-duplicate values - $_all_values="${_all_values};$_" - } - } - } - } - # export the updated variable - Set-Item env:\$_listname -Value "$_all_values" -} - -# function to source another script with conditional trace output -# first argument: the path of the script -# additional arguments: arguments to the script -function colcon_package_source_powershell_script { - param ( - $_colcon_package_source_powershell_script - ) - # source script with conditional trace output - if (Test-Path $_colcon_package_source_powershell_script) { - if ($env:COLCON_TRACE) { - echo ". '$_colcon_package_source_powershell_script'" - } - . "$_colcon_package_source_powershell_script" - } else { - Write-Error "not found: '$_colcon_package_source_powershell_script'" - } -} - - -# a powershell script is able to determine its own path -# the prefix is two levels up from the package specific share directory -$env:COLCON_CURRENT_PREFIX=(Get-Item $PSCommandPath).Directory.Parent.Parent.FullName - -colcon_package_source_powershell_script "$env:COLCON_CURRENT_PREFIX\share/lolito/hook/cmake_prefix_path.ps1" -colcon_package_source_powershell_script "$env:COLCON_CURRENT_PREFIX\share/lolito/hook/pythonpath.ps1" -colcon_package_source_powershell_script "$env:COLCON_CURRENT_PREFIX\share/lolito/local_setup.ps1" - -Remove-Item Env:\COLCON_CURRENT_PREFIX diff --git a/install/lolito/share/lolito/package.sh b/install/lolito/share/lolito/package.sh index bf82d22..e69de29 100644 --- a/install/lolito/share/lolito/package.sh +++ b/install/lolito/share/lolito/package.sh @@ -1,88 +0,0 @@ -# generated from colcon_core/shell/template/package.sh.em - -# This script extends the environment for this package. - -# function to prepend a value to a variable -# which uses colons as separators -# duplicates as well as trailing separators are avoided -# first argument: the name of the result variable -# second argument: the value to be prepended -_colcon_prepend_unique_value() { - # arguments - _listname="$1" - _value="$2" - - # get values from variable - eval _values=\"\$$_listname\" - # backup the field separator - _colcon_prepend_unique_value_IFS=$IFS - IFS=":" - # start with the new value - _all_values="$_value" - # workaround SH_WORD_SPLIT not being set in zsh - if [ "$(command -v colcon_zsh_convert_to_array)" ]; then - colcon_zsh_convert_to_array _values - fi - # iterate over existing values in the variable - for _item in $_values; do - # ignore empty strings - if [ -z "$_item" ]; then - continue - fi - # ignore duplicates of _value - if [ "$_item" = "$_value" ]; then - continue - fi - # keep non-duplicate values - _all_values="$_all_values:$_item" - done - unset _item - # restore the field separator - IFS=$_colcon_prepend_unique_value_IFS - unset _colcon_prepend_unique_value_IFS - # export the updated variable - eval export $_listname=\"$_all_values\" - unset _all_values - unset _values - - unset _value - unset _listname -} - -# since a plain shell script can't determine its own path when being sourced -# either use the provided COLCON_CURRENT_PREFIX -# or fall back to the build time prefix (if it exists) -_colcon_package_sh_COLCON_CURRENT_PREFIX="/home/jackson/chamito/src/install/lolito" -if [ -z "$COLCON_CURRENT_PREFIX" ]; then - if [ ! -d "$_colcon_package_sh_COLCON_CURRENT_PREFIX" ]; then - echo "The build time path \"$_colcon_package_sh_COLCON_CURRENT_PREFIX\" doesn't exist. Either source a script for a different shell or set the environment variable \"COLCON_CURRENT_PREFIX\" explicitly." 1>&2 - unset _colcon_package_sh_COLCON_CURRENT_PREFIX - return 1 - fi - COLCON_CURRENT_PREFIX="$_colcon_package_sh_COLCON_CURRENT_PREFIX" -fi -unset _colcon_package_sh_COLCON_CURRENT_PREFIX - -# function to source another script with conditional trace output -# first argument: the path of the script -# additional arguments: arguments to the script -_colcon_package_sh_source_script() { - if [ -f "$1" ]; then - if [ -n "$COLCON_TRACE" ]; then - echo "# . \"$1\"" - fi - . "$@" - else - echo "not found: \"$1\"" 1>&2 - fi -} - -# source sh hooks -_colcon_package_sh_source_script "$COLCON_CURRENT_PREFIX/share/lolito/hook/cmake_prefix_path.sh" -_colcon_package_sh_source_script "$COLCON_CURRENT_PREFIX/share/lolito/hook/pythonpath.sh" -_colcon_package_sh_source_script "$COLCON_CURRENT_PREFIX/share/lolito/local_setup.sh" - -unset _colcon_package_sh_source_script -unset COLCON_CURRENT_PREFIX - -# do not unset _colcon_prepend_unique_value since it might be used by non-primary shell hooks diff --git a/install/lolito/share/lolito/package.xml b/install/lolito/share/lolito/package.xml index 4c6480f..e69de29 100644 --- a/install/lolito/share/lolito/package.xml +++ b/install/lolito/share/lolito/package.xml @@ -1,21 +0,0 @@ - - - - lolito - 0.0.0 - TODO: Package description - roncanciovl - TODO: License declaration - - ament_cmake - ament_cmake_python - rclpy - std_msgs - - ament_lint_auto - ament_lint_common - - - ament_cmake - - diff --git a/install/lolito/share/lolito/package.zsh b/install/lolito/share/lolito/package.zsh index c28b8a1..e69de29 100644 --- a/install/lolito/share/lolito/package.zsh +++ b/install/lolito/share/lolito/package.zsh @@ -1,50 +0,0 @@ -# generated from colcon_zsh/shell/template/package.zsh.em - -# This script extends the environment for this package. - -# a zsh script is able to determine its own path if necessary -if [ -z "$COLCON_CURRENT_PREFIX" ]; then - # the prefix is two levels up from the package specific share directory - _colcon_package_zsh_COLCON_CURRENT_PREFIX="$(builtin cd -q "`dirname "${(%):-%N}"`/../.." > /dev/null && pwd)" -else - _colcon_package_zsh_COLCON_CURRENT_PREFIX="$COLCON_CURRENT_PREFIX" -fi - -# function to source another script with conditional trace output -# first argument: the path of the script -# additional arguments: arguments to the script -_colcon_package_zsh_source_script() { - if [ -f "$1" ]; then - if [ -n "$COLCON_TRACE" ]; then - echo ". \"$1\"" - fi - . "$@" - else - echo "not found: \"$1\"" 1>&2 - fi -} - -# function to convert array-like strings into arrays -# to workaround SH_WORD_SPLIT not being set -colcon_zsh_convert_to_array() { - local _listname=$1 - local _dollar="$" - local _split="{=" - local _to_array="(\"$_dollar$_split$_listname}\")" - eval $_listname=$_to_array -} - -# source sh script of this package -_colcon_package_zsh_source_script "$_colcon_package_zsh_COLCON_CURRENT_PREFIX/share/lolito/package.sh" -unset convert_zsh_to_array - -# setting COLCON_CURRENT_PREFIX avoids determining the prefix in the sourced scripts -COLCON_CURRENT_PREFIX="$_colcon_package_zsh_COLCON_CURRENT_PREFIX" - -# source zsh hooks -_colcon_package_zsh_source_script "$COLCON_CURRENT_PREFIX/share/lolito/local_setup.zsh" - -unset COLCON_CURRENT_PREFIX - -unset _colcon_package_zsh_source_script -unset _colcon_package_zsh_COLCON_CURRENT_PREFIX diff --git a/install/my_package/share/my_package/hook/ament_prefix_path.dsv b/install/my_package/share/my_package/hook/ament_prefix_path.dsv index 79d4c95..e69de29 100644 --- a/install/my_package/share/my_package/hook/ament_prefix_path.dsv +++ b/install/my_package/share/my_package/hook/ament_prefix_path.dsv @@ -1 +0,0 @@ -prepend-non-duplicate;AMENT_PREFIX_PATH; diff --git a/install/my_package/share/my_package/hook/ament_prefix_path.ps1 b/install/my_package/share/my_package/hook/ament_prefix_path.ps1 index 26b9997..e69de29 100644 --- a/install/my_package/share/my_package/hook/ament_prefix_path.ps1 +++ b/install/my_package/share/my_package/hook/ament_prefix_path.ps1 @@ -1,3 +0,0 @@ -# generated from colcon_powershell/shell/template/hook_prepend_value.ps1.em - -colcon_prepend_unique_value AMENT_PREFIX_PATH "$env:COLCON_CURRENT_PREFIX" diff --git a/install/my_package/share/my_package/hook/ament_prefix_path.sh b/install/my_package/share/my_package/hook/ament_prefix_path.sh index f3041f6..e69de29 100644 --- a/install/my_package/share/my_package/hook/ament_prefix_path.sh +++ b/install/my_package/share/my_package/hook/ament_prefix_path.sh @@ -1,3 +0,0 @@ -# generated from colcon_core/shell/template/hook_prepend_value.sh.em - -_colcon_prepend_unique_value AMENT_PREFIX_PATH "$COLCON_CURRENT_PREFIX" diff --git a/install/my_package/share/my_package/hook/pythonpath.dsv b/install/my_package/share/my_package/hook/pythonpath.dsv index 84dbc4c..e69de29 100644 --- a/install/my_package/share/my_package/hook/pythonpath.dsv +++ b/install/my_package/share/my_package/hook/pythonpath.dsv @@ -1 +0,0 @@ -prepend-non-duplicate;PYTHONPATH;lib/python3.8/site-packages diff --git a/install/my_package/share/my_package/hook/pythonpath.ps1 b/install/my_package/share/my_package/hook/pythonpath.ps1 index 12877ef..e69de29 100644 --- a/install/my_package/share/my_package/hook/pythonpath.ps1 +++ b/install/my_package/share/my_package/hook/pythonpath.ps1 @@ -1,3 +0,0 @@ -# generated from colcon_powershell/shell/template/hook_prepend_value.ps1.em - -colcon_prepend_unique_value PYTHONPATH "$env:COLCON_CURRENT_PREFIX\lib/python3.8/site-packages" diff --git a/install/my_package/share/my_package/hook/pythonpath.sh b/install/my_package/share/my_package/hook/pythonpath.sh index ed8efd9..e69de29 100644 --- a/install/my_package/share/my_package/hook/pythonpath.sh +++ b/install/my_package/share/my_package/hook/pythonpath.sh @@ -1,3 +0,0 @@ -# generated from colcon_core/shell/template/hook_prepend_value.sh.em - -_colcon_prepend_unique_value PYTHONPATH "$COLCON_CURRENT_PREFIX/lib/python3.8/site-packages" diff --git a/install/my_package/share/my_package/package.bash b/install/my_package/share/my_package/package.bash index c9caece..e69de29 100644 --- a/install/my_package/share/my_package/package.bash +++ b/install/my_package/share/my_package/package.bash @@ -1,31 +0,0 @@ -# generated from colcon_bash/shell/template/package.bash.em - -# This script extends the environment for this package. - -# a bash script is able to determine its own path if necessary -if [ -z "$COLCON_CURRENT_PREFIX" ]; then - # the prefix is two levels up from the package specific share directory - _colcon_package_bash_COLCON_CURRENT_PREFIX="$(builtin cd "`dirname "${BASH_SOURCE[0]}"`/../.." > /dev/null && pwd)" -else - _colcon_package_bash_COLCON_CURRENT_PREFIX="$COLCON_CURRENT_PREFIX" -fi - -# function to source another script with conditional trace output -# first argument: the path of the script -# additional arguments: arguments to the script -_colcon_package_bash_source_script() { - if [ -f "$1" ]; then - if [ -n "$COLCON_TRACE" ]; then - echo ". \"$1\"" - fi - . "$@" - else - echo "not found: \"$1\"" 1>&2 - fi -} - -# source sh script of this package -_colcon_package_bash_source_script "$_colcon_package_bash_COLCON_CURRENT_PREFIX/share/my_package/package.sh" - -unset _colcon_package_bash_source_script -unset _colcon_package_bash_COLCON_CURRENT_PREFIX diff --git a/install/my_package/share/my_package/package.dsv b/install/my_package/share/my_package/package.dsv index 83a6199..e69de29 100644 --- a/install/my_package/share/my_package/package.dsv +++ b/install/my_package/share/my_package/package.dsv @@ -1,6 +0,0 @@ -source;share/my_package/hook/pythonpath.ps1 -source;share/my_package/hook/pythonpath.dsv -source;share/my_package/hook/pythonpath.sh -source;share/my_package/hook/ament_prefix_path.ps1 -source;share/my_package/hook/ament_prefix_path.dsv -source;share/my_package/hook/ament_prefix_path.sh diff --git a/install/my_package/share/my_package/package.ps1 b/install/my_package/share/my_package/package.ps1 index d54be3c..e69de29 100644 --- a/install/my_package/share/my_package/package.ps1 +++ b/install/my_package/share/my_package/package.ps1 @@ -1,116 +0,0 @@ -# generated from colcon_powershell/shell/template/package.ps1.em - -# function to append a value to a variable -# which uses colons as separators -# duplicates as well as leading separators are avoided -# first argument: the name of the result variable -# second argument: the value to be prepended -function colcon_append_unique_value { - param ( - $_listname, - $_value - ) - - # get values from variable - if (Test-Path Env:$_listname) { - $_values=(Get-Item env:$_listname).Value - } else { - $_values="" - } - $_duplicate="" - # start with no values - $_all_values="" - # iterate over existing values in the variable - if ($_values) { - $_values.Split(";") | ForEach { - # not an empty string - if ($_) { - # not a duplicate of _value - if ($_ -eq $_value) { - $_duplicate="1" - } - if ($_all_values) { - $_all_values="${_all_values};$_" - } else { - $_all_values="$_" - } - } - } - } - # append only non-duplicates - if (!$_duplicate) { - # avoid leading separator - if ($_all_values) { - $_all_values="${_all_values};${_value}" - } else { - $_all_values="${_value}" - } - } - - # export the updated variable - Set-Item env:\$_listname -Value "$_all_values" -} - -# function to prepend a value to a variable -# which uses colons as separators -# duplicates as well as trailing separators are avoided -# first argument: the name of the result variable -# second argument: the value to be prepended -function colcon_prepend_unique_value { - param ( - $_listname, - $_value - ) - - # get values from variable - if (Test-Path Env:$_listname) { - $_values=(Get-Item env:$_listname).Value - } else { - $_values="" - } - # start with the new value - $_all_values="$_value" - # iterate over existing values in the variable - if ($_values) { - $_values.Split(";") | ForEach { - # not an empty string - if ($_) { - # not a duplicate of _value - if ($_ -ne $_value) { - # keep non-duplicate values - $_all_values="${_all_values};$_" - } - } - } - } - # export the updated variable - Set-Item env:\$_listname -Value "$_all_values" -} - -# function to source another script with conditional trace output -# first argument: the path of the script -# additional arguments: arguments to the script -function colcon_package_source_powershell_script { - param ( - $_colcon_package_source_powershell_script - ) - # source script with conditional trace output - if (Test-Path $_colcon_package_source_powershell_script) { - if ($env:COLCON_TRACE) { - echo ". '$_colcon_package_source_powershell_script'" - } - . "$_colcon_package_source_powershell_script" - } else { - Write-Error "not found: '$_colcon_package_source_powershell_script'" - } -} - - -# a powershell script is able to determine its own path -# the prefix is two levels up from the package specific share directory -$env:COLCON_CURRENT_PREFIX=(Get-Item $PSCommandPath).Directory.Parent.Parent.FullName - -colcon_package_source_powershell_script "$env:COLCON_CURRENT_PREFIX\share/my_package/hook/pythonpath.ps1" -colcon_package_source_powershell_script "$env:COLCON_CURRENT_PREFIX\share/my_package/hook/ament_prefix_path.ps1" - -Remove-Item Env:\COLCON_CURRENT_PREFIX diff --git a/install/my_package/share/my_package/package.sh b/install/my_package/share/my_package/package.sh index 3683e5b..e69de29 100644 --- a/install/my_package/share/my_package/package.sh +++ b/install/my_package/share/my_package/package.sh @@ -1,87 +0,0 @@ -# generated from colcon_core/shell/template/package.sh.em - -# This script extends the environment for this package. - -# function to prepend a value to a variable -# which uses colons as separators -# duplicates as well as trailing separators are avoided -# first argument: the name of the result variable -# second argument: the value to be prepended -_colcon_prepend_unique_value() { - # arguments - _listname="$1" - _value="$2" - - # get values from variable - eval _values=\"\$$_listname\" - # backup the field separator - _colcon_prepend_unique_value_IFS=$IFS - IFS=":" - # start with the new value - _all_values="$_value" - # workaround SH_WORD_SPLIT not being set in zsh - if [ "$(command -v colcon_zsh_convert_to_array)" ]; then - colcon_zsh_convert_to_array _values - fi - # iterate over existing values in the variable - for _item in $_values; do - # ignore empty strings - if [ -z "$_item" ]; then - continue - fi - # ignore duplicates of _value - if [ "$_item" = "$_value" ]; then - continue - fi - # keep non-duplicate values - _all_values="$_all_values:$_item" - done - unset _item - # restore the field separator - IFS=$_colcon_prepend_unique_value_IFS - unset _colcon_prepend_unique_value_IFS - # export the updated variable - eval export $_listname=\"$_all_values\" - unset _all_values - unset _values - - unset _value - unset _listname -} - -# since a plain shell script can't determine its own path when being sourced -# either use the provided COLCON_CURRENT_PREFIX -# or fall back to the build time prefix (if it exists) -_colcon_package_sh_COLCON_CURRENT_PREFIX="/home/jackson/chamito/src/install/my_package" -if [ -z "$COLCON_CURRENT_PREFIX" ]; then - if [ ! -d "$_colcon_package_sh_COLCON_CURRENT_PREFIX" ]; then - echo "The build time path \"$_colcon_package_sh_COLCON_CURRENT_PREFIX\" doesn't exist. Either source a script for a different shell or set the environment variable \"COLCON_CURRENT_PREFIX\" explicitly." 1>&2 - unset _colcon_package_sh_COLCON_CURRENT_PREFIX - return 1 - fi - COLCON_CURRENT_PREFIX="$_colcon_package_sh_COLCON_CURRENT_PREFIX" -fi -unset _colcon_package_sh_COLCON_CURRENT_PREFIX - -# function to source another script with conditional trace output -# first argument: the path of the script -# additional arguments: arguments to the script -_colcon_package_sh_source_script() { - if [ -f "$1" ]; then - if [ -n "$COLCON_TRACE" ]; then - echo "# . \"$1\"" - fi - . "$@" - else - echo "not found: \"$1\"" 1>&2 - fi -} - -# source sh hooks -_colcon_package_sh_source_script "$COLCON_CURRENT_PREFIX/share/my_package/hook/pythonpath.sh" -_colcon_package_sh_source_script "$COLCON_CURRENT_PREFIX/share/my_package/hook/ament_prefix_path.sh" - -unset _colcon_package_sh_source_script -unset COLCON_CURRENT_PREFIX - -# do not unset _colcon_prepend_unique_value since it might be used by non-primary shell hooks diff --git a/install/my_package/share/my_package/package.xml b/install/my_package/share/my_package/package.xml index 78be50c..e69de29 100644 --- a/install/my_package/share/my_package/package.xml +++ b/install/my_package/share/my_package/package.xml @@ -1,18 +0,0 @@ - - - - my_package - 0.0.0 - TODO: Package description - jackson - TODO: License declaration - - ament_copyright - ament_flake8 - ament_pep257 - python3-pytest - - - ament_python - - diff --git a/install/my_package/share/my_package/package.zsh b/install/my_package/share/my_package/package.zsh index 42d562c..e69de29 100644 --- a/install/my_package/share/my_package/package.zsh +++ b/install/my_package/share/my_package/package.zsh @@ -1,42 +0,0 @@ -# generated from colcon_zsh/shell/template/package.zsh.em - -# This script extends the environment for this package. - -# a zsh script is able to determine its own path if necessary -if [ -z "$COLCON_CURRENT_PREFIX" ]; then - # the prefix is two levels up from the package specific share directory - _colcon_package_zsh_COLCON_CURRENT_PREFIX="$(builtin cd -q "`dirname "${(%):-%N}"`/../.." > /dev/null && pwd)" -else - _colcon_package_zsh_COLCON_CURRENT_PREFIX="$COLCON_CURRENT_PREFIX" -fi - -# function to source another script with conditional trace output -# first argument: the path of the script -# additional arguments: arguments to the script -_colcon_package_zsh_source_script() { - if [ -f "$1" ]; then - if [ -n "$COLCON_TRACE" ]; then - echo ". \"$1\"" - fi - . "$@" - else - echo "not found: \"$1\"" 1>&2 - fi -} - -# function to convert array-like strings into arrays -# to workaround SH_WORD_SPLIT not being set -colcon_zsh_convert_to_array() { - local _listname=$1 - local _dollar="$" - local _split="{=" - local _to_array="(\"$_dollar$_split$_listname}\")" - eval $_listname=$_to_array -} - -# source sh script of this package -_colcon_package_zsh_source_script "$_colcon_package_zsh_COLCON_CURRENT_PREFIX/share/my_package/package.sh" -unset convert_zsh_to_array - -unset _colcon_package_zsh_source_script -unset _colcon_package_zsh_COLCON_CURRENT_PREFIX diff --git a/install/setup.bash b/install/setup.bash index b19cab0..e69de29 100644 --- a/install/setup.bash +++ b/install/setup.bash @@ -1,31 +0,0 @@ -# generated from colcon_bash/shell/template/prefix_chain.bash.em - -# This script extends the environment with the environment of other prefix -# paths which were sourced when this file was generated as well as all packages -# contained in this prefix path. - -# function to source another script with conditional trace output -# first argument: the path of the script -_colcon_prefix_chain_bash_source_script() { - if [ -f "$1" ]; then - if [ -n "$COLCON_TRACE" ]; then - echo ". \"$1\"" - fi - . "$1" - else - echo "not found: \"$1\"" 1>&2 - fi -} - -# source chained prefixes -# setting COLCON_CURRENT_PREFIX avoids determining the prefix in the sourced script -COLCON_CURRENT_PREFIX="/opt/ros/foxy" -_colcon_prefix_chain_bash_source_script "$COLCON_CURRENT_PREFIX/local_setup.bash" - -# source this prefix -# setting COLCON_CURRENT_PREFIX avoids determining the prefix in the sourced script -COLCON_CURRENT_PREFIX="$(builtin cd "`dirname "${BASH_SOURCE[0]}"`" > /dev/null && pwd)" -_colcon_prefix_chain_bash_source_script "$COLCON_CURRENT_PREFIX/local_setup.bash" - -unset COLCON_CURRENT_PREFIX -unset _colcon_prefix_chain_bash_source_script diff --git a/install/setup.ps1 b/install/setup.ps1 index 412726f..e69de29 100644 --- a/install/setup.ps1 +++ b/install/setup.ps1 @@ -1,29 +0,0 @@ -# generated from colcon_powershell/shell/template/prefix_chain.ps1.em - -# This script extends the environment with the environment of other prefix -# paths which were sourced when this file was generated as well as all packages -# contained in this prefix path. - -# function to source another script with conditional trace output -# first argument: the path of the script -function _colcon_prefix_chain_powershell_source_script { - param ( - $_colcon_prefix_chain_powershell_source_script_param - ) - # source script with conditional trace output - if (Test-Path $_colcon_prefix_chain_powershell_source_script_param) { - if ($env:COLCON_TRACE) { - echo ". '$_colcon_prefix_chain_powershell_source_script_param'" - } - . "$_colcon_prefix_chain_powershell_source_script_param" - } else { - Write-Error "not found: '$_colcon_prefix_chain_powershell_source_script_param'" - } -} - -# source chained prefixes -_colcon_prefix_chain_powershell_source_script "/opt/ros/foxy\local_setup.ps1" - -# source this prefix -$env:COLCON_CURRENT_PREFIX=(Split-Path $PSCommandPath -Parent) -_colcon_prefix_chain_powershell_source_script "$env:COLCON_CURRENT_PREFIX\local_setup.ps1" diff --git a/install/setup.sh b/install/setup.sh index 471f31c..e69de29 100644 --- a/install/setup.sh +++ b/install/setup.sh @@ -1,45 +0,0 @@ -# generated from colcon_core/shell/template/prefix_chain.sh.em - -# This script extends the environment with the environment of other prefix -# paths which were sourced when this file was generated as well as all packages -# contained in this prefix path. - -# since a plain shell script can't determine its own path when being sourced -# either use the provided COLCON_CURRENT_PREFIX -# or fall back to the build time prefix (if it exists) -_colcon_prefix_chain_sh_COLCON_CURRENT_PREFIX=/home/jackson/chamito/src/install -if [ ! -z "$COLCON_CURRENT_PREFIX" ]; then - _colcon_prefix_chain_sh_COLCON_CURRENT_PREFIX="$COLCON_CURRENT_PREFIX" -elif [ ! -d "$_colcon_prefix_chain_sh_COLCON_CURRENT_PREFIX" ]; then - echo "The build time path \"$_colcon_prefix_chain_sh_COLCON_CURRENT_PREFIX\" doesn't exist. Either source a script for a different shell or set the environment variable \"COLCON_CURRENT_PREFIX\" explicitly." 1>&2 - unset _colcon_prefix_chain_sh_COLCON_CURRENT_PREFIX - return 1 -fi - -# function to source another script with conditional trace output -# first argument: the path of the script -_colcon_prefix_chain_sh_source_script() { - if [ -f "$1" ]; then - if [ -n "$COLCON_TRACE" ]; then - echo "# . \"$1\"" - fi - . "$1" - else - echo "not found: \"$1\"" 1>&2 - fi -} - -# source chained prefixes -# setting COLCON_CURRENT_PREFIX avoids relying on the build time prefix of the sourced script -COLCON_CURRENT_PREFIX="/opt/ros/foxy" -_colcon_prefix_chain_sh_source_script "$COLCON_CURRENT_PREFIX/local_setup.sh" - - -# source this prefix -# setting COLCON_CURRENT_PREFIX avoids relying on the build time prefix of the sourced script -COLCON_CURRENT_PREFIX="$_colcon_prefix_chain_sh_COLCON_CURRENT_PREFIX" -_colcon_prefix_chain_sh_source_script "$COLCON_CURRENT_PREFIX/local_setup.sh" - -unset _colcon_prefix_chain_sh_COLCON_CURRENT_PREFIX -unset _colcon_prefix_chain_sh_source_script -unset COLCON_CURRENT_PREFIX diff --git a/install/setup.zsh b/install/setup.zsh index a98672a..e69de29 100644 --- a/install/setup.zsh +++ b/install/setup.zsh @@ -1,31 +0,0 @@ -# generated from colcon_zsh/shell/template/prefix_chain.zsh.em - -# This script extends the environment with the environment of other prefix -# paths which were sourced when this file was generated as well as all packages -# contained in this prefix path. - -# function to source another script with conditional trace output -# first argument: the path of the script -_colcon_prefix_chain_zsh_source_script() { - if [ -f "$1" ]; then - if [ -n "$COLCON_TRACE" ]; then - echo ". \"$1\"" - fi - . "$1" - else - echo "not found: \"$1\"" 1>&2 - fi -} - -# source chained prefixes -# setting COLCON_CURRENT_PREFIX avoids determining the prefix in the sourced script -COLCON_CURRENT_PREFIX="/opt/ros/foxy" -_colcon_prefix_chain_zsh_source_script "$COLCON_CURRENT_PREFIX/local_setup.zsh" - -# source this prefix -# setting COLCON_CURRENT_PREFIX avoids determining the prefix in the sourced script -COLCON_CURRENT_PREFIX="$(builtin cd -q "`dirname "${(%):-%N}"`" > /dev/null && pwd)" -_colcon_prefix_chain_zsh_source_script "$COLCON_CURRENT_PREFIX/local_setup.zsh" - -unset COLCON_CURRENT_PREFIX -unset _colcon_prefix_chain_zsh_source_script diff --git a/lolito/CMakeLists.txt b/lolito/CMakeLists.txt index 7f9e08c..e69de29 100644 --- a/lolito/CMakeLists.txt +++ b/lolito/CMakeLists.txt @@ -1,46 +0,0 @@ -cmake_minimum_required(VERSION 3.5) -project(lolito) - -# 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() - -# find dependencies -find_package(ament_cmake REQUIRED) -find_package(ament_cmake_python REQUIRED) -find_package(rclpy REQUIRED) -find_package(std_msgs REQUIRED) - -ament_python_install_package(scripts/) - -install(PROGRAMS - scripts/pubhen.py - DESTINATION lib/${PROJECT_NAME} -) - -# uncomment the following section in order to fill in -# further dependencies manually. -# find_package( REQUIRED) - -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() -endif() - -ament_package() diff --git a/lolito/package.xml b/lolito/package.xml index 4c6480f..e69de29 100644 --- a/lolito/package.xml +++ b/lolito/package.xml @@ -1,21 +0,0 @@ - - - - lolito - 0.0.0 - TODO: Package description - roncanciovl - TODO: License declaration - - ament_cmake - ament_cmake_python - rclpy - std_msgs - - ament_lint_auto - ament_lint_common - - - ament_cmake - - diff --git a/lolito/scripts/pubhen.py b/lolito/scripts/pubhen.py index df56e09..e69de29 100644 --- a/lolito/scripts/pubhen.py +++ b/lolito/scripts/pubhen.py @@ -1,39 +0,0 @@ -import rclpy -from rclpy.node import Node - -from std_msgs.msg import String - - -class MinimalPublisher(Node): - - def __init__(self): - super().__init__('minimal_publisher') - self.publisher_ = self.create_publisher(String, 'topic', 10) - timer_period = 0.5 # seconds - self.timer = self.create_timer(timer_period, self.timer_callback) - self.i = 0 - - def timer_callback(self): - msg = String() - msg.data = 'Carlos K: %d' % self.i - self.publisher_.publish(msg) - self.get_logger().info('Publishing: "%s"' % msg.data) - self.i += 1 - - -def main(args=None): - rclpy.init(args=args) - - minimal_publisher = MinimalPublisher() - - rclpy.spin(minimal_publisher) - - # Destroy the node explicitly - # (optional - otherwise it will be done automatically - # when the garbage collector destroys the node object) - minimal_publisher.destroy_node() - rclpy.shutdown() - - -if __name__ == '__main__': - main() \ No newline at end of file diff --git a/raul_pkg/setup.py b/raul_pkg/setup.py index 0917f9c..e69de29 100644 --- a/raul_pkg/setup.py +++ b/raul_pkg/setup.py @@ -1,27 +0,0 @@ -from setuptools import setup - -package_name = 'raul_pkg' - -setup( - name=package_name, - version='0.0.0', - packages=[package_name], - data_files=[ - ('share/ament_index/resource_index/packages', - ['resource/' + package_name]), - ('share/' + package_name, ['package.xml']), - ], - install_requires=['setuptools'], - zip_safe=True, - maintainer='raul', - maintainer_email='alvaroraulurdanetag@gmail.com', - description='TODO: Package description', - license='Apache License 2.0', - tests_require=['pytest'], - entry_points={ - 'console_scripts': [ - 'talker = raul_pkg.pub_raul:main', - 'listener = raul_pkg.sub_raul:main', - ], - }, -) From 8ed121d31b6b81593889db001cf00cdd5e8d2e82 Mon Sep 17 00:00:00 2001 From: Jacksiton Date: Thu, 9 Mar 2023 08:26:14 -0500 Subject: [PATCH 19/53] sub --- chamo_pkg/chamo_pkg/my_pub.py | 39 +++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/chamo_pkg/chamo_pkg/my_pub.py b/chamo_pkg/chamo_pkg/my_pub.py index e69de29..fff0ae1 100644 --- a/chamo_pkg/chamo_pkg/my_pub.py +++ b/chamo_pkg/chamo_pkg/my_pub.py @@ -0,0 +1,39 @@ +import rclpy +from rclpy.node import Node + +from std_msgs.msg import String + + +class MinimalPublisher(Node): + + def __init__(self): + super().__init__('minimal_publisher') + self.publisher_ = self.create_publisher(String, 'topic', 10) + timer_period = 0.5 # seconds + self.timer = self.create_timer(timer_period, self.timer_callback) + self.i = 0 + + def timer_callback(self): + msg = String() + msg.data = 'Hello World: %d' % self.i + self.publisher_.publish(msg) + self.get_logger().info('Publishing: "%s"' % msg.data) + self.i += 1 + + +def main(args=None): + rclpy.init(args=args) + + minimal_publisher = MinimalPublisher() + + rclpy.spin(minimal_publisher) + + # Destroy the node explicitly + # (optional - otherwise it will be done automatically + # when the garbage collector destroys the node object) + minimal_publisher.destroy_node() + rclpy.shutdown() + + +if __name__ == '__main__': + main() \ No newline at end of file From bf47cbd51f82968a9fa26434a3429f7bcb915f40 Mon Sep 17 00:00:00 2001 From: Jacksiton Date: Thu, 9 Mar 2023 08:27:33 -0500 Subject: [PATCH 20/53] chamo --- chamo_pkg/chamo_pkg/my_sub.py | 37 +++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/chamo_pkg/chamo_pkg/my_sub.py b/chamo_pkg/chamo_pkg/my_sub.py index e69de29..5ac9507 100644 --- a/chamo_pkg/chamo_pkg/my_sub.py +++ b/chamo_pkg/chamo_pkg/my_sub.py @@ -0,0 +1,37 @@ +import rclpy +from rclpy.node import Node + +from std_msgs.msg import String + + +class MinimalSubscriber(Node): + + def __init__(self): + super().__init__('') + self.subscription = self.create_subscription( + String, + 'topic', + self.listener_callback, + 10) + self.subscription # prevent unused variable warning + + def listener_callback(self, msg): + self.get_logger().info('I heard: "%s"' % msg.data) + + +def main(args=None): + rclpy.init(args=args) + + minimal_subscriber = MinimalSubscriber() + + rclpy.spin(minimal_subscriber) + + # Destroy the node explicitly + # (optional - otherwise it will be done automatically + # when the garbage collector destroys the node object) + minimal_subscriber.destroy_node() + rclpy.shutdown() + + +if __name__ == '__main__': + main() \ No newline at end of file From 71d657cf39d0bf32cb0c704c0b18fa2168f7b63b Mon Sep 17 00:00:00 2001 From: Jacksiton Date: Thu, 9 Mar 2023 08:28:23 -0500 Subject: [PATCH 21/53] chamo --- chamo_pkg/package.xml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/chamo_pkg/package.xml b/chamo_pkg/package.xml index e69de29..27ee832 100644 --- a/chamo_pkg/package.xml +++ b/chamo_pkg/package.xml @@ -0,0 +1,21 @@ + + + + raul_pkg + 0.0.0 + TODO: Package description + raul + Apache License 2.0 + + rclpy + std_msgs + + ament_copyright + ament_flake8 + ament_pep257 + python3-pytest + + + ament_python + + \ No newline at end of file From 7b7d5256b9511c6c3dacd8e3511233de99679b3a Mon Sep 17 00:00:00 2001 From: Jacksiton Date: Thu, 9 Mar 2023 08:30:19 -0500 Subject: [PATCH 22/53] otrochamo --- chamo_pkg/setup.py | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/chamo_pkg/setup.py b/chamo_pkg/setup.py index e69de29..132335c 100644 --- a/chamo_pkg/setup.py +++ b/chamo_pkg/setup.py @@ -0,0 +1,27 @@ +from setuptools import setup + +package_name = 'chamo_pkg' + +setup( + name=package_name, + version='0.0.0', + packages=[package_name], + data_files=[ + ('share/ament_index/resource_index/packages', + ['resource/' + package_name]), + ('share/' + package_name, ['package.xml']), + ], + install_requires=['setuptools'], + zip_safe=True, + maintainer='chamo', + maintainer_email='jdicano1319@gmail.com', + description='TODO: Package description', + license='Apache License 2.0', + tests_require=['pytest'], + entry_points={ + 'console_scripts': [ + 'talker = chamo_pkg.my_pub:main', + 'listener = chamo_pkg.my_pub:main', + ], + }, +) \ No newline at end of file From fd00c7366a939b2fda3b07e03642f39e0e35c1e6 Mon Sep 17 00:00:00 2001 From: Jacksiton Date: Thu, 9 Mar 2023 08:31:40 -0500 Subject: [PATCH 23/53] jack --- raul_pkg/setup.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 raul_pkg/setup.py diff --git a/raul_pkg/setup.py b/raul_pkg/setup.py deleted file mode 100644 index e69de29..0000000 From a64c4dafcc73eb75c080b04d5f12bb1a5f543f6d Mon Sep 17 00:00:00 2001 From: Jacksiton Date: Thu, 9 Mar 2023 08:32:54 -0500 Subject: [PATCH 24/53] da --- chamo_pkg/setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chamo_pkg/setup.py b/chamo_pkg/setup.py index 132335c..5104569 100644 --- a/chamo_pkg/setup.py +++ b/chamo_pkg/setup.py @@ -21,7 +21,7 @@ entry_points={ 'console_scripts': [ 'talker = chamo_pkg.my_pub:main', - 'listener = chamo_pkg.my_pub:main', + 'listener = chamo_pkg.my_sub:main', ], }, ) \ No newline at end of file From ccec8f701cb77d151b26db7a45cd5c506aa510cc Mon Sep 17 00:00:00 2001 From: Jacksiton Date: Thu, 9 Mar 2023 08:53:23 -0500 Subject: [PATCH 25/53] dawd --- bichosu_pkg/CMakeLists.txt | 35 +++++++++++++++++++++++++++++++++++ bichosu_pkg/package.xml | 18 ++++++++++++++++++ log/latest_build | 2 +- 3 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 bichosu_pkg/CMakeLists.txt create mode 100644 bichosu_pkg/package.xml diff --git a/bichosu_pkg/CMakeLists.txt b/bichosu_pkg/CMakeLists.txt new file mode 100644 index 0000000..d0a834e --- /dev/null +++ b/bichosu_pkg/CMakeLists.txt @@ -0,0 +1,35 @@ +cmake_minimum_required(VERSION 3.5) +project(bichosu_pkg) + +# 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() + +# find dependencies +find_package(ament_cmake REQUIRED) +# uncomment the following section in order to fill in +# further dependencies manually. +# find_package( REQUIRED) + +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() +endif() + +ament_package() diff --git a/bichosu_pkg/package.xml b/bichosu_pkg/package.xml new file mode 100644 index 0000000..12985b6 --- /dev/null +++ b/bichosu_pkg/package.xml @@ -0,0 +1,18 @@ + + + + bichosu_pkg + 0.0.0 + TODO: Package description + jackson + TODO: License declaration + + ament_cmake + + ament_lint_auto + ament_lint_common + + + ament_cmake + + diff --git a/log/latest_build b/log/latest_build index eb2fa28..bab522f 120000 --- a/log/latest_build +++ b/log/latest_build @@ -1 +1 @@ -build_2023-03-08_17-04-03 \ No newline at end of file +build_2023-03-09_08-49-54 \ No newline at end of file From ad9e11bbea6cf0eee0a6abaa7f18deedf90812d5 Mon Sep 17 00:00:00 2001 From: Jacksiton Date: Thu, 9 Mar 2023 08:57:29 -0500 Subject: [PATCH 26/53] eliminar --- bichosu_pkg/CMakeLists.txt | 35 ---------------------------- bichosu_pkg/package.xml | 18 --------------- chamo_pkg/chamo_pkg/__init__.py | 0 chamo_pkg/chamo_pkg/my_pub.py | 39 -------------------------------- chamo_pkg/chamo_pkg/my_sub.py | 37 ------------------------------ chamo_pkg/package.xml | 21 ----------------- chamo_pkg/resource/chamo_pkg | 0 chamo_pkg/setup.cfg | 0 chamo_pkg/setup.py | 27 ---------------------- chamo_pkg/test/test_copyright.py | 0 chamo_pkg/test/test_flake8.py | 0 chamo_pkg/test/test_pep257.py | 0 12 files changed, 177 deletions(-) delete mode 100644 bichosu_pkg/CMakeLists.txt delete mode 100644 bichosu_pkg/package.xml delete mode 100644 chamo_pkg/chamo_pkg/__init__.py delete mode 100644 chamo_pkg/chamo_pkg/my_pub.py delete mode 100644 chamo_pkg/chamo_pkg/my_sub.py delete mode 100644 chamo_pkg/package.xml delete mode 100644 chamo_pkg/resource/chamo_pkg delete mode 100644 chamo_pkg/setup.cfg delete mode 100644 chamo_pkg/setup.py delete mode 100644 chamo_pkg/test/test_copyright.py delete mode 100644 chamo_pkg/test/test_flake8.py delete mode 100644 chamo_pkg/test/test_pep257.py diff --git a/bichosu_pkg/CMakeLists.txt b/bichosu_pkg/CMakeLists.txt deleted file mode 100644 index d0a834e..0000000 --- a/bichosu_pkg/CMakeLists.txt +++ /dev/null @@ -1,35 +0,0 @@ -cmake_minimum_required(VERSION 3.5) -project(bichosu_pkg) - -# 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() - -# find dependencies -find_package(ament_cmake REQUIRED) -# uncomment the following section in order to fill in -# further dependencies manually. -# find_package( REQUIRED) - -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() -endif() - -ament_package() diff --git a/bichosu_pkg/package.xml b/bichosu_pkg/package.xml deleted file mode 100644 index 12985b6..0000000 --- a/bichosu_pkg/package.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - bichosu_pkg - 0.0.0 - TODO: Package description - jackson - TODO: License declaration - - ament_cmake - - ament_lint_auto - ament_lint_common - - - ament_cmake - - diff --git a/chamo_pkg/chamo_pkg/__init__.py b/chamo_pkg/chamo_pkg/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/chamo_pkg/chamo_pkg/my_pub.py b/chamo_pkg/chamo_pkg/my_pub.py deleted file mode 100644 index fff0ae1..0000000 --- a/chamo_pkg/chamo_pkg/my_pub.py +++ /dev/null @@ -1,39 +0,0 @@ -import rclpy -from rclpy.node import Node - -from std_msgs.msg import String - - -class MinimalPublisher(Node): - - def __init__(self): - super().__init__('minimal_publisher') - self.publisher_ = self.create_publisher(String, 'topic', 10) - timer_period = 0.5 # seconds - self.timer = self.create_timer(timer_period, self.timer_callback) - self.i = 0 - - def timer_callback(self): - msg = String() - msg.data = 'Hello World: %d' % self.i - self.publisher_.publish(msg) - self.get_logger().info('Publishing: "%s"' % msg.data) - self.i += 1 - - -def main(args=None): - rclpy.init(args=args) - - minimal_publisher = MinimalPublisher() - - rclpy.spin(minimal_publisher) - - # Destroy the node explicitly - # (optional - otherwise it will be done automatically - # when the garbage collector destroys the node object) - minimal_publisher.destroy_node() - rclpy.shutdown() - - -if __name__ == '__main__': - main() \ No newline at end of file diff --git a/chamo_pkg/chamo_pkg/my_sub.py b/chamo_pkg/chamo_pkg/my_sub.py deleted file mode 100644 index 5ac9507..0000000 --- a/chamo_pkg/chamo_pkg/my_sub.py +++ /dev/null @@ -1,37 +0,0 @@ -import rclpy -from rclpy.node import Node - -from std_msgs.msg import String - - -class MinimalSubscriber(Node): - - def __init__(self): - super().__init__('') - self.subscription = self.create_subscription( - String, - 'topic', - self.listener_callback, - 10) - self.subscription # prevent unused variable warning - - def listener_callback(self, msg): - self.get_logger().info('I heard: "%s"' % msg.data) - - -def main(args=None): - rclpy.init(args=args) - - minimal_subscriber = MinimalSubscriber() - - rclpy.spin(minimal_subscriber) - - # Destroy the node explicitly - # (optional - otherwise it will be done automatically - # when the garbage collector destroys the node object) - minimal_subscriber.destroy_node() - rclpy.shutdown() - - -if __name__ == '__main__': - main() \ No newline at end of file diff --git a/chamo_pkg/package.xml b/chamo_pkg/package.xml deleted file mode 100644 index 27ee832..0000000 --- a/chamo_pkg/package.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - raul_pkg - 0.0.0 - TODO: Package description - raul - Apache License 2.0 - - rclpy - std_msgs - - ament_copyright - ament_flake8 - ament_pep257 - python3-pytest - - - ament_python - - \ No newline at end of file diff --git a/chamo_pkg/resource/chamo_pkg b/chamo_pkg/resource/chamo_pkg deleted file mode 100644 index e69de29..0000000 diff --git a/chamo_pkg/setup.cfg b/chamo_pkg/setup.cfg deleted file mode 100644 index e69de29..0000000 diff --git a/chamo_pkg/setup.py b/chamo_pkg/setup.py deleted file mode 100644 index 5104569..0000000 --- a/chamo_pkg/setup.py +++ /dev/null @@ -1,27 +0,0 @@ -from setuptools import setup - -package_name = 'chamo_pkg' - -setup( - name=package_name, - version='0.0.0', - packages=[package_name], - data_files=[ - ('share/ament_index/resource_index/packages', - ['resource/' + package_name]), - ('share/' + package_name, ['package.xml']), - ], - install_requires=['setuptools'], - zip_safe=True, - maintainer='chamo', - maintainer_email='jdicano1319@gmail.com', - description='TODO: Package description', - license='Apache License 2.0', - tests_require=['pytest'], - entry_points={ - 'console_scripts': [ - 'talker = chamo_pkg.my_pub:main', - 'listener = chamo_pkg.my_sub:main', - ], - }, -) \ No newline at end of file diff --git a/chamo_pkg/test/test_copyright.py b/chamo_pkg/test/test_copyright.py deleted file mode 100644 index e69de29..0000000 diff --git a/chamo_pkg/test/test_flake8.py b/chamo_pkg/test/test_flake8.py deleted file mode 100644 index e69de29..0000000 diff --git a/chamo_pkg/test/test_pep257.py b/chamo_pkg/test/test_pep257.py deleted file mode 100644 index e69de29..0000000 From d13a28a6e6bf97df94d89c5b51d9cad5949403b3 Mon Sep 17 00:00:00 2001 From: Jacksiton Date: Thu, 9 Mar 2023 09:03:47 -0500 Subject: [PATCH 27/53] jack --- log/latest_build | 2 +- peruano_pkg/package.xml | 18 ++++++++++++++++++ peruano_pkg/peruano_pkg/__init__.py | 0 peruano_pkg/peruano_pkg/jack_pub.py | 0 peruano_pkg/peruano_pkg/jack_sub.py | 0 peruano_pkg/peruano_pkg/jackson.py | 6 ++++++ peruano_pkg/resource/peruano_pkg | 0 peruano_pkg/setup.cfg | 4 ++++ peruano_pkg/setup.py | 26 ++++++++++++++++++++++++++ peruano_pkg/test/test_copyright.py | 23 +++++++++++++++++++++++ peruano_pkg/test/test_flake8.py | 25 +++++++++++++++++++++++++ peruano_pkg/test/test_pep257.py | 23 +++++++++++++++++++++++ 12 files changed, 126 insertions(+), 1 deletion(-) create mode 100644 peruano_pkg/package.xml create mode 100644 peruano_pkg/peruano_pkg/__init__.py create mode 100644 peruano_pkg/peruano_pkg/jack_pub.py create mode 100644 peruano_pkg/peruano_pkg/jack_sub.py create mode 100644 peruano_pkg/peruano_pkg/jackson.py create mode 100644 peruano_pkg/resource/peruano_pkg create mode 100644 peruano_pkg/setup.cfg create mode 100644 peruano_pkg/setup.py create mode 100644 peruano_pkg/test/test_copyright.py create mode 100644 peruano_pkg/test/test_flake8.py create mode 100644 peruano_pkg/test/test_pep257.py diff --git a/log/latest_build b/log/latest_build index bab522f..d793303 120000 --- a/log/latest_build +++ b/log/latest_build @@ -1 +1 @@ -build_2023-03-09_08-49-54 \ No newline at end of file +build_2023-03-09_08-59-51 \ No newline at end of file diff --git a/peruano_pkg/package.xml b/peruano_pkg/package.xml new file mode 100644 index 0000000..a2d76af --- /dev/null +++ b/peruano_pkg/package.xml @@ -0,0 +1,18 @@ + + + + peruano_pkg + 0.0.0 + TODO: Package description + jackson + TODO: License declaration + + ament_copyright + ament_flake8 + ament_pep257 + python3-pytest + + + ament_python + + diff --git a/peruano_pkg/peruano_pkg/__init__.py b/peruano_pkg/peruano_pkg/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/peruano_pkg/peruano_pkg/jack_pub.py b/peruano_pkg/peruano_pkg/jack_pub.py new file mode 100644 index 0000000..e69de29 diff --git a/peruano_pkg/peruano_pkg/jack_sub.py b/peruano_pkg/peruano_pkg/jack_sub.py new file mode 100644 index 0000000..e69de29 diff --git a/peruano_pkg/peruano_pkg/jackson.py b/peruano_pkg/peruano_pkg/jackson.py new file mode 100644 index 0000000..d2aa769 --- /dev/null +++ b/peruano_pkg/peruano_pkg/jackson.py @@ -0,0 +1,6 @@ +def main(): + print('Hi from peruano_pkg.') + + +if __name__ == '__main__': + main() diff --git a/peruano_pkg/resource/peruano_pkg b/peruano_pkg/resource/peruano_pkg new file mode 100644 index 0000000..e69de29 diff --git a/peruano_pkg/setup.cfg b/peruano_pkg/setup.cfg new file mode 100644 index 0000000..3614dd9 --- /dev/null +++ b/peruano_pkg/setup.cfg @@ -0,0 +1,4 @@ +[develop] +script-dir=$base/lib/peruano_pkg +[install] +install-scripts=$base/lib/peruano_pkg diff --git a/peruano_pkg/setup.py b/peruano_pkg/setup.py new file mode 100644 index 0000000..25cfa2f --- /dev/null +++ b/peruano_pkg/setup.py @@ -0,0 +1,26 @@ +from setuptools import setup + +package_name = 'peruano_pkg' + +setup( + name=package_name, + version='0.0.0', + packages=[package_name], + data_files=[ + ('share/ament_index/resource_index/packages', + ['resource/' + package_name]), + ('share/' + package_name, ['package.xml']), + ], + install_requires=['setuptools'], + zip_safe=True, + maintainer='jackson', + maintainer_email='jdicano1319@gmail.com', + description='TODO: Package description', + license='TODO: License declaration', + tests_require=['pytest'], + entry_points={ + 'console_scripts': [ + 'jackson = peruano_pkg.jackson:main' + ], + }, +) diff --git a/peruano_pkg/test/test_copyright.py b/peruano_pkg/test/test_copyright.py new file mode 100644 index 0000000..cc8ff03 --- /dev/null +++ b/peruano_pkg/test/test_copyright.py @@ -0,0 +1,23 @@ +# Copyright 2015 Open Source Robotics Foundation, Inc. +# +# 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. + +from ament_copyright.main import main +import pytest + + +@pytest.mark.copyright +@pytest.mark.linter +def test_copyright(): + rc = main(argv=['.', 'test']) + assert rc == 0, 'Found errors' diff --git a/peruano_pkg/test/test_flake8.py b/peruano_pkg/test/test_flake8.py new file mode 100644 index 0000000..27ee107 --- /dev/null +++ b/peruano_pkg/test/test_flake8.py @@ -0,0 +1,25 @@ +# Copyright 2017 Open Source Robotics Foundation, Inc. +# +# 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. + +from ament_flake8.main import main_with_errors +import pytest + + +@pytest.mark.flake8 +@pytest.mark.linter +def test_flake8(): + rc, errors = main_with_errors(argv=[]) + assert rc == 0, \ + 'Found %d code style errors / warnings:\n' % len(errors) + \ + '\n'.join(errors) diff --git a/peruano_pkg/test/test_pep257.py b/peruano_pkg/test/test_pep257.py new file mode 100644 index 0000000..b234a38 --- /dev/null +++ b/peruano_pkg/test/test_pep257.py @@ -0,0 +1,23 @@ +# Copyright 2015 Open Source Robotics Foundation, Inc. +# +# 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. + +from ament_pep257.main import main +import pytest + + +@pytest.mark.linter +@pytest.mark.pep257 +def test_pep257(): + rc = main(argv=['.', 'test']) + assert rc == 0, 'Found code style errors / warnings' From 859251f1eb81ba6358c32c18c8c03e77d6f0142d Mon Sep 17 00:00:00 2001 From: Jacksiton Date: Thu, 9 Mar 2023 09:08:12 -0500 Subject: [PATCH 28/53] jack --- peruano_pkg/setup.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/peruano_pkg/setup.py b/peruano_pkg/setup.py index 25cfa2f..c08ac26 100644 --- a/peruano_pkg/setup.py +++ b/peruano_pkg/setup.py @@ -21,6 +21,8 @@ entry_points={ 'console_scripts': [ 'jackson = peruano_pkg.jackson:main' + 'talker = peruano_pkg.jack_pub:main' + 'listener = peruano_pkg.jack_sub:main' ], }, ) From 8843f5e3e78d27ff4e421c99c6767ead3d2caf91 Mon Sep 17 00:00:00 2001 From: Jacksiton Date: Thu, 9 Mar 2023 09:11:05 -0500 Subject: [PATCH 29/53] comit --- peruano_pkg/peruano_pkg/jack_pub.py | 39 +++++++++++++++++++++++++++++ peruano_pkg/peruano_pkg/jack_sub.py | 37 +++++++++++++++++++++++++++ 2 files changed, 76 insertions(+) diff --git a/peruano_pkg/peruano_pkg/jack_pub.py b/peruano_pkg/peruano_pkg/jack_pub.py index e69de29..fff0ae1 100644 --- a/peruano_pkg/peruano_pkg/jack_pub.py +++ b/peruano_pkg/peruano_pkg/jack_pub.py @@ -0,0 +1,39 @@ +import rclpy +from rclpy.node import Node + +from std_msgs.msg import String + + +class MinimalPublisher(Node): + + def __init__(self): + super().__init__('minimal_publisher') + self.publisher_ = self.create_publisher(String, 'topic', 10) + timer_period = 0.5 # seconds + self.timer = self.create_timer(timer_period, self.timer_callback) + self.i = 0 + + def timer_callback(self): + msg = String() + msg.data = 'Hello World: %d' % self.i + self.publisher_.publish(msg) + self.get_logger().info('Publishing: "%s"' % msg.data) + self.i += 1 + + +def main(args=None): + rclpy.init(args=args) + + minimal_publisher = MinimalPublisher() + + rclpy.spin(minimal_publisher) + + # Destroy the node explicitly + # (optional - otherwise it will be done automatically + # when the garbage collector destroys the node object) + minimal_publisher.destroy_node() + rclpy.shutdown() + + +if __name__ == '__main__': + main() \ No newline at end of file diff --git a/peruano_pkg/peruano_pkg/jack_sub.py b/peruano_pkg/peruano_pkg/jack_sub.py index e69de29..90b6807 100644 --- a/peruano_pkg/peruano_pkg/jack_sub.py +++ b/peruano_pkg/peruano_pkg/jack_sub.py @@ -0,0 +1,37 @@ +import rclpy +from rclpy.node import Node + +from std_msgs.msg import String + + +class MinimalSubscriber(Node): + + def __init__(self): + super().__init__('minimal_subscriber') + self.subscription = self.create_subscription( + String, + 'topic', + self.listener_callback, + 10) + self.subscription # prevent unused variable warning + + def listener_callback(self, msg): + self.get_logger().info('I heard: "%s"' % msg.data) + + +def main(args=None): + rclpy.init(args=args) + + minimal_subscriber = MinimalSubscriber() + + rclpy.spin(minimal_subscriber) + + # Destroy the node explicitly + # (optional - otherwise it will be done automatically + # when the garbage collector destroys the node object) + minimal_subscriber.destroy_node() + rclpy.shutdown() + + +if __name__ == '__main__': + main() \ No newline at end of file From a4eefbffb9799a281965d8c14272770c60630f09 Mon Sep 17 00:00:00 2001 From: Jacksiton Date: Thu, 9 Mar 2023 09:12:57 -0500 Subject: [PATCH 30/53] otro mas --- peruano_pkg/peruano_pkg/jackson.py | 6 ------ peruano_pkg/setup.py | 1 - 2 files changed, 7 deletions(-) delete mode 100644 peruano_pkg/peruano_pkg/jackson.py diff --git a/peruano_pkg/peruano_pkg/jackson.py b/peruano_pkg/peruano_pkg/jackson.py deleted file mode 100644 index d2aa769..0000000 --- a/peruano_pkg/peruano_pkg/jackson.py +++ /dev/null @@ -1,6 +0,0 @@ -def main(): - print('Hi from peruano_pkg.') - - -if __name__ == '__main__': - main() diff --git a/peruano_pkg/setup.py b/peruano_pkg/setup.py index c08ac26..8c55496 100644 --- a/peruano_pkg/setup.py +++ b/peruano_pkg/setup.py @@ -20,7 +20,6 @@ tests_require=['pytest'], entry_points={ 'console_scripts': [ - 'jackson = peruano_pkg.jackson:main' 'talker = peruano_pkg.jack_pub:main' 'listener = peruano_pkg.jack_sub:main' ], From 7df6f9bb7aae96d88bc5dbde2ab5f585445f9200 Mon Sep 17 00:00:00 2001 From: Jacksiton Date: Thu, 9 Mar 2023 09:15:06 -0500 Subject: [PATCH 31/53] chamo --- peruano_pkg/package.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/peruano_pkg/package.xml b/peruano_pkg/package.xml index a2d76af..45c5bb5 100644 --- a/peruano_pkg/package.xml +++ b/peruano_pkg/package.xml @@ -7,6 +7,9 @@ jackson TODO: License declaration + rclpy + std_msgs + ament_copyright ament_flake8 ament_pep257 From 269d1865cec7d51deba5d4b71ac2c60dae60ea63 Mon Sep 17 00:00:00 2001 From: Jacksiton Date: Thu, 9 Mar 2023 09:35:46 -0500 Subject: [PATCH 32/53] jack --- peruano_pkg/peruano_pkg/prueba.py | 31 +++++++++++++++++++++++++++++++ peruano_pkg/setup.py | 4 ++-- 2 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 peruano_pkg/peruano_pkg/prueba.py diff --git a/peruano_pkg/peruano_pkg/prueba.py b/peruano_pkg/peruano_pkg/prueba.py new file mode 100644 index 0000000..0979a1f --- /dev/null +++ b/peruano_pkg/peruano_pkg/prueba.py @@ -0,0 +1,31 @@ +import rclpy +from rclpy.node import Node +from std_msgs.msg import String + +class MyNode(Node): + + def _init_(self): + super()._init_('jackson') + self.publisher_ = self.create_publisher(String, 'my_topic', 10) + self.subscription_ = self.create_subscription(String, 'my_topic', self.callback, 10) + self.subscription_ + + def callback(self, msg): + self.get_logger().info('Received message: "%s"' % msg.data) + + response_msg = String() + response_msg.data = 'Received message: "%s"' % msg.data + self.publisher_.publish(response_msg) + +def main(args=None): + rclpy.init(args=args) + + node = MyNode() + + rclpy.spin(node) + + node.destroy_node() + rclpy.shutdown() + +if __name__ == '__main__': + main() \ No newline at end of file diff --git a/peruano_pkg/setup.py b/peruano_pkg/setup.py index 8c55496..f8fb685 100644 --- a/peruano_pkg/setup.py +++ b/peruano_pkg/setup.py @@ -20,8 +20,8 @@ tests_require=['pytest'], entry_points={ 'console_scripts': [ - 'talker = peruano_pkg.jack_pub:main' - 'listener = peruano_pkg.jack_sub:main' + 'talker = peruano_pkg.jack_pub:main', + 'listener = peruano_pkg.jack_sub:main', ], }, ) From b96ed25201815a460ad8e7928aa8b510f0611b12 Mon Sep 17 00:00:00 2001 From: Jacksiton Date: Thu, 9 Mar 2023 09:37:27 -0500 Subject: [PATCH 33/53] awd --- peruano_pkg/setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/peruano_pkg/setup.py b/peruano_pkg/setup.py index f8fb685..a101ff1 100644 --- a/peruano_pkg/setup.py +++ b/peruano_pkg/setup.py @@ -22,6 +22,7 @@ 'console_scripts': [ 'talker = peruano_pkg.jack_pub:main', 'listener = peruano_pkg.jack_sub:main', + 'jack = peruano_pkg.prueba:main', ], }, ) From a98504192f733b630ac4ee5b026f99a9cfc9984f Mon Sep 17 00:00:00 2001 From: Jacksiton Date: Thu, 9 Mar 2023 09:38:43 -0500 Subject: [PATCH 34/53] dwa --- peruano_pkg/setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/peruano_pkg/setup.py b/peruano_pkg/setup.py index a101ff1..d9df3ff 100644 --- a/peruano_pkg/setup.py +++ b/peruano_pkg/setup.py @@ -22,7 +22,7 @@ 'console_scripts': [ 'talker = peruano_pkg.jack_pub:main', 'listener = peruano_pkg.jack_sub:main', - 'jack = peruano_pkg.prueba:main', + 'jackson = peruano_pkg.prueba:main', ], }, ) From 57b8472ed7f61b0ad36e99b9132a7daf7c1ae64c Mon Sep 17 00:00:00 2001 From: Jacksiton Date: Thu, 9 Mar 2023 09:42:14 -0500 Subject: [PATCH 35/53] jack --- peruano_pkg/package.xml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/peruano_pkg/package.xml b/peruano_pkg/package.xml index 45c5bb5..ea5d078 100644 --- a/peruano_pkg/package.xml +++ b/peruano_pkg/package.xml @@ -10,6 +10,15 @@ rclpy std_msgs + cv_bridge + cv_bridge + image_transport + image_transport + sensor_msgs + sensor_msgs + OpenCV + OpenCV + ament_copyright ament_flake8 ament_pep257 From c9d6324073b2616100dc1d1409d68a4593503894 Mon Sep 17 00:00:00 2001 From: Jacksiton Date: Thu, 9 Mar 2023 09:46:24 -0500 Subject: [PATCH 36/53] jackson --- peruano_pkg/peruano_pkg/prueba.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/peruano_pkg/peruano_pkg/prueba.py b/peruano_pkg/peruano_pkg/prueba.py index 0979a1f..d7af185 100644 --- a/peruano_pkg/peruano_pkg/prueba.py +++ b/peruano_pkg/peruano_pkg/prueba.py @@ -5,7 +5,7 @@ class MyNode(Node): def _init_(self): - super()._init_('jackson') + super().__init__('my_node') self.publisher_ = self.create_publisher(String, 'my_topic', 10) self.subscription_ = self.create_subscription(String, 'my_topic', self.callback, 10) self.subscription_ From 19f3c9451a86172ec401f2dbb8a0e6d3266541ca Mon Sep 17 00:00:00 2001 From: Jacksiton Date: Thu, 9 Mar 2023 09:47:18 -0500 Subject: [PATCH 37/53] otro --- peruano_pkg/peruano_pkg/prueba.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/peruano_pkg/peruano_pkg/prueba.py b/peruano_pkg/peruano_pkg/prueba.py index d7af185..8bc06cf 100644 --- a/peruano_pkg/peruano_pkg/prueba.py +++ b/peruano_pkg/peruano_pkg/prueba.py @@ -5,7 +5,7 @@ class MyNode(Node): def _init_(self): - super().__init__('my_node') + super().__init__('minimal_subscriber') self.publisher_ = self.create_publisher(String, 'my_topic', 10) self.subscription_ = self.create_subscription(String, 'my_topic', self.callback, 10) self.subscription_ From ec1734fbe9f3ebbf4e46812486fb9fa4e93421ee Mon Sep 17 00:00:00 2001 From: Jacksiton Date: Wed, 15 Mar 2023 11:06:31 -0500 Subject: [PATCH 38/53] trabajito --- launch/Nodos.launch.py | 26 ++++++++++++++++ launch/Tarea.launch.py | 20 ++++++++++++ peruano_pkg/peruano_pkg/P_EnviarFoto.py | 34 +++++++++++++++++++++ peruano_pkg/peruano_pkg/P_RecibirFoto.py | 29 ++++++++++++++++++ peruano_pkg/peruano_pkg/T_LinSpeed.py | 37 ++++++++++++++++++++++ peruano_pkg/peruano_pkg/T_PubRpm.py | 39 ++++++++++++++++++++++++ peruano_pkg/peruano_pkg/T_PubSub.py | 39 ++++++++++++++++++++++++ 7 files changed, 224 insertions(+) create mode 100644 launch/Nodos.launch.py create mode 100644 launch/Tarea.launch.py create mode 100644 peruano_pkg/peruano_pkg/P_EnviarFoto.py create mode 100644 peruano_pkg/peruano_pkg/P_RecibirFoto.py create mode 100644 peruano_pkg/peruano_pkg/T_LinSpeed.py create mode 100644 peruano_pkg/peruano_pkg/T_PubRpm.py create mode 100644 peruano_pkg/peruano_pkg/T_PubSub.py diff --git a/launch/Nodos.launch.py b/launch/Nodos.launch.py new file mode 100644 index 0000000..ab950b9 --- /dev/null +++ b/launch/Nodos.launch.py @@ -0,0 +1,26 @@ +import launch +import launch_ros.actions +import launch_ros.substitutions + +def generate_launch_description(): + node1 = launch_ros.actions.Node( + package='peruano_pkg', + executable='Rpm', + name='nodo1' + ) + node2 = launch_ros.actions.Node( + package='peruano_pkg', + executable='SupPub', + name='nodo2' + ) + node3 = launch_ros.actions.Node( + package='peruano_pkg', + executable='LinSpeed', + name='nodo3' + ) + + return launch.LaunchDescription([ + node1, + node2, + node3 + ]) \ No newline at end of file diff --git a/launch/Tarea.launch.py b/launch/Tarea.launch.py new file mode 100644 index 0000000..d665ba8 --- /dev/null +++ b/launch/Tarea.launch.py @@ -0,0 +1,20 @@ +import launch +import launch_ros.actions +import launch_ros.substitutions + +def generate_launch_description(): + node1 = launch_ros.actions.Node( + package='peruano_pkg', + executable='P1E', + name='nodo1' + ) + node2 = launch_ros.actions.Node( + package='peruano_pkg', + executable='P1R', + name='nodo2' + ) + + return launch.LaunchDescription([ + node1, + node2 + ]) \ No newline at end of file diff --git a/peruano_pkg/peruano_pkg/P_EnviarFoto.py b/peruano_pkg/peruano_pkg/P_EnviarFoto.py new file mode 100644 index 0000000..35a5c26 --- /dev/null +++ b/peruano_pkg/peruano_pkg/P_EnviarFoto.py @@ -0,0 +1,34 @@ +import cv2 +import numpy as np +import rclpy +from rclpy.node import Node +from sensor_msgs.msg import Image +from cv_bridge import CvBridge + +class ImagePublisher(Node): + + def _init_(self): + super()._init_('image_publisher') + self.publisher_ = self.create_publisher(Image, 'ALO', 10) + self.timer_ = self.create_timer(0.1, self.publish_image) + self.bridge_ = CvBridge() + + def publish_image(self): + # Creamos una imagen de 640x480 píxeles con tres canales (BGR) + image = np.zeros((480, 640, 3), np.uint8) + # Dibujamos un círculo azul en el centro de la imagen + cv2.circle(image, (320, 240), 100, (255, 0, 0), -1) + # Convertimos la imagen a un mensaje de ROS + msg = self.bridge_.cv2_to_imgmsg(image, 'bgr8') + # Publicamos el mensaje + self.publisher_.publish(msg) + self.get_logger().info('Imagen publicada') + +def main(args=None): + rclpy.init(args=args) + node = ImagePublisher() + rclpy.spin(node) + rclpy.shutdown() + +if __name__ == '_main_': + main() \ No newline at end of file diff --git a/peruano_pkg/peruano_pkg/P_RecibirFoto.py b/peruano_pkg/peruano_pkg/P_RecibirFoto.py new file mode 100644 index 0000000..9806306 --- /dev/null +++ b/peruano_pkg/peruano_pkg/P_RecibirFoto.py @@ -0,0 +1,29 @@ +import rclpy +from rclpy.node import Node +from sensor_msgs.msg import Image + + +class ImageSubscriber(Node): + + def _init_(self): + super()._init_('image_subscriber') + self.subscription = self.create_subscription( + Image, + 'ALO', + self.listener_callback, + 10) + self.subscription # prevent unused variable warning + + def listener_callback(self, msg): + self.get_logger().info('Received an image!') # add your own code here to process the image data + + +def main(args=None): + rclpy.init(args=args) + node = ImageSubscriber() + rclpy.spin(node) + rclpy.shutdown() + + +if __name__ == '_main_': + main() \ No newline at end of file diff --git a/peruano_pkg/peruano_pkg/T_LinSpeed.py b/peruano_pkg/peruano_pkg/T_LinSpeed.py new file mode 100644 index 0000000..16279cf --- /dev/null +++ b/peruano_pkg/peruano_pkg/T_LinSpeed.py @@ -0,0 +1,37 @@ +import rclpy +from rclpy.node import Node + +from std_msgs.msg import String + + +class MinimalSubscriber(Node): + + def _init_(self): + super()._init_('CR_T1_SubLinSpeed') + self.subscription = self.create_subscription( + String, + 'lineal_speed', + self.listener_callback, + 10) + self.subscription # prevent unused variable warning + + def listener_callback(self, msg): + self.get_logger().info('I heard: "%s"' % msg.data) + + +def main(args=None): + rclpy.init(args=args) + + minimal_subscriber = MinimalSubscriber() + + rclpy.spin(minimal_subscriber) + + # Destroy the node explicitly + # (optional - otherwise it will be done automatically + # when the garbage collector destroys the node object) + minimal_subscriber.destroy_node() + rclpy.shutdown() + + +if __name__ == '_main_': + main() \ No newline at end of file diff --git a/peruano_pkg/peruano_pkg/T_PubRpm.py b/peruano_pkg/peruano_pkg/T_PubRpm.py new file mode 100644 index 0000000..700e485 --- /dev/null +++ b/peruano_pkg/peruano_pkg/T_PubRpm.py @@ -0,0 +1,39 @@ +import rclpy +from rclpy.node import Node + +from std_msgs.msg import String + + +class MinimalPublisher(Node): + + def _init_(self): + super()._init_('CR_T1_PUBRPM') + self.publisher_ = self.create_publisher(String, 'RPM', 10) + timer_period = 0.5 # seconds + self.timer = self.create_timer(timer_period, self.timer_callback) + self.i = 0 + + def timer_callback(self): + msg = String() + msg.data = str(3) + self.publisher_.publish(msg) + self.get_logger().info('Publishing: "%s"' % msg.data) + self.i += 1 + + +def main(args=None): + rclpy.init(args=args) + + minimal_publisher = MinimalPublisher() + + rclpy.spin(minimal_publisher) + + # Destroy the node explicitly + # (optional - otherwise it will be done automatically + # when the garbage collector destroys the node object) + minimal_publisher.destroy_node() + rclpy.shutdown() + + +if __name__ == '_main_': + main() \ No newline at end of file diff --git a/peruano_pkg/peruano_pkg/T_PubSub.py b/peruano_pkg/peruano_pkg/T_PubSub.py new file mode 100644 index 0000000..b956acc --- /dev/null +++ b/peruano_pkg/peruano_pkg/T_PubSub.py @@ -0,0 +1,39 @@ +import rclpy +from rclpy.node import Node +from std_msgs.msg import String + +class MyNode(Node): + + def _init_(self): + super()._init_('willypoder') + self.declare_parameter('Radio', 0.10) + sub_topic = self.get_parameter('Radio').value + self.publisher_ = self.create_publisher(String, 'lineal_speed', 10) + self.subscription = self.create_subscription( + String, + 'RPM', + self.listener_callback, + 10) + self.subscription # prevent unused variable warning + + def listener_callback(self, msg): + #self.get_logger().info('I heard: "%s"' % msg.data) + Radio = self.get_parameter('Radio').value + + numin=(float(msg.data)/60)*2*3.141516*Radio + print(numin) + msg.data=str(numin) + self.publisher_.publish(msg) + +def main(args=None): + rclpy.init(args=args) + + my_node = MyNode() + + rclpy.spin(my_node) + + my_node.destroy_node() + rclpy.shutdown() + +if __name__ == '_main_': + main() \ No newline at end of file From 6b746e432e21b39555253b003fd733c84ba5952c Mon Sep 17 00:00:00 2001 From: Jacksiton Date: Wed, 15 Mar 2023 11:17:31 -0500 Subject: [PATCH 39/53] mas --- peruano_pkg/peruano_pkg/T_LinSpeed.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/peruano_pkg/peruano_pkg/T_LinSpeed.py b/peruano_pkg/peruano_pkg/T_LinSpeed.py index 16279cf..79c7e14 100644 --- a/peruano_pkg/peruano_pkg/T_LinSpeed.py +++ b/peruano_pkg/peruano_pkg/T_LinSpeed.py @@ -7,7 +7,7 @@ class MinimalSubscriber(Node): def _init_(self): - super()._init_('CR_T1_SubLinSpeed') + super()._init_('T_LinSpeed') self.subscription = self.create_subscription( String, 'lineal_speed', From e6163e734e638ddec918fa3b0b28282a5ba8acc4 Mon Sep 17 00:00:00 2001 From: Jacksiton Date: Wed, 15 Mar 2023 11:24:51 -0500 Subject: [PATCH 40/53] champo --- peruano_pkg/setup.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/peruano_pkg/setup.py b/peruano_pkg/setup.py index d9df3ff..4f19f10 100644 --- a/peruano_pkg/setup.py +++ b/peruano_pkg/setup.py @@ -1,7 +1,16 @@ from setuptools import setup +import os +from glob import glob +from setuptools import setup +from setuptools import find_packages package_name = 'peruano_pkg' +package_files = [ + 'launch/Tarea.launch.py', + 'launch/Nodos.launch.py', +] +#### setup( name=package_name, version='0.0.0', @@ -10,6 +19,10 @@ ('share/ament_index/resource_index/packages', ['resource/' + package_name]), ('share/' + package_name, ['package.xml']), + #COLOQUE NUEVO + #('share/' + package_name, package_files), + #('share/' + package_name + '/launch', package_files), + (os.path.join('share', package_name, 'launch'), glob('launch/*.py')), ], install_requires=['setuptools'], zip_safe=True, @@ -23,6 +36,12 @@ 'talker = peruano_pkg.jack_pub:main', 'listener = peruano_pkg.jack_sub:main', 'jackson = peruano_pkg.prueba:main', + 'rpm = peruano_pkg.T_PubRpm:main', + 'suppub = peruano_pkg.T_PubSub:main', + 'linspeed = peruano_pkg.T_LinSpeed:main', + 'penviar = peruano_pkg.P_EnviarFoto:main', + 'precibir = peruano_pkg.P_RecibirFoto:main', ], + }, ) From 996be1cf350c9eeef975e8eaa06e446f1d500b6f Mon Sep 17 00:00:00 2001 From: Jacksiton Date: Wed, 15 Mar 2023 11:27:48 -0500 Subject: [PATCH 41/53] otro --- peruano_pkg/peruano_pkg/T_PubSub.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/peruano_pkg/peruano_pkg/T_PubSub.py b/peruano_pkg/peruano_pkg/T_PubSub.py index b956acc..7effc08 100644 --- a/peruano_pkg/peruano_pkg/T_PubSub.py +++ b/peruano_pkg/peruano_pkg/T_PubSub.py @@ -5,7 +5,7 @@ class MyNode(Node): def _init_(self): - super()._init_('willypoder') + super()._init_('jackson') self.declare_parameter('Radio', 0.10) sub_topic = self.get_parameter('Radio').value self.publisher_ = self.create_publisher(String, 'lineal_speed', 10) From 0233f1f9485072d11c7269b8a383fadd8aaceff8 Mon Sep 17 00:00:00 2001 From: Jacksiton Date: Wed, 15 Mar 2023 11:28:02 -0500 Subject: [PATCH 42/53] otromas --- peruano_pkg/peruano_pkg/prueba.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/peruano_pkg/peruano_pkg/prueba.py b/peruano_pkg/peruano_pkg/prueba.py index 8bc06cf..fcf5379 100644 --- a/peruano_pkg/peruano_pkg/prueba.py +++ b/peruano_pkg/peruano_pkg/prueba.py @@ -5,9 +5,9 @@ class MyNode(Node): def _init_(self): - super().__init__('minimal_subscriber') - self.publisher_ = self.create_publisher(String, 'my_topic', 10) - self.subscription_ = self.create_subscription(String, 'my_topic', self.callback, 10) + super().__init__('jackson') + self.publisher_ = self.create_publisher(String, 'LinSpeed', 10) + self.subscription_ = self.create_subscription(String, 'Rpm', self.callback, 10) self.subscription_ def callback(self, msg): From f3a40bf3a5ed9e6b4009953cbbb1632362c30d28 Mon Sep 17 00:00:00 2001 From: Jacksiton Date: Wed, 15 Mar 2023 11:30:53 -0500 Subject: [PATCH 43/53] dawd --- peruano_pkg/setup.py | 1 - 1 file changed, 1 deletion(-) diff --git a/peruano_pkg/setup.py b/peruano_pkg/setup.py index 4f19f10..da2165b 100644 --- a/peruano_pkg/setup.py +++ b/peruano_pkg/setup.py @@ -35,7 +35,6 @@ 'console_scripts': [ 'talker = peruano_pkg.jack_pub:main', 'listener = peruano_pkg.jack_sub:main', - 'jackson = peruano_pkg.prueba:main', 'rpm = peruano_pkg.T_PubRpm:main', 'suppub = peruano_pkg.T_PubSub:main', 'linspeed = peruano_pkg.T_LinSpeed:main', From fb50ca15bcd37d0c4135059eac384656bfc363af Mon Sep 17 00:00:00 2001 From: Jacksiton Date: Wed, 15 Mar 2023 11:39:36 -0500 Subject: [PATCH 44/53] dw --- peruano_pkg/peruano_pkg/T_LinSpeed.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/peruano_pkg/peruano_pkg/T_LinSpeed.py b/peruano_pkg/peruano_pkg/T_LinSpeed.py index 79c7e14..9eab9f9 100644 --- a/peruano_pkg/peruano_pkg/T_LinSpeed.py +++ b/peruano_pkg/peruano_pkg/T_LinSpeed.py @@ -22,7 +22,7 @@ def listener_callback(self, msg): def main(args=None): rclpy.init(args=args) - minimal_subscriber = MinimalSubscriber() + minimal_subscriber = MinimalSubscriber(node_name='linspeed') rclpy.spin(minimal_subscriber) From 47a60a224538727e06ce2bf88ce46a25f08bfa8e Mon Sep 17 00:00:00 2001 From: Jacksiton Date: Wed, 15 Mar 2023 11:40:42 -0500 Subject: [PATCH 45/53] daw --- peruano_pkg/peruano_pkg/P_EnviarFoto.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/peruano_pkg/peruano_pkg/P_EnviarFoto.py b/peruano_pkg/peruano_pkg/P_EnviarFoto.py index 35a5c26..2b6c848 100644 --- a/peruano_pkg/peruano_pkg/P_EnviarFoto.py +++ b/peruano_pkg/peruano_pkg/P_EnviarFoto.py @@ -26,7 +26,7 @@ def publish_image(self): def main(args=None): rclpy.init(args=args) - node = ImagePublisher() + node = ImagePublisher(node_name='penviar') rclpy.spin(node) rclpy.shutdown() From d3bd7e096d077056e1f5208c87115c3624776bd8 Mon Sep 17 00:00:00 2001 From: Jacksiton Date: Wed, 15 Mar 2023 11:42:41 -0500 Subject: [PATCH 46/53] dwa --- peruano_pkg/peruano_pkg/P_RecibirFoto.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/peruano_pkg/peruano_pkg/P_RecibirFoto.py b/peruano_pkg/peruano_pkg/P_RecibirFoto.py index 9806306..d572a56 100644 --- a/peruano_pkg/peruano_pkg/P_RecibirFoto.py +++ b/peruano_pkg/peruano_pkg/P_RecibirFoto.py @@ -20,7 +20,7 @@ def listener_callback(self, msg): def main(args=None): rclpy.init(args=args) - node = ImageSubscriber() + node = ImageSubscriber(node_name='precibir') rclpy.spin(node) rclpy.shutdown() From dee90753864c8f7a15f2a3603a2d18f992bd0e60 Mon Sep 17 00:00:00 2001 From: Jacksiton Date: Wed, 15 Mar 2023 11:45:44 -0500 Subject: [PATCH 47/53] daw --- peruano_pkg/peruano_pkg/jack_pub.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/peruano_pkg/peruano_pkg/jack_pub.py b/peruano_pkg/peruano_pkg/jack_pub.py index fff0ae1..24c263c 100644 --- a/peruano_pkg/peruano_pkg/jack_pub.py +++ b/peruano_pkg/peruano_pkg/jack_pub.py @@ -24,7 +24,7 @@ def timer_callback(self): def main(args=None): rclpy.init(args=args) - minimal_publisher = MinimalPublisher() + minimal_publisher = MinimalPublisher(node_name='talker') rclpy.spin(minimal_publisher) From 7627853422f4e2c74793b59e0a7f32473e6d9eba Mon Sep 17 00:00:00 2001 From: Jacksiton Date: Wed, 15 Mar 2023 11:50:16 -0500 Subject: [PATCH 48/53] mas --- peruano_pkg/peruano_pkg/T_LinSpeed.py | 5 ++--- peruano_pkg/peruano_pkg/jack_pub.py | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/peruano_pkg/peruano_pkg/T_LinSpeed.py b/peruano_pkg/peruano_pkg/T_LinSpeed.py index 9eab9f9..eded518 100644 --- a/peruano_pkg/peruano_pkg/T_LinSpeed.py +++ b/peruano_pkg/peruano_pkg/T_LinSpeed.py @@ -7,7 +7,7 @@ class MinimalSubscriber(Node): def _init_(self): - super()._init_('T_LinSpeed') + super()._init_('minimal_subscriber') self.subscription = self.create_subscription( String, 'lineal_speed', @@ -22,8 +22,7 @@ def listener_callback(self, msg): def main(args=None): rclpy.init(args=args) - minimal_subscriber = MinimalSubscriber(node_name='linspeed') - + minimal_subscriber = MinimalSubscriber() rclpy.spin(minimal_subscriber) # Destroy the node explicitly diff --git a/peruano_pkg/peruano_pkg/jack_pub.py b/peruano_pkg/peruano_pkg/jack_pub.py index 24c263c..fff0ae1 100644 --- a/peruano_pkg/peruano_pkg/jack_pub.py +++ b/peruano_pkg/peruano_pkg/jack_pub.py @@ -24,7 +24,7 @@ def timer_callback(self): def main(args=None): rclpy.init(args=args) - minimal_publisher = MinimalPublisher(node_name='talker') + minimal_publisher = MinimalPublisher() rclpy.spin(minimal_publisher) From 56ed5457f5b0c717dc173a5c8ead277ab560ebc3 Mon Sep 17 00:00:00 2001 From: Jacksiton Date: Wed, 15 Mar 2023 11:52:05 -0500 Subject: [PATCH 49/53] aaa --- peruano_pkg/peruano_pkg/T_LinSpeed.py | 1 - 1 file changed, 1 deletion(-) diff --git a/peruano_pkg/peruano_pkg/T_LinSpeed.py b/peruano_pkg/peruano_pkg/T_LinSpeed.py index eded518..b5d5af7 100644 --- a/peruano_pkg/peruano_pkg/T_LinSpeed.py +++ b/peruano_pkg/peruano_pkg/T_LinSpeed.py @@ -21,7 +21,6 @@ def listener_callback(self, msg): def main(args=None): rclpy.init(args=args) - minimal_subscriber = MinimalSubscriber() rclpy.spin(minimal_subscriber) From e4943dd06ba3bfc54aaa5f3f0fa9efedc5ea5d65 Mon Sep 17 00:00:00 2001 From: Jacksiton Date: Wed, 15 Mar 2023 11:54:09 -0500 Subject: [PATCH 50/53] dwad --- peruano_pkg/peruano_pkg/T_LinSpeed.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/peruano_pkg/peruano_pkg/T_LinSpeed.py b/peruano_pkg/peruano_pkg/T_LinSpeed.py index b5d5af7..bdae15b 100644 --- a/peruano_pkg/peruano_pkg/T_LinSpeed.py +++ b/peruano_pkg/peruano_pkg/T_LinSpeed.py @@ -10,7 +10,7 @@ def _init_(self): super()._init_('minimal_subscriber') self.subscription = self.create_subscription( String, - 'lineal_speed', + 'LinSpeed', self.listener_callback, 10) self.subscription # prevent unused variable warning From 0cd9d2fe36650f0563268c1a58acc907183fe579 Mon Sep 17 00:00:00 2001 From: Jacksiton Date: Wed, 15 Mar 2023 11:56:23 -0500 Subject: [PATCH 51/53] gamindaw --- peruano_pkg/peruano_pkg/T_LinSpeed.py | 2 +- peruano_pkg/setup.py | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/peruano_pkg/peruano_pkg/T_LinSpeed.py b/peruano_pkg/peruano_pkg/T_LinSpeed.py index bdae15b..b5d5af7 100644 --- a/peruano_pkg/peruano_pkg/T_LinSpeed.py +++ b/peruano_pkg/peruano_pkg/T_LinSpeed.py @@ -10,7 +10,7 @@ def _init_(self): super()._init_('minimal_subscriber') self.subscription = self.create_subscription( String, - 'LinSpeed', + 'lineal_speed', self.listener_callback, 10) self.subscription # prevent unused variable warning diff --git a/peruano_pkg/setup.py b/peruano_pkg/setup.py index da2165b..faed28e 100644 --- a/peruano_pkg/setup.py +++ b/peruano_pkg/setup.py @@ -34,7 +34,6 @@ entry_points={ 'console_scripts': [ 'talker = peruano_pkg.jack_pub:main', - 'listener = peruano_pkg.jack_sub:main', 'rpm = peruano_pkg.T_PubRpm:main', 'suppub = peruano_pkg.T_PubSub:main', 'linspeed = peruano_pkg.T_LinSpeed:main', From af47a50179d5dd21e34d1d23bb62e90d45e0672e Mon Sep 17 00:00:00 2001 From: Jacksiton Date: Wed, 15 Mar 2023 11:58:11 -0500 Subject: [PATCH 52/53] dawda --- peruano_pkg/peruano_pkg/P_EnviarFoto.py | 2 +- peruano_pkg/peruano_pkg/P_RecibirFoto.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/peruano_pkg/peruano_pkg/P_EnviarFoto.py b/peruano_pkg/peruano_pkg/P_EnviarFoto.py index 2b6c848..35a5c26 100644 --- a/peruano_pkg/peruano_pkg/P_EnviarFoto.py +++ b/peruano_pkg/peruano_pkg/P_EnviarFoto.py @@ -26,7 +26,7 @@ def publish_image(self): def main(args=None): rclpy.init(args=args) - node = ImagePublisher(node_name='penviar') + node = ImagePublisher() rclpy.spin(node) rclpy.shutdown() diff --git a/peruano_pkg/peruano_pkg/P_RecibirFoto.py b/peruano_pkg/peruano_pkg/P_RecibirFoto.py index d572a56..9806306 100644 --- a/peruano_pkg/peruano_pkg/P_RecibirFoto.py +++ b/peruano_pkg/peruano_pkg/P_RecibirFoto.py @@ -20,7 +20,7 @@ def listener_callback(self, msg): def main(args=None): rclpy.init(args=args) - node = ImageSubscriber(node_name='precibir') + node = ImageSubscriber() rclpy.spin(node) rclpy.shutdown() From c5e267f2341396f6d8e60c772035e3a62318d374 Mon Sep 17 00:00:00 2001 From: Jacksiton Date: Wed, 22 Mar 2023 16:59:59 -0500 Subject: [PATCH 53/53] chamitoo --- install/.colcon_install_layout | 0 install/COLCON_IGNORE | 0 install/_local_setup_util_ps1.py | 0 install/_local_setup_util_sh.py | 0 install/chamo/share/ament_index/resource_index/packages/chamo | 0 install/chamo/share/chamo/hook/ament_prefix_path.dsv | 0 install/chamo/share/chamo/hook/ament_prefix_path.ps1 | 0 install/chamo/share/chamo/hook/ament_prefix_path.sh | 0 install/chamo/share/chamo/hook/pythonpath.dsv | 0 install/chamo/share/chamo/hook/pythonpath.ps1 | 0 install/chamo/share/chamo/hook/pythonpath.sh | 0 install/chamo/share/chamo/package.bash | 0 install/chamo/share/chamo/package.dsv | 0 install/chamo/share/chamo/package.ps1 | 0 install/chamo/share/chamo/package.sh | 0 install/chamo/share/chamo/package.xml | 0 install/chamo/share/chamo/package.zsh | 0 install/chamo/share/colcon-core/packages/chamo | 0 install/local_setup.bash | 0 install/local_setup.ps1 | 0 install/local_setup.sh | 0 install/local_setup.zsh | 0 .../ament_index/resource_index/package_run_dependencies/lolito | 0 install/lolito/share/ament_index/resource_index/packages/lolito | 0 .../share/ament_index/resource_index/parent_prefix_path/lolito | 0 install/lolito/share/colcon-core/packages/lolito | 0 install/lolito/share/lolito/cmake/lolitoConfig-version.cmake | 0 install/lolito/share/lolito/cmake/lolitoConfig.cmake | 0 install/lolito/share/lolito/environment/ament_prefix_path.dsv | 0 install/lolito/share/lolito/environment/ament_prefix_path.sh | 0 install/lolito/share/lolito/environment/path.dsv | 0 install/lolito/share/lolito/environment/path.sh | 0 install/lolito/share/lolito/environment/pythonpath.dsv | 0 install/lolito/share/lolito/environment/pythonpath.sh | 0 install/lolito/share/lolito/hook/cmake_prefix_path.dsv | 0 install/lolito/share/lolito/hook/cmake_prefix_path.ps1 | 0 install/lolito/share/lolito/hook/cmake_prefix_path.sh | 0 install/lolito/share/lolito/hook/pythonpath.dsv | 0 install/lolito/share/lolito/hook/pythonpath.ps1 | 0 install/lolito/share/lolito/hook/pythonpath.sh | 0 install/lolito/share/lolito/local_setup.bash | 0 install/lolito/share/lolito/local_setup.dsv | 0 install/lolito/share/lolito/local_setup.sh | 0 install/lolito/share/lolito/local_setup.zsh | 0 install/lolito/share/lolito/package.bash | 0 install/lolito/share/lolito/package.dsv | 0 install/lolito/share/lolito/package.ps1 | 0 install/lolito/share/lolito/package.sh | 0 install/lolito/share/lolito/package.xml | 0 install/lolito/share/lolito/package.zsh | 0 .../share/ament_index/resource_index/packages/my_package | 0 install/my_package/share/colcon-core/packages/my_package | 0 install/my_package/share/my_package/hook/ament_prefix_path.dsv | 0 install/my_package/share/my_package/hook/ament_prefix_path.ps1 | 0 install/my_package/share/my_package/hook/ament_prefix_path.sh | 0 install/my_package/share/my_package/hook/pythonpath.dsv | 0 install/my_package/share/my_package/hook/pythonpath.ps1 | 0 install/my_package/share/my_package/hook/pythonpath.sh | 0 install/my_package/share/my_package/package.bash | 0 install/my_package/share/my_package/package.dsv | 0 install/my_package/share/my_package/package.ps1 | 0 install/my_package/share/my_package/package.sh | 0 install/my_package/share/my_package/package.xml | 0 install/my_package/share/my_package/package.zsh | 0 install/setup.bash | 0 install/setup.ps1 | 0 install/setup.sh | 0 install/setup.zsh | 0 log/COLCON_IGNORE | 0 log/latest | 1 - log/latest_build | 1 - peruano_pkg/peruano_pkg/P_EnviarFoto.py | 2 +- 72 files changed, 1 insertion(+), 3 deletions(-) delete mode 100644 install/.colcon_install_layout delete mode 100644 install/COLCON_IGNORE delete mode 100644 install/_local_setup_util_ps1.py delete mode 100644 install/_local_setup_util_sh.py delete mode 100644 install/chamo/share/ament_index/resource_index/packages/chamo delete mode 100644 install/chamo/share/chamo/hook/ament_prefix_path.dsv delete mode 100644 install/chamo/share/chamo/hook/ament_prefix_path.ps1 delete mode 100644 install/chamo/share/chamo/hook/ament_prefix_path.sh delete mode 100644 install/chamo/share/chamo/hook/pythonpath.dsv delete mode 100644 install/chamo/share/chamo/hook/pythonpath.ps1 delete mode 100644 install/chamo/share/chamo/hook/pythonpath.sh delete mode 100644 install/chamo/share/chamo/package.bash delete mode 100644 install/chamo/share/chamo/package.dsv delete mode 100644 install/chamo/share/chamo/package.ps1 delete mode 100644 install/chamo/share/chamo/package.sh delete mode 100644 install/chamo/share/chamo/package.xml delete mode 100644 install/chamo/share/chamo/package.zsh delete mode 100644 install/chamo/share/colcon-core/packages/chamo delete mode 100644 install/local_setup.bash delete mode 100644 install/local_setup.ps1 delete mode 100644 install/local_setup.sh delete mode 100644 install/local_setup.zsh delete mode 100644 install/lolito/share/ament_index/resource_index/package_run_dependencies/lolito delete mode 100644 install/lolito/share/ament_index/resource_index/packages/lolito delete mode 100644 install/lolito/share/ament_index/resource_index/parent_prefix_path/lolito delete mode 100644 install/lolito/share/colcon-core/packages/lolito delete mode 100644 install/lolito/share/lolito/cmake/lolitoConfig-version.cmake delete mode 100644 install/lolito/share/lolito/cmake/lolitoConfig.cmake delete mode 100644 install/lolito/share/lolito/environment/ament_prefix_path.dsv delete mode 100644 install/lolito/share/lolito/environment/ament_prefix_path.sh delete mode 100644 install/lolito/share/lolito/environment/path.dsv delete mode 100644 install/lolito/share/lolito/environment/path.sh delete mode 100644 install/lolito/share/lolito/environment/pythonpath.dsv delete mode 100644 install/lolito/share/lolito/environment/pythonpath.sh delete mode 100644 install/lolito/share/lolito/hook/cmake_prefix_path.dsv delete mode 100644 install/lolito/share/lolito/hook/cmake_prefix_path.ps1 delete mode 100644 install/lolito/share/lolito/hook/cmake_prefix_path.sh delete mode 100644 install/lolito/share/lolito/hook/pythonpath.dsv delete mode 100644 install/lolito/share/lolito/hook/pythonpath.ps1 delete mode 100644 install/lolito/share/lolito/hook/pythonpath.sh delete mode 100644 install/lolito/share/lolito/local_setup.bash delete mode 100644 install/lolito/share/lolito/local_setup.dsv delete mode 100644 install/lolito/share/lolito/local_setup.sh delete mode 100644 install/lolito/share/lolito/local_setup.zsh delete mode 100644 install/lolito/share/lolito/package.bash delete mode 100644 install/lolito/share/lolito/package.dsv delete mode 100644 install/lolito/share/lolito/package.ps1 delete mode 100644 install/lolito/share/lolito/package.sh delete mode 100644 install/lolito/share/lolito/package.xml delete mode 100644 install/lolito/share/lolito/package.zsh delete mode 100644 install/my_package/share/ament_index/resource_index/packages/my_package delete mode 100644 install/my_package/share/colcon-core/packages/my_package delete mode 100644 install/my_package/share/my_package/hook/ament_prefix_path.dsv delete mode 100644 install/my_package/share/my_package/hook/ament_prefix_path.ps1 delete mode 100644 install/my_package/share/my_package/hook/ament_prefix_path.sh delete mode 100644 install/my_package/share/my_package/hook/pythonpath.dsv delete mode 100644 install/my_package/share/my_package/hook/pythonpath.ps1 delete mode 100644 install/my_package/share/my_package/hook/pythonpath.sh delete mode 100644 install/my_package/share/my_package/package.bash delete mode 100644 install/my_package/share/my_package/package.dsv delete mode 100644 install/my_package/share/my_package/package.ps1 delete mode 100644 install/my_package/share/my_package/package.sh delete mode 100644 install/my_package/share/my_package/package.xml delete mode 100644 install/my_package/share/my_package/package.zsh delete mode 100644 install/setup.bash delete mode 100644 install/setup.ps1 delete mode 100644 install/setup.sh delete mode 100644 install/setup.zsh delete mode 100644 log/COLCON_IGNORE delete mode 120000 log/latest delete mode 120000 log/latest_build diff --git a/install/.colcon_install_layout b/install/.colcon_install_layout deleted file mode 100644 index e69de29..0000000 diff --git a/install/COLCON_IGNORE b/install/COLCON_IGNORE deleted file mode 100644 index e69de29..0000000 diff --git a/install/_local_setup_util_ps1.py b/install/_local_setup_util_ps1.py deleted file mode 100644 index e69de29..0000000 diff --git a/install/_local_setup_util_sh.py b/install/_local_setup_util_sh.py deleted file mode 100644 index e69de29..0000000 diff --git a/install/chamo/share/ament_index/resource_index/packages/chamo b/install/chamo/share/ament_index/resource_index/packages/chamo deleted file mode 100644 index e69de29..0000000 diff --git a/install/chamo/share/chamo/hook/ament_prefix_path.dsv b/install/chamo/share/chamo/hook/ament_prefix_path.dsv deleted file mode 100644 index e69de29..0000000 diff --git a/install/chamo/share/chamo/hook/ament_prefix_path.ps1 b/install/chamo/share/chamo/hook/ament_prefix_path.ps1 deleted file mode 100644 index e69de29..0000000 diff --git a/install/chamo/share/chamo/hook/ament_prefix_path.sh b/install/chamo/share/chamo/hook/ament_prefix_path.sh deleted file mode 100644 index e69de29..0000000 diff --git a/install/chamo/share/chamo/hook/pythonpath.dsv b/install/chamo/share/chamo/hook/pythonpath.dsv deleted file mode 100644 index e69de29..0000000 diff --git a/install/chamo/share/chamo/hook/pythonpath.ps1 b/install/chamo/share/chamo/hook/pythonpath.ps1 deleted file mode 100644 index e69de29..0000000 diff --git a/install/chamo/share/chamo/hook/pythonpath.sh b/install/chamo/share/chamo/hook/pythonpath.sh deleted file mode 100644 index e69de29..0000000 diff --git a/install/chamo/share/chamo/package.bash b/install/chamo/share/chamo/package.bash deleted file mode 100644 index e69de29..0000000 diff --git a/install/chamo/share/chamo/package.dsv b/install/chamo/share/chamo/package.dsv deleted file mode 100644 index e69de29..0000000 diff --git a/install/chamo/share/chamo/package.ps1 b/install/chamo/share/chamo/package.ps1 deleted file mode 100644 index e69de29..0000000 diff --git a/install/chamo/share/chamo/package.sh b/install/chamo/share/chamo/package.sh deleted file mode 100644 index e69de29..0000000 diff --git a/install/chamo/share/chamo/package.xml b/install/chamo/share/chamo/package.xml deleted file mode 100644 index e69de29..0000000 diff --git a/install/chamo/share/chamo/package.zsh b/install/chamo/share/chamo/package.zsh deleted file mode 100644 index e69de29..0000000 diff --git a/install/chamo/share/colcon-core/packages/chamo b/install/chamo/share/colcon-core/packages/chamo deleted file mode 100644 index e69de29..0000000 diff --git a/install/local_setup.bash b/install/local_setup.bash deleted file mode 100644 index e69de29..0000000 diff --git a/install/local_setup.ps1 b/install/local_setup.ps1 deleted file mode 100644 index e69de29..0000000 diff --git a/install/local_setup.sh b/install/local_setup.sh deleted file mode 100644 index e69de29..0000000 diff --git a/install/local_setup.zsh b/install/local_setup.zsh deleted file mode 100644 index e69de29..0000000 diff --git a/install/lolito/share/ament_index/resource_index/package_run_dependencies/lolito b/install/lolito/share/ament_index/resource_index/package_run_dependencies/lolito deleted file mode 100644 index e69de29..0000000 diff --git a/install/lolito/share/ament_index/resource_index/packages/lolito b/install/lolito/share/ament_index/resource_index/packages/lolito deleted file mode 100644 index e69de29..0000000 diff --git a/install/lolito/share/ament_index/resource_index/parent_prefix_path/lolito b/install/lolito/share/ament_index/resource_index/parent_prefix_path/lolito deleted file mode 100644 index e69de29..0000000 diff --git a/install/lolito/share/colcon-core/packages/lolito b/install/lolito/share/colcon-core/packages/lolito deleted file mode 100644 index e69de29..0000000 diff --git a/install/lolito/share/lolito/cmake/lolitoConfig-version.cmake b/install/lolito/share/lolito/cmake/lolitoConfig-version.cmake deleted file mode 100644 index e69de29..0000000 diff --git a/install/lolito/share/lolito/cmake/lolitoConfig.cmake b/install/lolito/share/lolito/cmake/lolitoConfig.cmake deleted file mode 100644 index e69de29..0000000 diff --git a/install/lolito/share/lolito/environment/ament_prefix_path.dsv b/install/lolito/share/lolito/environment/ament_prefix_path.dsv deleted file mode 100644 index e69de29..0000000 diff --git a/install/lolito/share/lolito/environment/ament_prefix_path.sh b/install/lolito/share/lolito/environment/ament_prefix_path.sh deleted file mode 100644 index e69de29..0000000 diff --git a/install/lolito/share/lolito/environment/path.dsv b/install/lolito/share/lolito/environment/path.dsv deleted file mode 100644 index e69de29..0000000 diff --git a/install/lolito/share/lolito/environment/path.sh b/install/lolito/share/lolito/environment/path.sh deleted file mode 100644 index e69de29..0000000 diff --git a/install/lolito/share/lolito/environment/pythonpath.dsv b/install/lolito/share/lolito/environment/pythonpath.dsv deleted file mode 100644 index e69de29..0000000 diff --git a/install/lolito/share/lolito/environment/pythonpath.sh b/install/lolito/share/lolito/environment/pythonpath.sh deleted file mode 100644 index e69de29..0000000 diff --git a/install/lolito/share/lolito/hook/cmake_prefix_path.dsv b/install/lolito/share/lolito/hook/cmake_prefix_path.dsv deleted file mode 100644 index e69de29..0000000 diff --git a/install/lolito/share/lolito/hook/cmake_prefix_path.ps1 b/install/lolito/share/lolito/hook/cmake_prefix_path.ps1 deleted file mode 100644 index e69de29..0000000 diff --git a/install/lolito/share/lolito/hook/cmake_prefix_path.sh b/install/lolito/share/lolito/hook/cmake_prefix_path.sh deleted file mode 100644 index e69de29..0000000 diff --git a/install/lolito/share/lolito/hook/pythonpath.dsv b/install/lolito/share/lolito/hook/pythonpath.dsv deleted file mode 100644 index e69de29..0000000 diff --git a/install/lolito/share/lolito/hook/pythonpath.ps1 b/install/lolito/share/lolito/hook/pythonpath.ps1 deleted file mode 100644 index e69de29..0000000 diff --git a/install/lolito/share/lolito/hook/pythonpath.sh b/install/lolito/share/lolito/hook/pythonpath.sh deleted file mode 100644 index e69de29..0000000 diff --git a/install/lolito/share/lolito/local_setup.bash b/install/lolito/share/lolito/local_setup.bash deleted file mode 100644 index e69de29..0000000 diff --git a/install/lolito/share/lolito/local_setup.dsv b/install/lolito/share/lolito/local_setup.dsv deleted file mode 100644 index e69de29..0000000 diff --git a/install/lolito/share/lolito/local_setup.sh b/install/lolito/share/lolito/local_setup.sh deleted file mode 100644 index e69de29..0000000 diff --git a/install/lolito/share/lolito/local_setup.zsh b/install/lolito/share/lolito/local_setup.zsh deleted file mode 100644 index e69de29..0000000 diff --git a/install/lolito/share/lolito/package.bash b/install/lolito/share/lolito/package.bash deleted file mode 100644 index e69de29..0000000 diff --git a/install/lolito/share/lolito/package.dsv b/install/lolito/share/lolito/package.dsv deleted file mode 100644 index e69de29..0000000 diff --git a/install/lolito/share/lolito/package.ps1 b/install/lolito/share/lolito/package.ps1 deleted file mode 100644 index e69de29..0000000 diff --git a/install/lolito/share/lolito/package.sh b/install/lolito/share/lolito/package.sh deleted file mode 100644 index e69de29..0000000 diff --git a/install/lolito/share/lolito/package.xml b/install/lolito/share/lolito/package.xml deleted file mode 100644 index e69de29..0000000 diff --git a/install/lolito/share/lolito/package.zsh b/install/lolito/share/lolito/package.zsh deleted file mode 100644 index e69de29..0000000 diff --git a/install/my_package/share/ament_index/resource_index/packages/my_package b/install/my_package/share/ament_index/resource_index/packages/my_package deleted file mode 100644 index e69de29..0000000 diff --git a/install/my_package/share/colcon-core/packages/my_package b/install/my_package/share/colcon-core/packages/my_package deleted file mode 100644 index e69de29..0000000 diff --git a/install/my_package/share/my_package/hook/ament_prefix_path.dsv b/install/my_package/share/my_package/hook/ament_prefix_path.dsv deleted file mode 100644 index e69de29..0000000 diff --git a/install/my_package/share/my_package/hook/ament_prefix_path.ps1 b/install/my_package/share/my_package/hook/ament_prefix_path.ps1 deleted file mode 100644 index e69de29..0000000 diff --git a/install/my_package/share/my_package/hook/ament_prefix_path.sh b/install/my_package/share/my_package/hook/ament_prefix_path.sh deleted file mode 100644 index e69de29..0000000 diff --git a/install/my_package/share/my_package/hook/pythonpath.dsv b/install/my_package/share/my_package/hook/pythonpath.dsv deleted file mode 100644 index e69de29..0000000 diff --git a/install/my_package/share/my_package/hook/pythonpath.ps1 b/install/my_package/share/my_package/hook/pythonpath.ps1 deleted file mode 100644 index e69de29..0000000 diff --git a/install/my_package/share/my_package/hook/pythonpath.sh b/install/my_package/share/my_package/hook/pythonpath.sh deleted file mode 100644 index e69de29..0000000 diff --git a/install/my_package/share/my_package/package.bash b/install/my_package/share/my_package/package.bash deleted file mode 100644 index e69de29..0000000 diff --git a/install/my_package/share/my_package/package.dsv b/install/my_package/share/my_package/package.dsv deleted file mode 100644 index e69de29..0000000 diff --git a/install/my_package/share/my_package/package.ps1 b/install/my_package/share/my_package/package.ps1 deleted file mode 100644 index e69de29..0000000 diff --git a/install/my_package/share/my_package/package.sh b/install/my_package/share/my_package/package.sh deleted file mode 100644 index e69de29..0000000 diff --git a/install/my_package/share/my_package/package.xml b/install/my_package/share/my_package/package.xml deleted file mode 100644 index e69de29..0000000 diff --git a/install/my_package/share/my_package/package.zsh b/install/my_package/share/my_package/package.zsh deleted file mode 100644 index e69de29..0000000 diff --git a/install/setup.bash b/install/setup.bash deleted file mode 100644 index e69de29..0000000 diff --git a/install/setup.ps1 b/install/setup.ps1 deleted file mode 100644 index e69de29..0000000 diff --git a/install/setup.sh b/install/setup.sh deleted file mode 100644 index e69de29..0000000 diff --git a/install/setup.zsh b/install/setup.zsh deleted file mode 100644 index e69de29..0000000 diff --git a/log/COLCON_IGNORE b/log/COLCON_IGNORE deleted file mode 100644 index e69de29..0000000 diff --git a/log/latest b/log/latest deleted file mode 120000 index b57d247..0000000 --- a/log/latest +++ /dev/null @@ -1 +0,0 @@ -latest_build \ No newline at end of file diff --git a/log/latest_build b/log/latest_build deleted file mode 120000 index d793303..0000000 --- a/log/latest_build +++ /dev/null @@ -1 +0,0 @@ -build_2023-03-09_08-59-51 \ No newline at end of file diff --git a/peruano_pkg/peruano_pkg/P_EnviarFoto.py b/peruano_pkg/peruano_pkg/P_EnviarFoto.py index 35a5c26..9f31795 100644 --- a/peruano_pkg/peruano_pkg/P_EnviarFoto.py +++ b/peruano_pkg/peruano_pkg/P_EnviarFoto.py @@ -8,7 +8,7 @@ class ImagePublisher(Node): def _init_(self): - super()._init_('image_publisher') + super()._init_('chamito') self.publisher_ = self.create_publisher(Image, 'ALO', 10) self.timer_ = self.create_timer(0.1, self.publish_image) self.bridge_ = CvBridge()