Code Monkey home page Code Monkey logo

Comments (18)

Tobias-Fischer avatar Tobias-Fischer commented on July 19, 2024 2

Hi @songyuc - that's great to hear!

  1. As a first step, I would recommend setting up https://github.com/RoboStack/ros-humble locally and trying to build some packages.
  2. Once you have this working, you could copy the ros-humble folder to a new ros-iron folder. Then, you would need to rename (most/all?) the occurrences of humble with iron in this repository.
  3. Reset the vinca_*.yaml files to full_rebuild: true and build_number: 0.
  4. Then try to build e.g. the ros_base metapackage.
  5. You probably need to update a lot of the files in the patch folder, as many of the patches would now have been merged in upsteam.

Let me know how you go - I currently have limited time to push this myself, but I'd be happy to provide guidance.

from robostack.github.io.

IsabelParedes avatar IsabelParedes commented on July 19, 2024 1

Hi!
I'm trying this out here https://github.com/ihuicatl/ros-iron/tree/iron :)

from robostack.github.io.

IsabelParedes avatar IsabelParedes commented on July 19, 2024 1

@traversaro Thanks for the tips! I was able to figure it out now :)

So I found out that importlib.resources.path() is actually deprecated. Instead, one should use files(). So I patched ament-package with those changes. And with that I was able to get the correct paths.

But then, when building ament-cmake-core, cmake was still not able to find the files because the path contained a .egg directory which was not being recognized as a directory. So even though the files were actually there, cmake could not find them.

CMake Error: File /home/user/micromamba/envs/iron-dev/conda-bld/ros-iron-ament-cmake-core-0_1701450248389/_h_env_placehold_..._placeh/lib/python3.11/site-packages/ament_package-0.15.3-py3.11.egg/ament_package/template/package_level/local_setup.zsh.in does not exist.

And the creating of this .egg file is coming from the build scripts, from vinca. It uses setup.py install which is also deprecated now.
This was changed here: https://github.com/RoboStack/vinca/pull/40/files

So I went back to the old way of doing it with pip install and the binaries seem to be installed in the correct location ($PREFIX/lib). And ament-cmake-core builds without issues.

Now I'll move on to the rest of the packages. But maybe I'll fork vinca first to keep these changes. Hopefully this won't be a problem for iron RoboStack/ros-humble#41

from robostack.github.io.

songyuc avatar songyuc commented on July 19, 2024

Hello, my name is Yucheng Song. Iā€™m interested in joining this project because I hope to use ros-iron on the Win11 system. I have about 5 hours per week that I can dedicate to this project. I have basic knowledge of C++ and Python programming. Iā€™m not sure if I have the qualifications to participate, but Iā€™m willing to learn and contribute. Please let me know if I can join. Thank you.

from robostack.github.io.

songyuc avatar songyuc commented on July 19, 2024

For the first step

Ros-humble installed

I have successfully installed ros-humble, as shown below,
image

Ros2/examples.git constructed

image

from robostack.github.io.

songyuc avatar songyuc commented on July 19, 2024

Hi, @Tobias-Fischer
I should admit that I am new to ROS2. And I have tried installing ros-humble.
And the question is whether "setting up https://github.com/RoboStack/ros-humble locally" means building it from source?

from robostack.github.io.

Tobias-Fischer avatar Tobias-Fischer commented on July 19, 2024

I meant being able to follow the "Testing changes locally" section on https://robostack.github.io/Contributing.html - including the "# Build the recipe using boa:" part.

from robostack.github.io.

songyuc avatar songyuc commented on July 19, 2024

Thank you for your guidance.

from robostack.github.io.

songyuc avatar songyuc commented on July 19, 2024

I am trying to set up ros-humble locally. But there was an error when execute vinca --multiple, showing as:

Traceback (most recent call last):
  File "C:\Users\songyucheng\mambaforge\envs\robostackenv\lib\runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Users\songyucheng\mambaforge\envs\robostackenv\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "C:\Users\songyucheng\mambaforge\envs\robostackenv\Scripts\vinca.exe\__main__.py", line 7, in <module>
  File "C:\Users\songyucheng\mambaforge\envs\robostackenv\lib\site-packages\vinca\main.py", line 1011, in main
    distro = Distro(vinca_conf["ros_distro"], python_version)
  File "C:\Users\songyucheng\mambaforge\envs\robostackenv\lib\site-packages\vinca\distro.py", line 11, in __init__
    self._distro = get_cached_distribution(index, distro_name)
  File "C:\Users\songyucheng\mambaforge\envs\robostackenv\lib\site-packages\rosdistro\__init__.py", line 137, in get_cached_distribution
    cache = get_distribution_cache(index, dist_name)
  File "C:\Users\songyucheng\mambaforge\envs\robostackenv\lib\site-packages\rosdistro\__init__.py", line 177, in get_distribution_cache
    yaml_str = get_distribution_cache_string(index, dist_name)
  File "C:\Users\songyucheng\mambaforge\envs\robostackenv\lib\site-packages\rosdistro\__init__.py", line 164, in get_distribution_cache_string
    yaml_gz_str = load_url(url, skip_decode=True)
  File "C:\Users\songyucheng\mambaforge\envs\robostackenv\lib\site-packages\rosdistro\loader.py", line 48, in load_url
    fh = urlopen(url, timeout=timeout)
  File "C:\Users\songyucheng\mambaforge\envs\robostackenv\lib\urllib\request.py", line 216, in urlopen
    return opener.open(url, data, timeout)
  File "C:\Users\songyucheng\mambaforge\envs\robostackenv\lib\urllib\request.py", line 525, in open
    response = meth(req, response)
  File "C:\Users\songyucheng\mambaforge\envs\robostackenv\lib\urllib\request.py", line 634, in http_response
    response = self.parent.error(
  File "C:\Users\songyucheng\mambaforge\envs\robostackenv\lib\urllib\request.py", line 563, in error
    return self._call_chain(*args)
  File "C:\Users\songyucheng\mambaforge\envs\robostackenv\lib\urllib\request.py", line 496, in _call_chain
    result = func(*args)
  File "C:\Users\songyucheng\mambaforge\envs\robostackenv\lib\urllib\request.py", line 643, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 400: Bad Request (http://repo.ros2.org/rosdistro_cache/humble-cache.yaml.gz)

I could access the URL (http://repo.ros2.org/rosdistro_cache/humble-cache.yaml.gz), with Edge normally as,
image.
But the error showed at the terminal.

from robostack.github.io.

Tobias-Fischer avatar Tobias-Fischer commented on July 19, 2024

That's weird - do you sit behind a firewall or something? Could you please try again to see whether it was temporary?

from robostack.github.io.

songyuc avatar songyuc commented on July 19, 2024

I am in China currently, where some requests from IPs outside of China may be censored and unable to access.
I test it again and failed.

from robostack.github.io.

songyuc avatar songyuc commented on July 19, 2024

After some testing, I guess there are two special conditions I should mention about my machine:

  1. Win11 system
  2. VPN for accessing (https://raw.githubusercontent.com/ros/rosdistro/master/index-v4.yaml)

Condition 2 is a prerequisite for me to access githubusercontent in my current region.

With these two conditions, I found that I could access repo.ros2.org with https as https://repo.ros2.org/rosdistro_cache/humble-cache.yaml.gz.

from robostack.github.io.

songyuc avatar songyuc commented on July 19, 2024

Hello,

I would like to discuss a potential enhancement to the vinca --multiple command. Currently, in my region, I am required to use a VPN to access certain URLs, including those needed for vinca. I have found that I can access repo.ros2.org using HTTPS directly, which is not blocked.

Could we consider modifying vinca --multiple to default to HTTPS when accessing resources? This change would greatly assist myself and potentially others in similar network-restricted environments.

Thank you for considering this request.

Best regards,
Yucheng Song

from robostack.github.io.

Tobias-Fischer avatar Tobias-Fischer commented on July 19, 2024

This is a rosdistro issue, see https://github.com/ros/rosdistro/blob/master/index.yaml

I'd be happy to review a PR in vinca that remaps HTTP requests to HTTPS requests for these URLs.

from robostack.github.io.

traversaro avatar traversaro commented on July 19, 2024

Hi! I'm trying this out here https://github.com/ihuicatl/ros-iron/tree/iron :)

Great, thanks a lot! Feel free to ask for any problem.

from robostack.github.io.

IsabelParedes avatar IsabelParedes commented on July 19, 2024

Hi! I ran into an issue with ament-package already. It builds fine but it causes ament-cmake-core to fail because it's one of its dependencies.

ament-cmake-core fails because it cannot find these files:

  • /tmp/tmpxsb4wg2vlocal_setup.bash.in
  • /tmp/tmp87s9kgz5local_setup.sh.in
  • /tmp/tmpn986xsv3local_setup.zsh.in

Those files definitely do not exist. The path seems to be incorrect. From looking at Humble, the path should be something like this:

  • $PREFIX/lib/python3.10/site-packages/ament_package/template/package_level/local_setup.bash.in
  • $PREFIX/lib/python3.10/site-packages/ament_package/template/package_level/local_setup.sh.in
  • $PREFIX/lib/python3.10/site-packages/ament_package/template/package_level/local_setup.zsh.in

These paths are set with ament-package, but more specifically with importlib_resources.path() (https://github.com/ament/ament_package/blob/cf415e74bb8faff896bb6915ee3d120cc7b60fc3/ament_package/templates.py#L27)

When building Iron, it's using importlib_resources=6.1.1 which is the same version that can be used to build Humble. Somehow it still comes up with different paths. (As a note, for Iron I'm using python=3.11 instead of 3.10).

One of the changes from Humble to Iron was the removal of isolated prefix level template (ament/ament_package#133) which I'm not sure if it's the culprit in this case.

I'll try to dive more into these templates, but if you can think of any easier solutions please let me know. Or maybe there's something else I'm missing.

Btw, I also tested the patches for ament-package and ament-cmake-core from Humble, but it was the same problem.

Thanks!

from robostack.github.io.

traversaro avatar traversaro commented on July 19, 2024

Thanks @ihuicatl ! Do you happen to have the complete failure log somewhere? They may be helpful to help you on the debug, thanks!

from robostack.github.io.

traversaro avatar traversaro commented on July 19, 2024

When building Iron, it's using importlib_resources=6.1.1 which is the same version that can be used to build Humble. Somehow it still comes up with different paths. (As a note, for Iron I'm using python=3.11 instead of 3.10).

With respect to that, note that ament_package uses the stdlib's importlib.resources if it is available (see https://github.com/ament/ament_package/blob/iron/ament_package/templates.py#L19), so I do not think the version of importlib_resources plays a role here.

If you have somewhere the ament_package build for iron, can you run the following Python script to understand what it prints:

import ament_package
import ament_package.templates
print(ament_package.templates.get_package_level_template_path('local_setup.bash.in'))
import importlib
print(importlib.resources.path('ament_package.template.prefix_level',''))
print(ament_package.template.prefix_level.__file__)

from robostack.github.io.

Related Issues (20)

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.