From c7cb035d4defc81a11b8c34347cf13ba62d62fc3 Mon Sep 17 00:00:00 2001 From: Alexander Schaefer Date: Wed, 14 May 2025 20:15:43 +0200 Subject: [PATCH] AS: single joint control --- workspace/build/.built_by | 1 + workspace/build/COLCON_IGNORE | 0 workspace/build/osc_ros2/colcon_build.rc | 1 + .../colcon_command_prefix_setup_py.sh | 1 + .../colcon_command_prefix_setup_py.sh.env | 20 + workspace/build/osc_ros2/osc_ros2 | 1 + .../build/osc_ros2/osc_ros2.egg-info/PKG-INFO | 12 + .../osc_ros2/osc_ros2.egg-info/SOURCES.txt | 13 + .../osc_ros2.egg-info/dependency_links.txt | 1 + .../osc_ros2.egg-info/entry_points.txt | 3 + .../osc_ros2/osc_ros2.egg-info/requires.txt | 7 + .../osc_ros2/osc_ros2.egg-info/top_level.txt | 1 + .../build/osc_ros2/osc_ros2.egg-info/zip-safe | 1 + workspace/build/osc_ros2/package.xml | 1 + .../__pycache__/sitecustomize.cpython-310.pyc | Bin 0 -> 283 bytes .../osc_ros2/prefix_override/sitecustomize.py | 4 + workspace/build/osc_ros2/resource/osc_ros2 | 1 + workspace/build/osc_ros2/setup.cfg | 1 + workspace/build/osc_ros2/setup.py | 1 + .../osc_ros2/hook/pythonpath_develop.dsv | 1 + .../osc_ros2/hook/pythonpath_develop.ps1 | 3 + .../share/osc_ros2/hook/pythonpath_develop.sh | 3 + workspace/install/.colcon_install_layout | 1 + workspace/install/COLCON_IGNORE | 0 workspace/install/_local_setup_util_ps1.py | 407 ++++++++++++++++++ workspace/install/_local_setup_util_sh.py | 407 ++++++++++++++++++ workspace/install/local_setup.bash | 121 ++++++ workspace/install/local_setup.ps1 | 55 +++ workspace/install/local_setup.sh | 137 ++++++ workspace/install/local_setup.zsh | 134 ++++++ .../install/osc_ros2/lib/osc_ros2/interface | 33 ++ .../site-packages/osc-ros2.egg-link | 2 + .../resource_index/packages/osc_ros2 | 1 + .../share/colcon-core/packages/osc_ros2 | 1 + .../share/osc_ros2/hook/ament_prefix_path.dsv | 1 + .../share/osc_ros2/hook/ament_prefix_path.ps1 | 3 + .../share/osc_ros2/hook/ament_prefix_path.sh | 3 + .../share/osc_ros2/hook/pythonpath.dsv | 1 + .../share/osc_ros2/hook/pythonpath.ps1 | 3 + .../share/osc_ros2/hook/pythonpath.sh | 3 + .../osc_ros2/share/osc_ros2/package.bash | 31 ++ .../osc_ros2/share/osc_ros2/package.dsv | 9 + .../osc_ros2/share/osc_ros2/package.ps1 | 117 +++++ .../osc_ros2/share/osc_ros2/package.sh | 88 ++++ .../osc_ros2/share/osc_ros2/package.xml | 1 + .../osc_ros2/share/osc_ros2/package.zsh | 42 ++ workspace/install/setup.bash | 31 ++ workspace/install/setup.ps1 | 29 ++ workspace/install/setup.sh | 45 ++ workspace/install/setup.zsh | 31 ++ workspace/log/COLCON_IGNORE | 0 .../log/build_2025-05-14_17-08-22/events.log | 41 ++ .../build_2025-05-14_17-08-22/logger_all.log | 134 ++++++ .../osc_ros2/command.log | 2 + .../osc_ros2/stderr.log | 0 .../osc_ros2/stdout.log | 22 + .../osc_ros2/stdout_stderr.log | 22 + .../osc_ros2/streams.log | 24 ++ workspace/log/latest | 1 + workspace/log/latest_build | 1 + .../__pycache__/osc_ros2.cpython-310.pyc | Bin 25044 -> 26860 bytes workspace/src/osc_ros2/osc_ros2/osc_ros2.py | 133 ++++-- 62 files changed, 2170 insertions(+), 24 deletions(-) create mode 100644 workspace/build/.built_by create mode 100644 workspace/build/COLCON_IGNORE create mode 100644 workspace/build/osc_ros2/colcon_build.rc create mode 100644 workspace/build/osc_ros2/colcon_command_prefix_setup_py.sh create mode 100644 workspace/build/osc_ros2/colcon_command_prefix_setup_py.sh.env create mode 120000 workspace/build/osc_ros2/osc_ros2 create mode 100644 workspace/build/osc_ros2/osc_ros2.egg-info/PKG-INFO create mode 100644 workspace/build/osc_ros2/osc_ros2.egg-info/SOURCES.txt create mode 100644 workspace/build/osc_ros2/osc_ros2.egg-info/dependency_links.txt create mode 100644 workspace/build/osc_ros2/osc_ros2.egg-info/entry_points.txt create mode 100644 workspace/build/osc_ros2/osc_ros2.egg-info/requires.txt create mode 100644 workspace/build/osc_ros2/osc_ros2.egg-info/top_level.txt create mode 100644 workspace/build/osc_ros2/osc_ros2.egg-info/zip-safe create mode 120000 workspace/build/osc_ros2/package.xml create mode 100644 workspace/build/osc_ros2/prefix_override/__pycache__/sitecustomize.cpython-310.pyc create mode 100644 workspace/build/osc_ros2/prefix_override/sitecustomize.py create mode 120000 workspace/build/osc_ros2/resource/osc_ros2 create mode 120000 workspace/build/osc_ros2/setup.cfg create mode 120000 workspace/build/osc_ros2/setup.py create mode 100644 workspace/build/osc_ros2/share/osc_ros2/hook/pythonpath_develop.dsv create mode 100644 workspace/build/osc_ros2/share/osc_ros2/hook/pythonpath_develop.ps1 create mode 100644 workspace/build/osc_ros2/share/osc_ros2/hook/pythonpath_develop.sh create mode 100644 workspace/install/.colcon_install_layout create mode 100644 workspace/install/COLCON_IGNORE create mode 100644 workspace/install/_local_setup_util_ps1.py create mode 100644 workspace/install/_local_setup_util_sh.py create mode 100644 workspace/install/local_setup.bash create mode 100644 workspace/install/local_setup.ps1 create mode 100644 workspace/install/local_setup.sh create mode 100644 workspace/install/local_setup.zsh create mode 100755 workspace/install/osc_ros2/lib/osc_ros2/interface create mode 100644 workspace/install/osc_ros2/lib/python3.10/site-packages/osc-ros2.egg-link create mode 120000 workspace/install/osc_ros2/share/ament_index/resource_index/packages/osc_ros2 create mode 100644 workspace/install/osc_ros2/share/colcon-core/packages/osc_ros2 create mode 100644 workspace/install/osc_ros2/share/osc_ros2/hook/ament_prefix_path.dsv create mode 100644 workspace/install/osc_ros2/share/osc_ros2/hook/ament_prefix_path.ps1 create mode 100644 workspace/install/osc_ros2/share/osc_ros2/hook/ament_prefix_path.sh create mode 100644 workspace/install/osc_ros2/share/osc_ros2/hook/pythonpath.dsv create mode 100644 workspace/install/osc_ros2/share/osc_ros2/hook/pythonpath.ps1 create mode 100644 workspace/install/osc_ros2/share/osc_ros2/hook/pythonpath.sh create mode 100644 workspace/install/osc_ros2/share/osc_ros2/package.bash create mode 100644 workspace/install/osc_ros2/share/osc_ros2/package.dsv create mode 100644 workspace/install/osc_ros2/share/osc_ros2/package.ps1 create mode 100644 workspace/install/osc_ros2/share/osc_ros2/package.sh create mode 120000 workspace/install/osc_ros2/share/osc_ros2/package.xml create mode 100644 workspace/install/osc_ros2/share/osc_ros2/package.zsh create mode 100644 workspace/install/setup.bash create mode 100644 workspace/install/setup.ps1 create mode 100644 workspace/install/setup.sh create mode 100644 workspace/install/setup.zsh create mode 100644 workspace/log/COLCON_IGNORE create mode 100644 workspace/log/build_2025-05-14_17-08-22/events.log create mode 100644 workspace/log/build_2025-05-14_17-08-22/logger_all.log create mode 100644 workspace/log/build_2025-05-14_17-08-22/osc_ros2/command.log create mode 100644 workspace/log/build_2025-05-14_17-08-22/osc_ros2/stderr.log create mode 100644 workspace/log/build_2025-05-14_17-08-22/osc_ros2/stdout.log create mode 100644 workspace/log/build_2025-05-14_17-08-22/osc_ros2/stdout_stderr.log create mode 100644 workspace/log/build_2025-05-14_17-08-22/osc_ros2/streams.log create mode 120000 workspace/log/latest create mode 120000 workspace/log/latest_build diff --git a/workspace/build/.built_by b/workspace/build/.built_by new file mode 100644 index 0000000..06e74ac --- /dev/null +++ b/workspace/build/.built_by @@ -0,0 +1 @@ +colcon diff --git a/workspace/build/COLCON_IGNORE b/workspace/build/COLCON_IGNORE new file mode 100644 index 0000000..e69de29 diff --git a/workspace/build/osc_ros2/colcon_build.rc b/workspace/build/osc_ros2/colcon_build.rc new file mode 100644 index 0000000..573541a --- /dev/null +++ b/workspace/build/osc_ros2/colcon_build.rc @@ -0,0 +1 @@ +0 diff --git a/workspace/build/osc_ros2/colcon_command_prefix_setup_py.sh b/workspace/build/osc_ros2/colcon_command_prefix_setup_py.sh new file mode 100644 index 0000000..f9867d5 --- /dev/null +++ b/workspace/build/osc_ros2/colcon_command_prefix_setup_py.sh @@ -0,0 +1 @@ +# generated from colcon_core/shell/template/command_prefix.sh.em diff --git a/workspace/build/osc_ros2/colcon_command_prefix_setup_py.sh.env b/workspace/build/osc_ros2/colcon_command_prefix_setup_py.sh.env new file mode 100644 index 0000000..bf98890 --- /dev/null +++ b/workspace/build/osc_ros2/colcon_command_prefix_setup_py.sh.env @@ -0,0 +1,20 @@ +AMENT_PREFIX_PATH=/BA/workspace/install/painting_robot_control:/BA/workspace/install/mock_robot:/BA/workspace/install/joint_info:/BA/workspace/install/joint_control:/BA/workspace/install/osc_ros2:/opt/ros/humble +COLCON=1 +COLCON_PREFIX_PATH=/BA/workspace/install +HOME=/root +HOSTNAME=0e38e264ac6b +LANG=C.UTF-8 +LC_ALL=C.UTF-8 +LD_LIBRARY_PATH=/opt/ros/humble/opt/rviz_ogre_vendor/lib:/opt/ros/humble/lib/x86_64-linux-gnu:/opt/ros/humble/lib +LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.webp=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36: +OLDPWD=/BA/workspace/src +PATH=/opt/ros/humble/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +PWD=/BA/workspace/build/osc_ros2 +PYTHONPATH=/BA/workspace/build/painting_robot_control:/BA/workspace/install/painting_robot_control/lib/python3.10/site-packages:/BA/workspace/build/mock_robot:/BA/workspace/install/mock_robot/lib/python3.10/site-packages:/BA/workspace/build/joint_info:/BA/workspace/install/joint_info/lib/python3.10/site-packages:/BA/workspace/build/joint_control:/BA/workspace/install/joint_control/lib/python3.10/site-packages:/BA/workspace/build/osc_ros2:/BA/workspace/install/osc_ros2/lib/python3.10/site-packages:/opt/ros/humble/lib/python3.10/site-packages:/opt/ros/humble/local/lib/python3.10/dist-packages +ROS_DISTRO=humble +ROS_LOCALHOST_ONLY=0 +ROS_PYTHON_VERSION=3 +ROS_VERSION=2 +SHLVL=1 +TERM=xterm +_=/usr/bin/colcon diff --git a/workspace/build/osc_ros2/osc_ros2 b/workspace/build/osc_ros2/osc_ros2 new file mode 120000 index 0000000..6c8996c --- /dev/null +++ b/workspace/build/osc_ros2/osc_ros2 @@ -0,0 +1 @@ +/BA/workspace/src/osc_ros2/osc_ros2 \ No newline at end of file diff --git a/workspace/build/osc_ros2/osc_ros2.egg-info/PKG-INFO b/workspace/build/osc_ros2/osc_ros2.egg-info/PKG-INFO new file mode 100644 index 0000000..fe4b5bf --- /dev/null +++ b/workspace/build/osc_ros2/osc_ros2.egg-info/PKG-INFO @@ -0,0 +1,12 @@ +Metadata-Version: 2.1 +Name: osc-ros2 +Version: 0.0.0 +Summary: Creates an interface for communication between OSC and Ros2 +Home-page: UNKNOWN +Maintainer: Alexander Schaefer +Maintainer-email: a.schaefer@tuhh.de +License: Apache-2.0 +Platform: UNKNOWN + +UNKNOWN + diff --git a/workspace/build/osc_ros2/osc_ros2.egg-info/SOURCES.txt b/workspace/build/osc_ros2/osc_ros2.egg-info/SOURCES.txt new file mode 100644 index 0000000..29aa2b0 --- /dev/null +++ b/workspace/build/osc_ros2/osc_ros2.egg-info/SOURCES.txt @@ -0,0 +1,13 @@ +package.xml +setup.cfg +setup.py +osc_ros2/__init__.py +osc_ros2/osc_ros2.py +osc_ros2.egg-info/PKG-INFO +osc_ros2.egg-info/SOURCES.txt +osc_ros2.egg-info/dependency_links.txt +osc_ros2.egg-info/entry_points.txt +osc_ros2.egg-info/requires.txt +osc_ros2.egg-info/top_level.txt +osc_ros2.egg-info/zip-safe +resource/osc_ros2 \ No newline at end of file diff --git a/workspace/build/osc_ros2/osc_ros2.egg-info/dependency_links.txt b/workspace/build/osc_ros2/osc_ros2.egg-info/dependency_links.txt new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/workspace/build/osc_ros2/osc_ros2.egg-info/dependency_links.txt @@ -0,0 +1 @@ + diff --git a/workspace/build/osc_ros2/osc_ros2.egg-info/entry_points.txt b/workspace/build/osc_ros2/osc_ros2.egg-info/entry_points.txt new file mode 100644 index 0000000..008581c --- /dev/null +++ b/workspace/build/osc_ros2/osc_ros2.egg-info/entry_points.txt @@ -0,0 +1,3 @@ +[console_scripts] +interface = osc_ros2.osc_ros2:main + diff --git a/workspace/build/osc_ros2/osc_ros2.egg-info/requires.txt b/workspace/build/osc_ros2/osc_ros2.egg-info/requires.txt new file mode 100644 index 0000000..b7c4ed5 --- /dev/null +++ b/workspace/build/osc_ros2/osc_ros2.egg-info/requires.txt @@ -0,0 +1,7 @@ +matplotlib==3.4.3 +numpy==1.22.4 +osc4py3 +roboticstoolbox-python==1.1.1 +scipy==1.7.3 +setuptools +spatialmath-python==1.1.14 diff --git a/workspace/build/osc_ros2/osc_ros2.egg-info/top_level.txt b/workspace/build/osc_ros2/osc_ros2.egg-info/top_level.txt new file mode 100644 index 0000000..99ee4eb --- /dev/null +++ b/workspace/build/osc_ros2/osc_ros2.egg-info/top_level.txt @@ -0,0 +1 @@ +osc_ros2 diff --git a/workspace/build/osc_ros2/osc_ros2.egg-info/zip-safe b/workspace/build/osc_ros2/osc_ros2.egg-info/zip-safe new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/workspace/build/osc_ros2/osc_ros2.egg-info/zip-safe @@ -0,0 +1 @@ + diff --git a/workspace/build/osc_ros2/package.xml b/workspace/build/osc_ros2/package.xml new file mode 120000 index 0000000..f6315bf --- /dev/null +++ b/workspace/build/osc_ros2/package.xml @@ -0,0 +1 @@ +/BA/workspace/src/osc_ros2/package.xml \ No newline at end of file diff --git a/workspace/build/osc_ros2/prefix_override/__pycache__/sitecustomize.cpython-310.pyc b/workspace/build/osc_ros2/prefix_override/__pycache__/sitecustomize.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b7e05638bf2e87f6a33578f4e22ffcc9d5201825 GIT binary patch literal 283 zcmd1j<>g`k0=9E18J$4-F^Gc%Y2C55Y&}4ZD)WhIc#iCzYTvR2e@8qaoo?nz*T#%TYs-KxxT#}fR zqn}@#9AA`QY^2F@i@CV6_!e71QEFOd#Vzil)Wn>47$>zNH5tlT$xy@wG!{(!vPCsC zsWdYu1#YB1M0b3CS!z*HW=g7lab`(sa%pi%er{$}s$N0mEe@O9{FKt1R69nXiN&Ch P;9%fl 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 + # skip over comments + if line.startswith('#'): + 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/workspace/install/_local_setup_util_sh.py b/workspace/install/_local_setup_util_sh.py new file mode 100644 index 0000000..f67eaa9 --- /dev/null +++ b/workspace/install/_local_setup_util_sh.py @@ -0,0 +1,407 @@ +# 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}"' # noqa: E501 +FORMAT_STR_REMOVE_LEADING_SEPARATOR = 'if [ "$(echo -n ${name} | head -c 1)" = ":" ]; then export {name}=${{{name}#?}} ; fi' # noqa: E501 +FORMAT_STR_REMOVE_TRAILING_SEPARATOR = 'if [ "$(echo -n ${name} | tail -c 1)" = ":" ]; then export {name}=${{{name}%?}} ; fi' # noqa: E501 + +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 + # skip over comments + if line.startswith('#'): + 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/workspace/install/local_setup.bash b/workspace/install/local_setup.bash new file mode 100644 index 0000000..03f0025 --- /dev/null +++ b/workspace/install/local_setup.bash @@ -0,0 +1,121 @@ +# 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" + _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_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 "$(declare -f _colcon_prefix_sh_source_script)" + 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_bash_COLCON_CURRENT_PREFIX diff --git a/workspace/install/local_setup.ps1 b/workspace/install/local_setup.ps1 new file mode 100644 index 0000000..6f68c8d --- /dev/null +++ b/workspace/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/workspace/install/local_setup.sh b/workspace/install/local_setup.sh new file mode 100644 index 0000000..5c15896 --- /dev/null +++ b/workspace/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="/BA/workspace/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/workspace/install/local_setup.zsh b/workspace/install/local_setup.zsh new file mode 100644 index 0000000..b648710 --- /dev/null +++ b/workspace/install/local_setup.zsh @@ -0,0 +1,134 @@ +# 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" + _contained_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 + _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_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 "$(declare -f _colcon_prefix_sh_source_script)" + 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_zsh_COLCON_CURRENT_PREFIX diff --git a/workspace/install/osc_ros2/lib/osc_ros2/interface b/workspace/install/osc_ros2/lib/osc_ros2/interface new file mode 100755 index 0000000..859732b --- /dev/null +++ b/workspace/install/osc_ros2/lib/osc_ros2/interface @@ -0,0 +1,33 @@ +#!/usr/bin/python3 +# EASY-INSTALL-ENTRY-SCRIPT: 'osc-ros2','console_scripts','interface' +import re +import sys + +# for compatibility with easy_install; see #2198 +__requires__ = 'osc-ros2' + +try: + from importlib.metadata import distribution +except ImportError: + try: + from importlib_metadata import distribution + except ImportError: + from pkg_resources import load_entry_point + + +def importlib_load_entry_point(spec, group, name): + dist_name, _, _ = spec.partition('==') + matches = ( + entry_point + for entry_point in distribution(dist_name).entry_points + if entry_point.group == group and entry_point.name == name + ) + return next(matches).load() + + +globals().setdefault('load_entry_point', importlib_load_entry_point) + + +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0]) + sys.exit(load_entry_point('osc-ros2', 'console_scripts', 'interface')()) diff --git a/workspace/install/osc_ros2/lib/python3.10/site-packages/osc-ros2.egg-link b/workspace/install/osc_ros2/lib/python3.10/site-packages/osc-ros2.egg-link new file mode 100644 index 0000000..4f5c4cc --- /dev/null +++ b/workspace/install/osc_ros2/lib/python3.10/site-packages/osc-ros2.egg-link @@ -0,0 +1,2 @@ +/BA/workspace/build/osc_ros2 +. \ No newline at end of file diff --git a/workspace/install/osc_ros2/share/ament_index/resource_index/packages/osc_ros2 b/workspace/install/osc_ros2/share/ament_index/resource_index/packages/osc_ros2 new file mode 120000 index 0000000..6a1bdb6 --- /dev/null +++ b/workspace/install/osc_ros2/share/ament_index/resource_index/packages/osc_ros2 @@ -0,0 +1 @@ +/BA/workspace/build/osc_ros2/resource/osc_ros2 \ No newline at end of file diff --git a/workspace/install/osc_ros2/share/colcon-core/packages/osc_ros2 b/workspace/install/osc_ros2/share/colcon-core/packages/osc_ros2 new file mode 100644 index 0000000..aff3120 --- /dev/null +++ b/workspace/install/osc_ros2/share/colcon-core/packages/osc_ros2 @@ -0,0 +1 @@ +rclpy \ No newline at end of file diff --git a/workspace/install/osc_ros2/share/osc_ros2/hook/ament_prefix_path.dsv b/workspace/install/osc_ros2/share/osc_ros2/hook/ament_prefix_path.dsv new file mode 100644 index 0000000..79d4c95 --- /dev/null +++ b/workspace/install/osc_ros2/share/osc_ros2/hook/ament_prefix_path.dsv @@ -0,0 +1 @@ +prepend-non-duplicate;AMENT_PREFIX_PATH; diff --git a/workspace/install/osc_ros2/share/osc_ros2/hook/ament_prefix_path.ps1 b/workspace/install/osc_ros2/share/osc_ros2/hook/ament_prefix_path.ps1 new file mode 100644 index 0000000..26b9997 --- /dev/null +++ b/workspace/install/osc_ros2/share/osc_ros2/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/workspace/install/osc_ros2/share/osc_ros2/hook/ament_prefix_path.sh b/workspace/install/osc_ros2/share/osc_ros2/hook/ament_prefix_path.sh new file mode 100644 index 0000000..f3041f6 --- /dev/null +++ b/workspace/install/osc_ros2/share/osc_ros2/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/workspace/install/osc_ros2/share/osc_ros2/hook/pythonpath.dsv b/workspace/install/osc_ros2/share/osc_ros2/hook/pythonpath.dsv new file mode 100644 index 0000000..257067d --- /dev/null +++ b/workspace/install/osc_ros2/share/osc_ros2/hook/pythonpath.dsv @@ -0,0 +1 @@ +prepend-non-duplicate;PYTHONPATH;lib/python3.10/site-packages diff --git a/workspace/install/osc_ros2/share/osc_ros2/hook/pythonpath.ps1 b/workspace/install/osc_ros2/share/osc_ros2/hook/pythonpath.ps1 new file mode 100644 index 0000000..caffe83 --- /dev/null +++ b/workspace/install/osc_ros2/share/osc_ros2/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.10/site-packages" diff --git a/workspace/install/osc_ros2/share/osc_ros2/hook/pythonpath.sh b/workspace/install/osc_ros2/share/osc_ros2/hook/pythonpath.sh new file mode 100644 index 0000000..660c348 --- /dev/null +++ b/workspace/install/osc_ros2/share/osc_ros2/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.10/site-packages" diff --git a/workspace/install/osc_ros2/share/osc_ros2/package.bash b/workspace/install/osc_ros2/share/osc_ros2/package.bash new file mode 100644 index 0000000..92f5b25 --- /dev/null +++ b/workspace/install/osc_ros2/share/osc_ros2/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/osc_ros2/package.sh" + +unset _colcon_package_bash_source_script +unset _colcon_package_bash_COLCON_CURRENT_PREFIX diff --git a/workspace/install/osc_ros2/share/osc_ros2/package.dsv b/workspace/install/osc_ros2/share/osc_ros2/package.dsv new file mode 100644 index 0000000..e73e769 --- /dev/null +++ b/workspace/install/osc_ros2/share/osc_ros2/package.dsv @@ -0,0 +1,9 @@ +source;share/osc_ros2/hook/pythonpath.ps1 +source;share/osc_ros2/hook/pythonpath.dsv +source;share/osc_ros2/hook/pythonpath.sh +source;share/osc_ros2/hook/ament_prefix_path.ps1 +source;share/osc_ros2/hook/ament_prefix_path.dsv +source;share/osc_ros2/hook/ament_prefix_path.sh +source;../../build/osc_ros2/share/osc_ros2/hook/pythonpath_develop.ps1 +source;../../build/osc_ros2/share/osc_ros2/hook/pythonpath_develop.dsv +source;../../build/osc_ros2/share/osc_ros2/hook/pythonpath_develop.sh diff --git a/workspace/install/osc_ros2/share/osc_ros2/package.ps1 b/workspace/install/osc_ros2/share/osc_ros2/package.ps1 new file mode 100644 index 0000000..1be10a2 --- /dev/null +++ b/workspace/install/osc_ros2/share/osc_ros2/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/osc_ros2/hook/pythonpath.ps1" +colcon_package_source_powershell_script "$env:COLCON_CURRENT_PREFIX\share/osc_ros2/hook/ament_prefix_path.ps1" +colcon_package_source_powershell_script "$env:COLCON_CURRENT_PREFIX\../../build/osc_ros2/share/osc_ros2/hook/pythonpath_develop.ps1" + +Remove-Item Env:\COLCON_CURRENT_PREFIX diff --git a/workspace/install/osc_ros2/share/osc_ros2/package.sh b/workspace/install/osc_ros2/share/osc_ros2/package.sh new file mode 100644 index 0000000..05d198f --- /dev/null +++ b/workspace/install/osc_ros2/share/osc_ros2/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="/BA/workspace/install/osc_ros2" +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/osc_ros2/hook/pythonpath.sh" +_colcon_package_sh_source_script "$COLCON_CURRENT_PREFIX/share/osc_ros2/hook/ament_prefix_path.sh" +_colcon_package_sh_source_script "$COLCON_CURRENT_PREFIX/../../build/osc_ros2/share/osc_ros2/hook/pythonpath_develop.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/workspace/install/osc_ros2/share/osc_ros2/package.xml b/workspace/install/osc_ros2/share/osc_ros2/package.xml new file mode 120000 index 0000000..e2fb71a --- /dev/null +++ b/workspace/install/osc_ros2/share/osc_ros2/package.xml @@ -0,0 +1 @@ +/BA/workspace/build/osc_ros2/package.xml \ No newline at end of file diff --git a/workspace/install/osc_ros2/share/osc_ros2/package.zsh b/workspace/install/osc_ros2/share/osc_ros2/package.zsh new file mode 100644 index 0000000..b8ae59f --- /dev/null +++ b/workspace/install/osc_ros2/share/osc_ros2/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/osc_ros2/package.sh" +unset convert_zsh_to_array + +unset _colcon_package_zsh_source_script +unset _colcon_package_zsh_COLCON_CURRENT_PREFIX diff --git a/workspace/install/setup.bash b/workspace/install/setup.bash new file mode 100644 index 0000000..10ea0f7 --- /dev/null +++ b/workspace/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/humble" +_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/workspace/install/setup.ps1 b/workspace/install/setup.ps1 new file mode 100644 index 0000000..558e9b9 --- /dev/null +++ b/workspace/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/humble\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/workspace/install/setup.sh b/workspace/install/setup.sh new file mode 100644 index 0000000..fa9641d --- /dev/null +++ b/workspace/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=/BA/workspace/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/humble" +_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/workspace/install/setup.zsh b/workspace/install/setup.zsh new file mode 100644 index 0000000..54799fd --- /dev/null +++ b/workspace/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/humble" +_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/workspace/log/COLCON_IGNORE b/workspace/log/COLCON_IGNORE new file mode 100644 index 0000000..e69de29 diff --git a/workspace/log/build_2025-05-14_17-08-22/events.log b/workspace/log/build_2025-05-14_17-08-22/events.log new file mode 100644 index 0000000..e9f184d --- /dev/null +++ b/workspace/log/build_2025-05-14_17-08-22/events.log @@ -0,0 +1,41 @@ +[0.000000] (-) TimerEvent: {} +[0.002571] (osc_ros2) JobQueued: {'identifier': 'osc_ros2', 'dependencies': OrderedDict()} +[0.002870] (osc_ros2) JobStarted: {'identifier': 'osc_ros2'} +[0.098385] (-) TimerEvent: {} +[0.199359] (-) TimerEvent: {} +[0.303463] (-) TimerEvent: {} +[0.405455] (-) TimerEvent: {} +[0.509296] (-) TimerEvent: {} +[0.611479] (-) TimerEvent: {} +[0.716450] (-) TimerEvent: {} +[0.779654] (osc_ros2) Command: {'cmd': ['/usr/bin/python3', '-W', 'ignore:setup.py install is deprecated', '-W', 'ignore:easy_install command is deprecated', 'setup.py', 'develop', '--editable', '--build-directory', '/BA/workspace/build/osc_ros2/build', '--no-deps', 'symlink_data'], 'cwd': '/BA/workspace/build/osc_ros2', 'env': {'HOSTNAME': '0e38e264ac6b', 'SHLVL': '1', 'LD_LIBRARY_PATH': '/opt/ros/humble/opt/rviz_ogre_vendor/lib:/opt/ros/humble/lib/x86_64-linux-gnu:/opt/ros/humble/lib', 'HOME': '/root', 'OLDPWD': '/BA/workspace/src', 'ROS_PYTHON_VERSION': '3', 'COLCON_PREFIX_PATH': '/BA/workspace/install', 'ROS_DISTRO': 'humble', '_': '/usr/bin/colcon', 'ROS_VERSION': '2', 'TERM': 'xterm', 'ROS_LOCALHOST_ONLY': '0', 'PATH': '/opt/ros/humble/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', 'LANG': 'C.UTF-8', 'LS_COLORS': 'rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.webp=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:', 'AMENT_PREFIX_PATH': '/BA/workspace/install/painting_robot_control:/BA/workspace/install/mock_robot:/BA/workspace/install/joint_info:/BA/workspace/install/joint_control:/BA/workspace/install/osc_ros2:/opt/ros/humble', 'PWD': '/BA/workspace/build/osc_ros2', 'LC_ALL': 'C.UTF-8', 'PYTHONPATH': '/BA/workspace/build/osc_ros2/prefix_override:/usr/lib/python3/dist-packages/colcon_core/task/python/colcon_distutils_commands:/BA/workspace/install/osc_ros2/lib/python3.10/site-packages:/BA/workspace/build/painting_robot_control:/BA/workspace/install/painting_robot_control/lib/python3.10/site-packages:/BA/workspace/build/mock_robot:/BA/workspace/install/mock_robot/lib/python3.10/site-packages:/BA/workspace/build/joint_info:/BA/workspace/install/joint_info/lib/python3.10/site-packages:/BA/workspace/build/joint_control:/BA/workspace/install/joint_control/lib/python3.10/site-packages:/BA/workspace/build/osc_ros2:/BA/workspace/install/osc_ros2/lib/python3.10/site-packages:/opt/ros/humble/lib/python3.10/site-packages:/opt/ros/humble/local/lib/python3.10/dist-packages', 'COLCON': '1'}, 'shell': False} +[0.817241] (-) TimerEvent: {} +[0.918255] (-) TimerEvent: {} +[1.022260] (-) TimerEvent: {} +[1.098407] (osc_ros2) StdoutLine: {'line': b'running develop\n'} +[1.123430] (-) TimerEvent: {} +[1.190061] (osc_ros2) StdoutLine: {'line': b'running egg_info\n'} +[1.190684] (osc_ros2) StdoutLine: {'line': b'creating osc_ros2.egg-info\n'} +[1.191366] (osc_ros2) StdoutLine: {'line': b'writing osc_ros2.egg-info/PKG-INFO\n'} +[1.192005] (osc_ros2) StdoutLine: {'line': b'writing dependency_links to osc_ros2.egg-info/dependency_links.txt\n'} +[1.192508] (osc_ros2) StdoutLine: {'line': b'writing entry points to osc_ros2.egg-info/entry_points.txt\n'} +[1.192936] (osc_ros2) StdoutLine: {'line': b'writing requirements to osc_ros2.egg-info/requires.txt\n'} +[1.193414] (osc_ros2) StdoutLine: {'line': b'writing top-level names to osc_ros2.egg-info/top_level.txt\n'} +[1.193787] (osc_ros2) StdoutLine: {'line': b"writing manifest file 'osc_ros2.egg-info/SOURCES.txt'\n"} +[1.196786] (osc_ros2) StdoutLine: {'line': b"reading manifest file 'osc_ros2.egg-info/SOURCES.txt'\n"} +[1.197888] (osc_ros2) StdoutLine: {'line': b"writing manifest file 'osc_ros2.egg-info/SOURCES.txt'\n"} +[1.199336] (osc_ros2) StdoutLine: {'line': b'running build_ext\n'} +[1.199670] (osc_ros2) StdoutLine: {'line': b'Creating /BA/workspace/install/osc_ros2/lib/python3.10/site-packages/osc-ros2.egg-link (link to .)\n'} +[1.200725] (osc_ros2) StdoutLine: {'line': b'Installing interface script to /BA/workspace/install/osc_ros2/lib/osc_ros2\n'} +[1.202175] (osc_ros2) StdoutLine: {'line': b'\n'} +[1.202459] (osc_ros2) StdoutLine: {'line': b'Installed /BA/workspace/build/osc_ros2\n'} +[1.202671] (osc_ros2) StdoutLine: {'line': b'running symlink_data\n'} +[1.203115] (osc_ros2) StdoutLine: {'line': b'creating /BA/workspace/install/osc_ros2/share/ament_index\n'} +[1.203345] (osc_ros2) StdoutLine: {'line': b'creating /BA/workspace/install/osc_ros2/share/ament_index/resource_index\n'} +[1.203713] (osc_ros2) StdoutLine: {'line': b'creating /BA/workspace/install/osc_ros2/share/ament_index/resource_index/packages\n'} +[1.203869] (osc_ros2) StdoutLine: {'line': b'symbolically linking /BA/workspace/build/osc_ros2/resource/osc_ros2 -> /BA/workspace/install/osc_ros2/share/ament_index/resource_index/packages\n'} +[1.205307] (osc_ros2) StdoutLine: {'line': b'symbolically linking /BA/workspace/build/osc_ros2/package.xml -> /BA/workspace/install/osc_ros2/share/osc_ros2\n'} +[1.224499] (-) TimerEvent: {} +[1.225266] (osc_ros2) CommandEnded: {'returncode': 0} +[1.246871] (osc_ros2) JobEnded: {'identifier': 'osc_ros2', 'rc': 0} +[1.248599] (-) EventReactorShutdown: {} diff --git a/workspace/log/build_2025-05-14_17-08-22/logger_all.log b/workspace/log/build_2025-05-14_17-08-22/logger_all.log new file mode 100644 index 0000000..fd5d2cc --- /dev/null +++ b/workspace/log/build_2025-05-14_17-08-22/logger_all.log @@ -0,0 +1,134 @@ +[0.135s] DEBUG:colcon:Command line arguments: ['/usr/bin/colcon', 'build', '--symlink-install'] +[0.136s] DEBUG:colcon:Parsed command line arguments: Namespace(log_base=None, log_level=None, verb_name='build', build_base='build', install_base='install', merge_install=False, symlink_install=True, test_result_base=None, continue_on_error=False, executor='parallel', parallel_workers=8, event_handlers=None, ignore_user_meta=False, metas=['./colcon.meta'], base_paths=['.'], packages_ignore=None, packages_ignore_regex=None, paths=None, packages_up_to=None, packages_up_to_regex=None, packages_above=None, packages_above_and_dependencies=None, packages_above_depth=None, packages_select_by_dep=None, packages_skip_by_dep=None, packages_skip_up_to=None, packages_select_build_failed=False, packages_skip_build_finished=False, packages_select_test_failures=False, packages_skip_test_passed=False, packages_select=None, packages_skip=None, packages_select_regex=None, packages_skip_regex=None, packages_start=None, packages_end=None, cmake_args=None, cmake_target=None, cmake_target_skip_unavailable=False, cmake_clean_cache=False, cmake_clean_first=False, cmake_force_configure=False, ament_cmake_args=None, catkin_cmake_args=None, catkin_skip_building_tests=False, mixin_files=None, mixin=None, verb_parser=, verb_extension=, main=>, mixin_verb=('build',)) +[0.259s] Level 1:colcon.colcon_core.package_discovery:discover_packages(colcon_meta) check parameters +[0.259s] INFO:colcon.colcon_metadata.package_discovery.colcon_meta:Using configuration from '/root/.colcon/metadata/default/Gazebo.meta' +[0.260s] INFO:colcon.colcon_metadata.package_discovery.colcon_meta:Using configuration from '/root/.colcon/metadata/default/fastrtps.meta' +[0.260s] Level 1:colcon.colcon_core.package_discovery:discover_packages(recursive) check parameters +[0.260s] Level 1:colcon.colcon_core.package_discovery:discover_packages(ignore) check parameters +[0.260s] Level 1:colcon.colcon_core.package_discovery:discover_packages(path) check parameters +[0.260s] Level 1:colcon.colcon_core.package_discovery:discover_packages(colcon_meta) discover +[0.260s] Level 1:colcon.colcon_core.package_discovery:discover_packages(recursive) discover +[0.260s] INFO:colcon.colcon_core.package_discovery:Crawling recursively for packages in '/BA/workspace' +[0.260s] Level 1:colcon.colcon_core.package_identification:_identify(.) by extensions ['ignore', 'ignore_ament_install'] +[0.261s] Level 1:colcon.colcon_core.package_identification:_identify(.) by extension 'ignore' +[0.261s] Level 1:colcon.colcon_core.package_identification:_identify(.) by extension 'ignore_ament_install' +[0.261s] Level 1:colcon.colcon_core.package_identification:_identify(.) by extensions ['colcon_pkg'] +[0.261s] Level 1:colcon.colcon_core.package_identification:_identify(.) by extension 'colcon_pkg' +[0.261s] Level 1:colcon.colcon_core.package_identification:_identify(.) by extensions ['colcon_meta'] +[0.261s] Level 1:colcon.colcon_core.package_identification:_identify(.) by extension 'colcon_meta' +[0.261s] Level 1:colcon.colcon_core.package_identification:_identify(.) by extensions ['ros'] +[0.261s] Level 1:colcon.colcon_core.package_identification:_identify(.) by extension 'ros' +[0.272s] Level 1:colcon.colcon_core.package_identification:_identify(.) by extensions ['cmake', 'python'] +[0.272s] Level 1:colcon.colcon_core.package_identification:_identify(.) by extension 'cmake' +[0.272s] Level 1:colcon.colcon_core.package_identification:_identify(.) by extension 'python' +[0.272s] Level 1:colcon.colcon_core.package_identification:_identify(.) by extensions ['python_setup_py'] +[0.272s] Level 1:colcon.colcon_core.package_identification:_identify(.) by extension 'python_setup_py' +[0.273s] Level 1:colcon.colcon_core.package_identification:_identify(build) by extensions ['ignore', 'ignore_ament_install'] +[0.273s] Level 1:colcon.colcon_core.package_identification:_identify(build) by extension 'ignore' +[0.273s] Level 1:colcon.colcon_core.package_identification:_identify(build) ignored +[0.273s] Level 1:colcon.colcon_core.package_identification:_identify(install) by extensions ['ignore', 'ignore_ament_install'] +[0.273s] Level 1:colcon.colcon_core.package_identification:_identify(install) by extension 'ignore' +[0.273s] Level 1:colcon.colcon_core.package_identification:_identify(install) ignored +[0.274s] Level 1:colcon.colcon_core.package_identification:_identify(log) by extensions ['ignore', 'ignore_ament_install'] +[0.274s] Level 1:colcon.colcon_core.package_identification:_identify(log) by extension 'ignore' +[0.274s] Level 1:colcon.colcon_core.package_identification:_identify(log) ignored +[0.274s] Level 1:colcon.colcon_core.package_identification:_identify(src) by extensions ['ignore', 'ignore_ament_install'] +[0.274s] Level 1:colcon.colcon_core.package_identification:_identify(src) by extension 'ignore' +[0.274s] Level 1:colcon.colcon_core.package_identification:_identify(src) by extension 'ignore_ament_install' +[0.274s] Level 1:colcon.colcon_core.package_identification:_identify(src) by extensions ['colcon_pkg'] +[0.274s] Level 1:colcon.colcon_core.package_identification:_identify(src) by extension 'colcon_pkg' +[0.274s] Level 1:colcon.colcon_core.package_identification:_identify(src) by extensions ['colcon_meta'] +[0.274s] Level 1:colcon.colcon_core.package_identification:_identify(src) by extension 'colcon_meta' +[0.274s] Level 1:colcon.colcon_core.package_identification:_identify(src) by extensions ['ros'] +[0.275s] Level 1:colcon.colcon_core.package_identification:_identify(src) by extension 'ros' +[0.275s] Level 1:colcon.colcon_core.package_identification:_identify(src) by extensions ['cmake', 'python'] +[0.275s] Level 1:colcon.colcon_core.package_identification:_identify(src) by extension 'cmake' +[0.275s] Level 1:colcon.colcon_core.package_identification:_identify(src) by extension 'python' +[0.275s] Level 1:colcon.colcon_core.package_identification:_identify(src) by extensions ['python_setup_py'] +[0.275s] Level 1:colcon.colcon_core.package_identification:_identify(src) by extension 'python_setup_py' +[0.276s] Level 1:colcon.colcon_core.package_identification:_identify(src/osc_ros2) by extensions ['ignore', 'ignore_ament_install'] +[0.276s] Level 1:colcon.colcon_core.package_identification:_identify(src/osc_ros2) by extension 'ignore' +[0.276s] Level 1:colcon.colcon_core.package_identification:_identify(src/osc_ros2) by extension 'ignore_ament_install' +[0.276s] Level 1:colcon.colcon_core.package_identification:_identify(src/osc_ros2) by extensions ['colcon_pkg'] +[0.276s] Level 1:colcon.colcon_core.package_identification:_identify(src/osc_ros2) by extension 'colcon_pkg' +[0.276s] Level 1:colcon.colcon_core.package_identification:_identify(src/osc_ros2) by extensions ['colcon_meta'] +[0.276s] Level 1:colcon.colcon_core.package_identification:_identify(src/osc_ros2) by extension 'colcon_meta' +[0.276s] Level 1:colcon.colcon_core.package_identification:_identify(src/osc_ros2) by extensions ['ros'] +[0.276s] Level 1:colcon.colcon_core.package_identification:_identify(src/osc_ros2) by extension 'ros' +[0.282s] DEBUG:colcon.colcon_core.package_identification:Package 'src/osc_ros2' with type 'ros.ament_python' and name 'osc_ros2' +[0.282s] Level 1:colcon.colcon_core.package_discovery:discover_packages(recursive) using defaults +[0.282s] Level 1:colcon.colcon_core.package_discovery:discover_packages(ignore) discover +[0.282s] Level 1:colcon.colcon_core.package_discovery:discover_packages(ignore) using defaults +[0.282s] Level 1:colcon.colcon_core.package_discovery:discover_packages(path) discover +[0.282s] Level 1:colcon.colcon_core.package_discovery:discover_packages(path) using defaults +[0.304s] Level 5:colcon.colcon_core.verb:set package 'osc_ros2' build argument 'cmake_args' from command line to 'None' +[0.304s] Level 5:colcon.colcon_core.verb:set package 'osc_ros2' build argument 'cmake_target' from command line to 'None' +[0.304s] Level 5:colcon.colcon_core.verb:set package 'osc_ros2' build argument 'cmake_target_skip_unavailable' from command line to 'False' +[0.304s] Level 5:colcon.colcon_core.verb:set package 'osc_ros2' build argument 'cmake_clean_cache' from command line to 'False' +[0.304s] Level 5:colcon.colcon_core.verb:set package 'osc_ros2' build argument 'cmake_clean_first' from command line to 'False' +[0.304s] Level 5:colcon.colcon_core.verb:set package 'osc_ros2' build argument 'cmake_force_configure' from command line to 'False' +[0.304s] Level 5:colcon.colcon_core.verb:set package 'osc_ros2' build argument 'ament_cmake_args' from command line to 'None' +[0.304s] Level 5:colcon.colcon_core.verb:set package 'osc_ros2' build argument 'catkin_cmake_args' from command line to 'None' +[0.304s] Level 5:colcon.colcon_core.verb:set package 'osc_ros2' build argument 'catkin_skip_building_tests' from command line to 'False' +[0.304s] DEBUG:colcon.colcon_core.verb:Building package 'osc_ros2' with the following arguments: {'ament_cmake_args': None, 'build_base': '/BA/workspace/build/osc_ros2', 'catkin_cmake_args': None, 'catkin_skip_building_tests': False, 'cmake_args': None, 'cmake_clean_cache': False, 'cmake_clean_first': False, 'cmake_force_configure': False, 'cmake_target': None, 'cmake_target_skip_unavailable': False, 'install_base': '/BA/workspace/install/osc_ros2', 'merge_install': False, 'path': '/BA/workspace/src/osc_ros2', 'symlink_install': True, 'test_result_base': None} +[0.304s] INFO:colcon.colcon_core.executor:Executing jobs using 'parallel' executor +[0.308s] DEBUG:colcon.colcon_parallel_executor.executor.parallel:run_until_complete +[0.309s] INFO:colcon.colcon_ros.task.ament_python.build:Building ROS package in '/BA/workspace/src/osc_ros2' with build type 'ament_python' +[0.309s] Level 1:colcon.colcon_core.shell:create_environment_hook('osc_ros2', 'ament_prefix_path') +[0.311s] INFO:colcon.colcon_core.plugin_system:Skipping extension 'colcon_core.shell.bat': Not used on non-Windows systems +[0.312s] INFO:colcon.colcon_core.shell:Creating environment hook '/BA/workspace/install/osc_ros2/share/osc_ros2/hook/ament_prefix_path.ps1' +[0.314s] INFO:colcon.colcon_core.shell:Creating environment descriptor '/BA/workspace/install/osc_ros2/share/osc_ros2/hook/ament_prefix_path.dsv' +[0.314s] INFO:colcon.colcon_core.shell:Creating environment hook '/BA/workspace/install/osc_ros2/share/osc_ros2/hook/ament_prefix_path.sh' +[0.315s] INFO:colcon.colcon_core.shell:Skip shell extension 'powershell' for command environment: Not usable outside of PowerShell +[0.315s] DEBUG:colcon.colcon_core.shell:Skip shell extension 'dsv' for command environment +[0.316s] WARNING:colcon.colcon_ros.prefix_path.ament:The path '/BA/workspace/install/painting_robot_control' in the environment variable AMENT_PREFIX_PATH doesn't exist +[0.316s] WARNING:colcon.colcon_ros.prefix_path.ament:The path '/BA/workspace/install/mock_robot' in the environment variable AMENT_PREFIX_PATH doesn't exist +[0.317s] WARNING:colcon.colcon_ros.prefix_path.ament:The path '/BA/workspace/install/joint_info' in the environment variable AMENT_PREFIX_PATH doesn't exist +[0.317s] WARNING:colcon.colcon_ros.prefix_path.ament:The path '/BA/workspace/install/joint_control' in the environment variable AMENT_PREFIX_PATH doesn't exist +[0.630s] INFO:colcon.colcon_core.task.python.build:Building Python package in '/BA/workspace/src/osc_ros2' +[0.631s] INFO:colcon.colcon_core.shell:Skip shell extension 'powershell' for command environment: Not usable outside of PowerShell +[0.631s] DEBUG:colcon.colcon_core.shell:Skip shell extension 'dsv' for command environment +[1.098s] DEBUG:colcon.colcon_core.event_handler.log_command:Invoking command in '/BA/workspace/build/osc_ros2': PYTHONPATH=/BA/workspace/build/osc_ros2/prefix_override:/usr/lib/python3/dist-packages/colcon_core/task/python/colcon_distutils_commands:/BA/workspace/install/osc_ros2/lib/python3.10/site-packages:${PYTHONPATH} /usr/bin/python3 -W ignore:setup.py install is deprecated -W ignore:easy_install command is deprecated setup.py develop --editable --build-directory /BA/workspace/build/osc_ros2/build --no-deps symlink_data +[1.535s] Level 1:colcon.colcon_core.shell:create_environment_hook('osc_ros2', 'pythonpath_develop') +[1.535s] INFO:colcon.colcon_core.shell:Creating environment hook '/BA/workspace/build/osc_ros2/share/osc_ros2/hook/pythonpath_develop.ps1' +[1.536s] DEBUG:colcon.colcon_core.event_handler.log_command:Invoked command in '/BA/workspace/build/osc_ros2' returned '0': PYTHONPATH=/BA/workspace/build/osc_ros2/prefix_override:/usr/lib/python3/dist-packages/colcon_core/task/python/colcon_distutils_commands:/BA/workspace/install/osc_ros2/lib/python3.10/site-packages:${PYTHONPATH} /usr/bin/python3 -W ignore:setup.py install is deprecated -W ignore:easy_install command is deprecated setup.py develop --editable --build-directory /BA/workspace/build/osc_ros2/build --no-deps symlink_data +[1.537s] INFO:colcon.colcon_core.shell:Creating environment descriptor '/BA/workspace/build/osc_ros2/share/osc_ros2/hook/pythonpath_develop.dsv' +[1.538s] INFO:colcon.colcon_core.shell:Creating environment hook '/BA/workspace/build/osc_ros2/share/osc_ros2/hook/pythonpath_develop.sh' +[1.541s] Level 1:colcon.colcon_core.environment:checking '/BA/workspace/install/osc_ros2' for CMake module files +[1.543s] Level 1:colcon.colcon_core.environment:checking '/BA/workspace/install/osc_ros2' for CMake config files +[1.547s] Level 1:colcon.colcon_core.environment:checking '/BA/workspace/install/osc_ros2/lib' +[1.547s] Level 1:colcon.colcon_core.environment:checking '/BA/workspace/install/osc_ros2/bin' +[1.547s] Level 1:colcon.colcon_core.environment:checking '/BA/workspace/install/osc_ros2/lib/pkgconfig/osc_ros2.pc' +[1.548s] Level 1:colcon.colcon_core.environment:checking '/BA/workspace/install/osc_ros2/lib/python3.10/site-packages' +[1.548s] Level 1:colcon.colcon_core.shell:create_environment_hook('osc_ros2', 'pythonpath') +[1.548s] INFO:colcon.colcon_core.shell:Creating environment hook '/BA/workspace/install/osc_ros2/share/osc_ros2/hook/pythonpath.ps1' +[1.549s] INFO:colcon.colcon_core.shell:Creating environment descriptor '/BA/workspace/install/osc_ros2/share/osc_ros2/hook/pythonpath.dsv' +[1.550s] INFO:colcon.colcon_core.shell:Creating environment hook '/BA/workspace/install/osc_ros2/share/osc_ros2/hook/pythonpath.sh' +[1.550s] Level 1:colcon.colcon_core.environment:checking '/BA/workspace/install/osc_ros2/bin' +[1.550s] Level 1:colcon.colcon_core.environment:create_environment_scripts_only(osc_ros2) +[1.551s] INFO:colcon.colcon_core.shell:Creating package script '/BA/workspace/install/osc_ros2/share/osc_ros2/package.ps1' +[1.552s] INFO:colcon.colcon_core.shell:Creating package descriptor '/BA/workspace/install/osc_ros2/share/osc_ros2/package.dsv' +[1.553s] INFO:colcon.colcon_core.shell:Creating package script '/BA/workspace/install/osc_ros2/share/osc_ros2/package.sh' +[1.553s] INFO:colcon.colcon_core.shell:Creating package script '/BA/workspace/install/osc_ros2/share/osc_ros2/package.bash' +[1.554s] INFO:colcon.colcon_core.shell:Creating package script '/BA/workspace/install/osc_ros2/share/osc_ros2/package.zsh' +[1.555s] Level 1:colcon.colcon_core.environment:create_file_with_runtime_dependencies(/BA/workspace/install/osc_ros2/share/colcon-core/packages/osc_ros2) +[1.557s] DEBUG:colcon.colcon_parallel_executor.executor.parallel:closing loop +[1.557s] DEBUG:colcon.colcon_parallel_executor.executor.parallel:loop closed +[1.557s] DEBUG:colcon.colcon_parallel_executor.executor.parallel:run_until_complete finished with '0' +[1.557s] DEBUG:colcon.colcon_core.event_reactor:joining thread +[1.572s] INFO:colcon.colcon_core.plugin_system:Skipping extension 'colcon_notification.desktop_notification.notify_send': Could not find 'notify-send' +[1.572s] INFO:colcon.colcon_core.plugin_system:Skipping extension 'colcon_notification.desktop_notification.terminal_notifier': Not used on non-Darwin systems +[1.572s] INFO:colcon.colcon_core.plugin_system:Skipping extension 'colcon_notification.desktop_notification.win32': Not used on non-Windows systems +[1.572s] INFO:colcon.colcon_notification.desktop_notification:Sending desktop notification using 'notify2' +[1.574s] DEBUG:colcon.colcon_notification.desktop_notification.notify2:Failed to initialize notify2: org.freedesktop.DBus.Error.NotSupported: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11 +[1.574s] DEBUG:colcon.colcon_core.event_reactor:joined thread +[1.574s] INFO:colcon.colcon_core.shell:Creating prefix script '/BA/workspace/install/local_setup.ps1' +[1.576s] INFO:colcon.colcon_core.shell:Creating prefix util module '/BA/workspace/install/_local_setup_util_ps1.py' +[1.577s] INFO:colcon.colcon_core.shell:Creating prefix chain script '/BA/workspace/install/setup.ps1' +[1.579s] INFO:colcon.colcon_core.shell:Creating prefix script '/BA/workspace/install/local_setup.sh' +[1.579s] INFO:colcon.colcon_core.shell:Creating prefix util module '/BA/workspace/install/_local_setup_util_sh.py' +[1.580s] INFO:colcon.colcon_core.shell:Creating prefix chain script '/BA/workspace/install/setup.sh' +[1.581s] INFO:colcon.colcon_core.shell:Creating prefix script '/BA/workspace/install/local_setup.bash' +[1.582s] INFO:colcon.colcon_core.shell:Creating prefix chain script '/BA/workspace/install/setup.bash' +[1.583s] INFO:colcon.colcon_core.shell:Creating prefix script '/BA/workspace/install/local_setup.zsh' +[1.585s] INFO:colcon.colcon_core.shell:Creating prefix chain script '/BA/workspace/install/setup.zsh' diff --git a/workspace/log/build_2025-05-14_17-08-22/osc_ros2/command.log b/workspace/log/build_2025-05-14_17-08-22/osc_ros2/command.log new file mode 100644 index 0000000..a3b47cf --- /dev/null +++ b/workspace/log/build_2025-05-14_17-08-22/osc_ros2/command.log @@ -0,0 +1,2 @@ +Invoking command in '/BA/workspace/build/osc_ros2': PYTHONPATH=/BA/workspace/build/osc_ros2/prefix_override:/usr/lib/python3/dist-packages/colcon_core/task/python/colcon_distutils_commands:/BA/workspace/install/osc_ros2/lib/python3.10/site-packages:${PYTHONPATH} /usr/bin/python3 -W ignore:setup.py install is deprecated -W ignore:easy_install command is deprecated setup.py develop --editable --build-directory /BA/workspace/build/osc_ros2/build --no-deps symlink_data +Invoked command in '/BA/workspace/build/osc_ros2' returned '0': PYTHONPATH=/BA/workspace/build/osc_ros2/prefix_override:/usr/lib/python3/dist-packages/colcon_core/task/python/colcon_distutils_commands:/BA/workspace/install/osc_ros2/lib/python3.10/site-packages:${PYTHONPATH} /usr/bin/python3 -W ignore:setup.py install is deprecated -W ignore:easy_install command is deprecated setup.py develop --editable --build-directory /BA/workspace/build/osc_ros2/build --no-deps symlink_data diff --git a/workspace/log/build_2025-05-14_17-08-22/osc_ros2/stderr.log b/workspace/log/build_2025-05-14_17-08-22/osc_ros2/stderr.log new file mode 100644 index 0000000..e69de29 diff --git a/workspace/log/build_2025-05-14_17-08-22/osc_ros2/stdout.log b/workspace/log/build_2025-05-14_17-08-22/osc_ros2/stdout.log new file mode 100644 index 0000000..e11da6d --- /dev/null +++ b/workspace/log/build_2025-05-14_17-08-22/osc_ros2/stdout.log @@ -0,0 +1,22 @@ +running develop +running egg_info +creating osc_ros2.egg-info +writing osc_ros2.egg-info/PKG-INFO +writing dependency_links to osc_ros2.egg-info/dependency_links.txt +writing entry points to osc_ros2.egg-info/entry_points.txt +writing requirements to osc_ros2.egg-info/requires.txt +writing top-level names to osc_ros2.egg-info/top_level.txt +writing manifest file 'osc_ros2.egg-info/SOURCES.txt' +reading manifest file 'osc_ros2.egg-info/SOURCES.txt' +writing manifest file 'osc_ros2.egg-info/SOURCES.txt' +running build_ext +Creating /BA/workspace/install/osc_ros2/lib/python3.10/site-packages/osc-ros2.egg-link (link to .) +Installing interface script to /BA/workspace/install/osc_ros2/lib/osc_ros2 + +Installed /BA/workspace/build/osc_ros2 +running symlink_data +creating /BA/workspace/install/osc_ros2/share/ament_index +creating /BA/workspace/install/osc_ros2/share/ament_index/resource_index +creating /BA/workspace/install/osc_ros2/share/ament_index/resource_index/packages +symbolically linking /BA/workspace/build/osc_ros2/resource/osc_ros2 -> /BA/workspace/install/osc_ros2/share/ament_index/resource_index/packages +symbolically linking /BA/workspace/build/osc_ros2/package.xml -> /BA/workspace/install/osc_ros2/share/osc_ros2 diff --git a/workspace/log/build_2025-05-14_17-08-22/osc_ros2/stdout_stderr.log b/workspace/log/build_2025-05-14_17-08-22/osc_ros2/stdout_stderr.log new file mode 100644 index 0000000..e11da6d --- /dev/null +++ b/workspace/log/build_2025-05-14_17-08-22/osc_ros2/stdout_stderr.log @@ -0,0 +1,22 @@ +running develop +running egg_info +creating osc_ros2.egg-info +writing osc_ros2.egg-info/PKG-INFO +writing dependency_links to osc_ros2.egg-info/dependency_links.txt +writing entry points to osc_ros2.egg-info/entry_points.txt +writing requirements to osc_ros2.egg-info/requires.txt +writing top-level names to osc_ros2.egg-info/top_level.txt +writing manifest file 'osc_ros2.egg-info/SOURCES.txt' +reading manifest file 'osc_ros2.egg-info/SOURCES.txt' +writing manifest file 'osc_ros2.egg-info/SOURCES.txt' +running build_ext +Creating /BA/workspace/install/osc_ros2/lib/python3.10/site-packages/osc-ros2.egg-link (link to .) +Installing interface script to /BA/workspace/install/osc_ros2/lib/osc_ros2 + +Installed /BA/workspace/build/osc_ros2 +running symlink_data +creating /BA/workspace/install/osc_ros2/share/ament_index +creating /BA/workspace/install/osc_ros2/share/ament_index/resource_index +creating /BA/workspace/install/osc_ros2/share/ament_index/resource_index/packages +symbolically linking /BA/workspace/build/osc_ros2/resource/osc_ros2 -> /BA/workspace/install/osc_ros2/share/ament_index/resource_index/packages +symbolically linking /BA/workspace/build/osc_ros2/package.xml -> /BA/workspace/install/osc_ros2/share/osc_ros2 diff --git a/workspace/log/build_2025-05-14_17-08-22/osc_ros2/streams.log b/workspace/log/build_2025-05-14_17-08-22/osc_ros2/streams.log new file mode 100644 index 0000000..c4b8e32 --- /dev/null +++ b/workspace/log/build_2025-05-14_17-08-22/osc_ros2/streams.log @@ -0,0 +1,24 @@ +[0.785s] Invoking command in '/BA/workspace/build/osc_ros2': PYTHONPATH=/BA/workspace/build/osc_ros2/prefix_override:/usr/lib/python3/dist-packages/colcon_core/task/python/colcon_distutils_commands:/BA/workspace/install/osc_ros2/lib/python3.10/site-packages:${PYTHONPATH} /usr/bin/python3 -W ignore:setup.py install is deprecated -W ignore:easy_install command is deprecated setup.py develop --editable --build-directory /BA/workspace/build/osc_ros2/build --no-deps symlink_data +[1.097s] running develop +[1.188s] running egg_info +[1.188s] creating osc_ros2.egg-info +[1.189s] writing osc_ros2.egg-info/PKG-INFO +[1.189s] writing dependency_links to osc_ros2.egg-info/dependency_links.txt +[1.190s] writing entry points to osc_ros2.egg-info/entry_points.txt +[1.190s] writing requirements to osc_ros2.egg-info/requires.txt +[1.191s] writing top-level names to osc_ros2.egg-info/top_level.txt +[1.191s] writing manifest file 'osc_ros2.egg-info/SOURCES.txt' +[1.194s] reading manifest file 'osc_ros2.egg-info/SOURCES.txt' +[1.195s] writing manifest file 'osc_ros2.egg-info/SOURCES.txt' +[1.197s] running build_ext +[1.197s] Creating /BA/workspace/install/osc_ros2/lib/python3.10/site-packages/osc-ros2.egg-link (link to .) +[1.198s] Installing interface script to /BA/workspace/install/osc_ros2/lib/osc_ros2 +[1.199s] +[1.200s] Installed /BA/workspace/build/osc_ros2 +[1.200s] running symlink_data +[1.200s] creating /BA/workspace/install/osc_ros2/share/ament_index +[1.201s] creating /BA/workspace/install/osc_ros2/share/ament_index/resource_index +[1.201s] creating /BA/workspace/install/osc_ros2/share/ament_index/resource_index/packages +[1.202s] symbolically linking /BA/workspace/build/osc_ros2/resource/osc_ros2 -> /BA/workspace/install/osc_ros2/share/ament_index/resource_index/packages +[1.204s] symbolically linking /BA/workspace/build/osc_ros2/package.xml -> /BA/workspace/install/osc_ros2/share/osc_ros2 +[1.223s] Invoked command in '/BA/workspace/build/osc_ros2' returned '0': PYTHONPATH=/BA/workspace/build/osc_ros2/prefix_override:/usr/lib/python3/dist-packages/colcon_core/task/python/colcon_distutils_commands:/BA/workspace/install/osc_ros2/lib/python3.10/site-packages:${PYTHONPATH} /usr/bin/python3 -W ignore:setup.py install is deprecated -W ignore:easy_install command is deprecated setup.py develop --editable --build-directory /BA/workspace/build/osc_ros2/build --no-deps symlink_data diff --git a/workspace/log/latest b/workspace/log/latest new file mode 120000 index 0000000..b57d247 --- /dev/null +++ b/workspace/log/latest @@ -0,0 +1 @@ +latest_build \ No newline at end of file diff --git a/workspace/log/latest_build b/workspace/log/latest_build new file mode 120000 index 0000000..988a106 --- /dev/null +++ b/workspace/log/latest_build @@ -0,0 +1 @@ +build_2025-05-14_17-08-22 \ No newline at end of file diff --git a/workspace/src/osc_ros2/osc_ros2/__pycache__/osc_ros2.cpython-310.pyc b/workspace/src/osc_ros2/osc_ros2/__pycache__/osc_ros2.cpython-310.pyc index ee95261463ba83cfd132ae875c376744a254222c..12715e73441a1d68a9eafd55a0e0e4e5632a3a51 100644 GIT binary patch delta 7837 zcmcIp3vg7|dA{eq_U^8bR;$+vfmw(JT95^jjR6S>V=$PPf)Ovcx3X3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j^eD# 1: + self.get_logger().warn(f"speed_scaling_handler: Attention! Speed scaling {self.speed_scaling} is greater than 1!") self.get_logger().info(f"Speed scaling set to {self.speed_scaling}") else: self.get_logger().warn(f"Invalid number of arguments for speed scaling. Expected 1, but got {len(args)}.") @@ -331,8 +333,53 @@ class OSC_ROS2_interface(Node): def joint_trajectory_handler(self, *args): pass - def joint_position_handler(self, *args): - pass + def joint_position_handler(self, address, *args): + """Handles incoming OSC messages for joint positions.""" + try: + joint_name = address.split("/")[-1] + if joint_name in self.joint_names: + if len(args) == 1: + position = float(args[0]) + index = self.joint_names.index(joint_name) + if position < self.robot.qlim[0][index]: + position = self.robot.qlim[0][index] + self.get_logger().warn( + f"joint_position_handler: Joint '{joint_name}' position {position} is out of bounds. Using {self.robot.qlim[0][index]}." + ) + elif position > self.robot.qlim[1][index]: + position = self.robot.qlim[1][index] + self.get_logger().warn( + f"joint_position_handler: Joint '{joint_name}' position {position} is out of bounds. Using {self.robot.qlim[1][index]}." + ) + desired_joint_positions = self.current_joint_positions + desired_joint_positions[index] = position + self.desired = ["joint_positions"] + desired_joint_positions + self.new = True + elif len(args) == 2: + position = float(args[0]) + duration = float(args[1]) + index = self.joint_names.index(joint_name) + if position < self.robot.qlim[0][index]: + position = self.robot.qlim[0][index] + self.get_logger().warn( + f"joint_position_handler: Joint '{joint_name}' position {position} is out of bounds. Using {self.robot.qlim[0][index]}." + ) + elif position > self.robot.qlim[1][index]: + position = self.robot.qlim[1][index] + self.get_logger().warn( + f"joint_position_handler: Joint '{joint_name}' position {position} is out of bounds. Using {self.robot.qlim[1][index]}." + ) + desired_joint_positions = self.current_joint_positions + desired_joint_positions[index] = position + self.desired = ["joint_positions"] + desired_joint_positions + [duration] + self.new = True + else: + self.get_logger().warn(f"joint_position_handler: Invalid number of arguments for joint position. Expected 1, but got {len(args)}.") + else: + self.get_logger().warn(f"joint_position_handler: Joint '{joint_name}' not found in the robot model.") + except Exception as e: + self.get_logger().fatal(f"joint_position_handler: {e}") + def cartesian_trajectory_handler(self, *args): """Handles incoming OSC messages for cartesian trajectory.""" @@ -346,7 +393,7 @@ class OSC_ROS2_interface(Node): """Handles incoming OSC messages for joint positions.""" try: if len(args) == len(self.joint_names): - desired_joint_positions = [float(i) for i in list(args)] + [None] + desired_joint_positions = [float(i) for i in list(args)] elif len(args) == len(self.joint_names) + 1: desired_joint_positions = [float(i) for i in list(args)] else: @@ -363,7 +410,7 @@ class OSC_ROS2_interface(Node): elif position > self.robot.qlim[1][i]: desired_joint_positions[i] = self.robot.qlim[1][i] self.get_logger().warn( - f"joint_positions_handler:Joint '{self.joint_names[i]}' position {position} is out of bounds. Using {self.robot.qlim[1][i]}." + f"joint_positions_handler: Joint '{self.joint_names[i]}' position {position} is out of bounds. Using {self.robot.qlim[1][i]}." ) self.desired = ["joint_positions"] + desired_joint_positions @@ -420,23 +467,24 @@ class OSC_ROS2_interface(Node): osc_send(msg_time, "osc_client") if not(self.joint_names): self.joint_names = msg.name joint_position_dict = dict(zip(msg.name, msg.position)) - self.current_joint_positions = [joint_position_dict[name] for name in self.joint_names] + self.current_joint_positions = [float(joint_position_dict[name]) for name in self.joint_names] joint_position_dict = dict(zip(msg.name, msg.velocity)) - self.current_joint_velocities = [joint_position_dict[name] for name in self.joint_names] + self.current_joint_velocities = [float(joint_position_dict[name]) for name in self.joint_names] if self.robot: tcp_position = self.robot.fkine(self.current_joint_positions).t tcp_orientation = self.robot.fkine(self.current_joint_positions).rpy() msg_tcp = oscbuildparse.OSCMessage(f"/tcp_coordinates", ',ffffff', [tcp_position[0], tcp_position[1], tcp_position[2], tcp_orientation[0], tcp_orientation[1], tcp_orientation[2]]) - msg_x = oscbuildparse.OSCMessage(f"/tcp_coordinates/x", ',f', [tcp_position[0]]) - msg_y = oscbuildparse.OSCMessage(f"/tcp_coordinates/y", ',f', [tcp_position[1]]) - msg_z = oscbuildparse.OSCMessage(f"/tcp_coordinates/z", ',f', [tcp_position[2]]) - msg_roll = oscbuildparse.OSCMessage(f"/tcp_coordinates/roll", ',f', [tcp_orientation[0]]) - msg_pitch = oscbuildparse.OSCMessage(f"/tcp_coordinates/pitch", ',f', [tcp_orientation[1]]) - msg_yaw = oscbuildparse.OSCMessage(f"/tcp_coordinates/yaw", ',f', [tcp_orientation[2]]) - bun = oscbuildparse.OSCBundle(oscbuildparse.OSC_IMMEDIATELY, [msg_tcp, msg_x, msg_y, msg_z, msg_roll, msg_pitch, msg_yaw]) - osc_send(bun, "osc_client") + #msg_x = oscbuildparse.OSCMessage(f"/tcp_coordinates/x", ',f', [tcp_position[0]]) + #msg_y = oscbuildparse.OSCMessage(f"/tcp_coordinates/y", ',f', [tcp_position[1]]) + #msg_z = oscbuildparse.OSCMessage(f"/tcp_coordinates/z", ',f', [tcp_position[2]]) + #msg_roll = oscbuildparse.OSCMessage(f"/tcp_coordinates/roll", ',f', [tcp_orientation[0]]) + #msg_pitch = oscbuildparse.OSCMessage(f"/tcp_coordinates/pitch", ',f', [tcp_orientation[1]]) + #msg_yaw = oscbuildparse.OSCMessage(f"/tcp_coordinates/yaw", ',f', [tcp_orientation[2]]) + #bun = oscbuildparse.OSCBundle(oscbuildparse.OSC_IMMEDIATELY, [msg_tcp, msg_x, msg_y, msg_z, msg_roll, msg_pitch, msg_yaw]) + #osc_send(bun, "osc_client") + osc_send(msg_tcp, "osc_client") msg_position = oscbuildparse.OSCMessage(f"/joint_state/position", f',{"f"*self.n_joints}', [i for i in msg.position]) msg_velocity = oscbuildparse.OSCMessage(f"/joint_state/velocity", f',{"f"*self.n_joints}', [i for i in msg.velocity]) @@ -445,19 +493,55 @@ class OSC_ROS2_interface(Node): bun = oscbuildparse.OSCBundle(oscbuildparse.OSC_IMMEDIATELY, [msg_name, msg_position, msg_velocity, msg_effort]) osc_send(bun, "osc_client") - for i, name in enumerate(msg.name): - msg_position = oscbuildparse.OSCMessage(f"/joint_state/position/{name}", ',f', [msg.position[i]]) - msg_velocity = oscbuildparse.OSCMessage(f"/joint_state/velocity/{name}", ',f', [msg.velocity[i]]) - msg_effort = oscbuildparse.OSCMessage(f"/joint_state/effort/{name}", ',f', [msg.effort[i]]) - bun = oscbuildparse.OSCBundle(oscbuildparse.OSC_IMMEDIATELY, [msg_position, msg_velocity, msg_effort]) - osc_send(bun, "osc_client") + #for i, name in enumerate(msg.name): + # msg_position = oscbuildparse.OSCMessage(f"/joint_state/position/{name}", ',f', [msg.position[i]]) + # msg_velocity = oscbuildparse.OSCMessage(f"/joint_state/velocity/{name}", ',f', [msg.velocity[i]]) + # msg_effort = oscbuildparse.OSCMessage(f"/joint_state/effort/{name}", ',f', [msg.effort[i]]) + # bun = oscbuildparse.OSCBundle(oscbuildparse.OSC_IMMEDIATELY, [msg_position, msg_velocity, msg_effort]) + # osc_send(bun, "osc_client") except Exception as e: self.get_logger().fatal(f"joint_states_callback: {e}") def send_joint_positions(self): - pass self.previous_desired = None + self.new = False + try: + if len(self.desired) == len(self.joint_names) + 2: + desired_joint_positions = [float(i) for i in self.desired[1:-1]] + duration = self.desired[-1] + msg = JointTrajectory() + msg.joint_names = self.joint_names + point = JointTrajectoryPoint() + point.positions = desired_joint_positions + point.time_from_start.sec = int(duration) + point.time_from_start.nanosec = int((duration - int(duration)) * 1e9) + msg.points.append(point) + self.publisher.publish(msg) + elif len(self.desired) == len(self.joint_names) + 1: + desired_joint_positions = [float(i) for i in self.desired[1:]] + msg = JointTrajectory() + msg.joint_names = self.joint_names + point = JointTrajectoryPoint() + point.positions = desired_joint_positions + duration = 0 + for p1, p2, max_vel in zip(desired_joint_positions, self.current_joint_positions, self.joint_velocity_limits.values()): + duration = max(duration, abs(p1 - p2) / max_vel) + duration = duration + min(2, 0.2*duration) + duration /= self.speed_scaling + if duration == 0: + self.get_logger().warn("send_joint_positions: Duration is 0.") + return + point.time_from_start.sec = int(duration) + point.time_from_start.nanosec = int((duration - int(duration)) * 1e9) + msg.points.append(point) + self.publisher.publish(msg) + else: + self.get_logger().warn(f"send_joint_positions: Invalid number of arguments for joint positions. Expected {len(self.joint_names)+1} ([q0, q1, q2, ... q{len(self.joint_names)}, duration]) or {len(self.joint_names)} ([q0, q1, q2, ... q{len(self.joint_names)}]), but got {len(self.desired)}.") + return + except Exception as e: + self.get_logger().fatal(f"send_joint_positions: {e}") + return def trapezoidal_timestamps(self, num_points,total_duration, flat_ratio = 0.3): @@ -478,6 +562,7 @@ class OSC_ROS2_interface(Node): def send_tcp_coordinates(self): """Send the desired TCP coordinates to the robot.""" try: + self.new = False msg = JointTrajectory() msg.joint_names = self.joint_names steps_per_m = 100 @@ -538,7 +623,6 @@ class OSC_ROS2_interface(Node): if self.desired[-1]: timestamps = self.trapezoidal_timestamps(steps, self.desired[-1], 0.8) - print(f'timestamps: {timestamps}') for j in range(steps): sol = self.robot.ik_LM(cart_traj[j], q0=self.current_joint_positions, mask = self.cost_mask, joint_limits = True, method = 'chan') if j == 0 else self.robot.ik_LM(cart_traj[j], q0=prev_sol, mask = self.cost_mask, joint_limits = True, method = 'chan') if sol[1] == 1: @@ -619,6 +703,7 @@ class OSC_ROS2_interface(Node): continue point = JointTrajectoryPoint() point.positions = list(sol[0]) + duration *= 1.2 duration /= self.speed_scaling duration += prev_duration prev_duration = duration