Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal: Use PlatformIO Python in colcon build #108

Merged
merged 1 commit into from
Oct 24, 2023

Conversation

maru-n
Copy link
Contributor

@maru-n maru-n commented Jul 12, 2023

Regarding the execution of 'colcon build' within library_builder.py:

In my local environment, the 'cmake' command within 'colcon build' in library_builder.py seems to find and use the system's Python instead of the Python version bundled with PlatformIO. Consequently, if I use a virtual environment like pyenv, 'colcon build' fails.

I can make PlatformIO use its bundled Python version by setting the -DPython3_EXECUTABLE option in --cmake-args.

This appears to be the desired behavior, for the following reasons:

  1. extra_script.py installs required packages such as 'colcon' into PlatformIO's environment.
  2. The PlatformIO environment is activated prior to executing the 'colcon build' command.

In fact, setting this option allows all builds to be completed using PlatformIO's Python version, which works well in a pyenv environment.

However, I believe that executing the build on a system with ROS already installed is also a correct approach.

While I'm not fully versed in this library to make a definitive call, I thought it pertinent to raise this issue and have therefore submitted this PR.

@pablogs9 pablogs9 requested a review from Acuadros95 July 12, 2023 05:57
@normen
Copy link

normen commented Oct 23, 2023

Would be great if this was merged as the computer I am building the micro-ros part is not the one running ros2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants