Coder Social home page Coder Social logo

colcon-ros-bundle's Introduction

colcon-ros-bundle GitHub Action Status

This package is a plugin to colcon-core, that contains extensions for colcon-bundle.

NOTE: colcon-ros-bundle only supports Ubuntu Xenial and Ubuntu Bionic operating systems and x86, ARMHF, and ARM64 architectures. All other operating systems and architectures are currently not supported. This code is in active development and should not be considered stable.

With this package you can use colcon bundle to create bundles of ROS applications. A bundle is a portable environment that allows for execution of the bundled application on a Linux host that does not have the application or its dependencies installed in the root filesystem.

colcon-ros-bundle's People

Contributors

cottsay avatar dabonnie avatar emersonknapp avatar murphm8 avatar obi-t4 avatar piraka9011 avatar prajakta-gokhale avatar r-meagher avatar thomas-moulard avatar timrobotson avatar x77a1 avatar zmichaels11 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

colcon-ros-bundle's Issues

Installing colcon and colcon-ros-bundle on Ubuntu 18.04

When I run the following command on Ubuntu 16.04:

pip3 install -U colcon-common-extensions colcon-ros-bundle

I get these errors:
Failed building wheel for colcon-ros-bundle
Failed building wheel for colcon-bundle
Failed building wheel for EmPy
Failed building wheel for distlib
error: invalid command 'bdist_wheel'
Failed building wheel for PyYAML

What am I missing?

AttributeError: 'str' object has no attribute 'name'.

I am running into a colcon bundling error when it attempts to bundle gazebo_dev package from aws-ros-dev/gazebo_ros_pkgs@25b295f. See error below:

root@uefee1b00be3a55:/aws-robomaker-sample-application-helloworld/simulation_ws# colcon build
Starting >>> gazebo_dev
Starting >>> gazebo_msgs
Finished <<< gazebo_dev [0.59s]                                                       
Finished <<< gazebo_msgs [29.8s]                       
Starting >>> gazebo_ros
[Processing: gazebo_ros]                                 
Finished <<< gazebo_ros [54.9s]                            
Starting >>> gazebo_plugins
[Processing: gazebo_plugins]                                  
[Processing: gazebo_plugins]                                      
[Processing: gazebo_plugins]                                       
Finished <<< gazebo_plugins [1min 52s]                              
Starting >>> gazebo_ros_pkgs
Starting >>> hello_world_simulation
Starting >>> turtlebot3_description_reduced_mesh
Finished <<< gazebo_ros_pkgs [0.62s]                                                                                                                           
Finished <<< hello_world_simulation [0.63s]
Finished <<< turtlebot3_description_reduced_mesh [1.91s]                      
Summary: 7 packages finished [3min 19s]
root@uefee1b00be3a55:/aws-robomaker-sample-application-helloworld/simulation_ws# colcon bundle
Bundling workspace...
Reading package lists... Done
Building dependency tree... Done
Checking if dependency tarball exists...
Starting >>> gazebo_dev    
loading view [*default*] with rospkg loader
--- stderr: gazebo_dev                         
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/colcon_core/executor/__init__.py", line 91, in __call__
    rc = await self.task(*args, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/colcon_core/task/__init__.py", line 93, in __call__
    return await task_method(*args, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/colcon_ros_bundle/task/ros_bundle.py", line 30, in bundle
    if dependency.name in self.context.dependencies:
AttributeError: 'str' object has no attribute 'name'
---
Failed   <<< gazebo_dev	[ Exited with code 1 ]
Starting >>> gazebo_msgs
loading view [*default*] with rospkg loader                
Finished <<< gazebo_msgs [0.15s]                           
Summary: 1 package finished [1min 34s]
  1 package failed: gazebo_dev
  1 package had stderr output: gazebo_dev
  5 packages not processed
Creating bundle archive V2...
[97.766s] ERROR:colcon:colcon bundle: [Errno 2] No such file or directory: '/aws-robomaker-sample-application-helloworld/simulation_ws/bundle/cache/bundle_staging/setup.sh'
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/colcon_core/command.py", line 505, in verb_main
    rc = context.args.main(context=context)
  File "/usr/local/lib/python3.8/dist-packages/colcon_bundle/verb/bundle.py", line 141, in main
    generate_archive_v2(self._path_contex,
  File "/usr/local/lib/python3.8/dist-packages/colcon_bundle/verb/_archive_generators.py", line 110, in generate_archive_v2
    create_dependencies_overlay(path_context.dependencies_staging_path(),
  File "/usr/local/lib/python3.8/dist-packages/colcon_bundle/verb/_overlay_utilities.py", line 78, in create_dependencies_overlay
    _render_template(
  File "/usr/local/lib/python3.8/dist-packages/colcon_bundle/verb/_overlay_utilities.py", line 136, in _render_template
    with script_dest.open('w') as file:
  File "/usr/lib/python3.8/pathlib.py", line 1218, in open
    return io.open(self, mode, buffering, encoding, errors, newline,
  File "/usr/lib/python3.8/pathlib.py", line 1074, in _opener
    return self._accessor.open(self, flags, mode)
FileNotFoundError: [Errno 2] No such file or directory: '/aws-robomaker-sample-application-helloworld/simulation_ws/bundle/cache/bundle_staging/setup.sh'

Environment: rostooling/setup-ros-docker:ubuntu-focal-ros-foxy-ros-base-latest
colcon-bundle version: 0.1.3
colcon-ros-bundle version 0.1.0

Getting issue in colcon bundle with custom source list

Hi Team,

I got the following error below when I execute as colcon bundle --apt-sources-list ~/test_bundle_apt/source.list where source.list having local apt packages path I.e. deb [trusted=yes] file:///home/user/test_bundle_apt/alto_apt_pkgs ./

Note: I had downloaded all apt packages using apt download <packages list> under this folder 'alto_apt_pkgs' and also generate a Packages details file using dpkg-scanpackages . /dev/null > Packages that were required for colcon bundle command.

Error as below:

Get:191 file:/home/user/test_bundle_apt/alto_apt_pkgs ./ ros-melodic-ros-core 1.4.1-0bionic.20210112.183722 [2176 B]                         
Get:192 file:/home/user/test_bundle_apt/alto_apt_pkgs ./ ros-melodic-ros-base 1.4.1-0bionic.20210112.183921 [1924 B]                         
Fetched 0 B in 0s (0 B/s)                                                                                                                    
Extracting apt packages...
Creating bundle archive V2...
[6.795s] ERROR:colcon:colcon bundle: [Errno 2] No such file or directory: '/home/user/temp/AltoRosNodes/host_app_ws/bundle/cache/bundle_staging/setup.sh'
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/colcon_core/command.py", line 528, in verb_main
    rc = context.args.main(context=context)
  File "/usr/local/lib/python3.6/dist-packages/colcon_bundle/verb/bundle.py", line 143, in main
    dependencies_changed)
  File "/usr/local/lib/python3.6/dist-packages/colcon_bundle/verb/_archive_generators.py", line 111, in generate_archive_v2
    dependencies_overlay_path)
  File "/usr/local/lib/python3.6/dist-packages/colcon_bundle/verb/_overlay_utilities.py", line 81, in create_dependencies_overlay
    _CONTEXT_VAR_SH
  File "/usr/local/lib/python3.6/dist-packages/colcon_bundle/verb/_overlay_utilities.py", line 136, in _render_template
    with script_dest.open('w') as file:
  File "/usr/lib/python3.6/pathlib.py", line 1183, in open
    opener=self._opener)
  File "/usr/lib/python3.6/pathlib.py", line 1037, in _opener
    return self._accessor.open(self, flags, mode)
  File "/usr/lib/python3.6/pathlib.py", line 387, in wrapped
    return strfunc(str(pathobj), *args)
FileNotFoundError: [Errno 2] No such file or directory: '/home/user/temp/AltoRosNodes/host_app_ws/bundle/cache/bundle_staging/setup.sh'

I have also attached entirely the logs below for reference. my local apt packages folder i.e. alto_apt_pkgs is ~580 but I am getting this error after 192 apt packages.

colcon-bundle-error.log

Could you please assist me to crack this error?

Support ROS2 Bundles

I'd like to be able to bundle ROS2 applications with colcon bundle. When I tried it today I got the following error:

root@c3ecc06d90eb:/ws# colcon bundle
Bundling workspace...
Reading package lists... Done
Building dependency tree... Done
Checking if dependency tarball exists...
Collecting dependency information...
[62.786s] WARNING:colcon.colcon_bundle.verb:No task extension to bundle a ros.ament_cmake package
[62.984s] WARNING:colcon.colcon_bundle.verb:No task extension to bundle a ros.ament_cmake package
[63.162s] WARNING:colcon.colcon_bundle.verb:No task extension to bundle a ros.ament_python package
[63.335s] WARNING:colcon.colcon_bundle.verb:No task extension to bundle a ros.ament_cmake package
[63.475s] WARNING:colcon.colcon_bundle.verb:No task extension to bundle a ros.ament_cmake package
[63.616s] WARNING:colcon.colcon_bundle.verb:No task extension to bundle a ros.ament_cmake package
                      
Summary: 0 packages finished [57.6s]
Fetching and installing dependencies...
[81.748s] ERROR:colcon:colcon bundle: [Errno 2] No such file or directory: '/ws/bundle/bundle_staging/setup.sh'
Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/colcon_core/command.py", line 436, in verb_main
    rc = context.args.main(context=context)
  File "/usr/local/lib/python3.5/dist-packages/colcon_bundle/verb/bundle.py", line 129, in main
    generate_archive_v1(path_context)
  File "/usr/local/lib/python3.5/dist-packages/colcon_bundle/verb/_archive_generators.py", line 29, in generate_archive_v1
    shutil.copy2(shellscript_path, os.path.join(staging_path, 'setup.sh'))
  File "/usr/lib/python3.5/shutil.py", line 251, in copy2
    copyfile(src, dst, follow_symlinks=follow_symlinks)
  File "/usr/lib/python3.5/shutil.py", line 115, in copyfile
    with open(dst, 'wb') as fdst:
FileNotFoundError: [Errno 2] No such file or directory: '/ws/bundle/bundle_staging/setup.sh'

colcon bundle fails

Running colcon bundle for ROSbotTutorialBundling workspace...
[0.812s] ERROR:colcon:colcon bundle: We did not find any packages to add to the bundle. This might be because you are not in the right directory, or your workspace is not setup correctly for colcon. Please see https://github.com/colcon/colcon-ros-bundle/issues/13for some possible suggestions. If you are still having trouble please post to ourissues: https://github.com/colcon/colcon-bundle/issues and we will be happy to help.

Having Issues Bundling Ros1 Project

Hi,

New to colcon and trying to wrap my head for ROS1 (Kinetic) project. I am trying to bundle a ROS1 (Kinetic) with colcon bundle that built fine with colcon build.

$ colcon bundle              
Bundling workspace...
Reading package lists... Done
Building dependency tree... Done
Collecting dependency information...
[7.788s] WARNING:colcon.colcon_bundle.verb:No task extension to bundle a cmake package
                     
Summary: 0 packages finished [7.24s]
Fetching and installing dependencies...
[9.643s] ERROR:colcon:colcon bundle: [Errno 2] No such file or directory: '/home/ubuntu/Dev/bundle/bundle_staging/setup.sh'
Traceback (most recent call last):
  File "/home/ubuntu/.local/lib/python3.5/site-packages/colcon_core/command.py", line 436, in verb_main
    rc = context.args.main(context=context)
  File "/home/ubuntu/.local/lib/python3.5/site-packages/colcon_bundle/verb/bundle.py", line 142, in main
    generate_archive_v1(install_base, staging_path, bundle_base)
  File "/home/ubuntu/.local/lib/python3.5/site-packages/colcon_bundle/verb/_archive_generators.py", line 28, in generate_archive_v1
    shutil.copy2(shellscript_path, os.path.join(staging_path, 'setup.sh'))
  File "/usr/lib/python3.5/shutil.py", line 251, in copy2
    copyfile(src, dst, follow_symlinks=follow_symlinks)
  File "/usr/lib/python3.5/shutil.py", line 115, in copyfile
    with open(dst, 'wb') as fdst:
FileNotFoundError: [Errno 2] No such file or directory: '/home/ubuntu/Dev/bundle/bundle_staging/setup.sh'

I am guessing that the bundle_staging/setup.sh file missing is due to the missing of extension to handle cmake packages. Looks like in version 0.0.6 CMake handling was added in #6 and #7.

Here are my current versions of colcon and related modules

$ pip3 freeze | grep colcon
colcon-argcomplete==0.3.2
colcon-bash==0.3.1
colcon-bundle==0.0.11
colcon-cmake==0.2.8
colcon-common-extensions==0.2.0
colcon-core==0.3.17
colcon-defaults==0.2.1
colcon-devtools==0.2.1
colcon-library-path==0.2.1
colcon-metadata==0.2.1
colcon-notification==0.2.6
colcon-output==0.2.3
colcon-package-information==0.2.2
colcon-package-selection==0.2.3
colcon-parallel-executor==0.2.3
colcon-pkg-config==0.1.0
colcon-powershell==0.3.3
colcon-python-setup-py==0.2.1
colcon-recursive-crawl==0.2.0
colcon-ros==0.3.7
colcon-ros-bundle==0.0.11
colcon-test-result==0.3.1
colcon-zsh==0.3.1

If it is better to report this to colcon-bundle project let me know!

Package conflicts with latest rosdep versions

The setup.cfg requires an older version of rosdep than is currently available (0.15.2):

install_requires =
    colcon-bundle>=0.0.10
    colcon-ros>=0.3.5
    rosdep<=0.14.0
    setuptools>=30.3.0

Is this conditional backwards, or is there a reason that this package requires the older version?

Foxy Support

ROS2 Foxy/ROS Noetic has been released and colcon-ros-bundle needs to be tested against both distributions.
This might not require any changes, but may require changes to colcon-bundle.

Requirements

  • Add Ubuntu 20.04 Focal Fossa Support
  • Test ROS Noetic
  • Test ROS2 Foxy

Python issues with Foxy and Ubuntu Focal

I am having packaging issues when package.xml has a pip requirement, can't install via system packages.

The error I am getting is:

mr337@ubuntu /tmp/blah $ colcon bundle                                                                                                                                                                               
Bundling workspace...                                                                                    
Cache is not valid. Clearing cache...                                                                                                                                                                              
Reading package lists... Done                                                                            
Building dependency tree... Done                                                                                                                                                                                   
Checking if dependency tarball exists...                                                                 
Starting >>> project                                                                                 
loading view [*default*] with rospkg loader                                                              
--- stderr: project                                                                                  
Traceback (most recent call last):                                                                       
  File "/home/mr337/.local/lib/python3.8/site-packages/colcon_core/executor/__init__.py", line 91, in __call__
    rc = await self.task(*args, **kwargs)                                                                                                                                                                          
  File "/home/mr337/.local/lib/python3.8/site-packages/colcon_core/task/__init__.py", line 93, in __call__
    return await task_method(*args, **kwargs)                                                            
  File "/home/mr337/.local/lib/python3.8/site-packages/colcon_ros_bundle/task/ament_python/bundle.py", line 28, in bundle
    await super().bundle()                                                                                                                                                                                         
  File "/home/mr337/.local/lib/python3.8/site-packages/colcon_ros_bundle/task/ros_bundle.py", line 67, in bundle
    args.installers['apt'].add_to_install_list('python-pip')                                                                                                                                                       
  File "/home/mr337/.local/lib/python3.8/site-packages/colcon_bundle/installer/apt.py", line 181, in add_to_install_list
    if not self.is_package_available(package_key):                                                                                                                                                                 
  File "/home/mr337/.local/lib/python3.8/site-packages/colcon_bundle/installer/apt.py", line 176, in is_package_available
    return self._cache[package_key] is not None                                                                                                                                                                    
  File "/usr/lib/python3/dist-packages/apt/cache.py", line 305, in __getitem__                                                                                                                                     
    raise KeyError('The cache has no package named %r' % key)                                                                                                                                                      
KeyError: "The cache has no package named 'python-pip'"
---                                                                                                                                                                                                                
Failed   <<< project [0.06s, exited with code 1]

After doing some digging it looks like the ros-bundle colcon plugin is adding the python2 version of pip which doesn't exist for Focal. Only the system packages python3-pip is available.

It looks like the ros-bundle is blindly injecting python-pip https://github.com/colcon/colcon-ros-bundle/blob/master/colcon_ros_bundle/task/ros_bundle.py#L67.

Does anyone have any objections to moving that to python3-pip since all the current ROS distros are python3 compatible or only support python3? Happy to make a PR.

OpenCV import fails when installed in Python2.7 and Python3.5

We have a roslaunch file which invokes a shell script that executes a Python 3 application. The Python 3 application fails to run because it is loading the incorrect version of OpenCV (the one installed into Python 2.7).

I believe this is because when roslaunch executes a shell script it includes the Python 2.7 variables in the environment. This is because roslaunch is itself a Python 2.7 application and running within the Python 2.7 environment. It's unclear if this is an issue specifically with bundles or just with launching Python 3 from Python2.7 in general.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.