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

Build for Jazzy with mavros from source #1

Closed
wants to merge 16 commits into from

Conversation

amarburg
Copy link

@amarburg amarburg commented Jun 13, 2024

Per blue!169, an official image for Jazzy is blocked by the lack of a Jazzy package for Mavros

Changes Made

  • Install Mavros and Mavlink from source (Rolling release) directly into the blue workspace.

  • Updates to Gazebo "Harmonic"

  • This also required bashing through issues related to Ubuntu 24.04:

    • Ubuntu 24.04 now has a "externally managed installation" of Python, which discourages "pip install"ing packages outside of virtualenv. Create virtual env ~/.venv/blue and activate by default both within the build and when running in the docker. This leads to rosdep installing some pip dependencies into the venv.

Testing

Please provide a clear and concise description of the testing performed.

@amarburg amarburg self-assigned this Jun 13, 2024
@evan-palmer
Copy link

There's some additional information regarding the move away from global Python package installations in PEP 668. From what I understand, Ubuntu will be keeping the marker file present in the base image, and because the ROS images use Ubuntu as their base image, this problem will persist. I haven't tried this yet, but you could try removing the marker file from the base image:

rm -rf /usr/lib/python3.12/EXTERNALLY_MANAGED

You might need to updated the system path afterwards as well. Using a virtual environment seems like the best approach moving forward though.

@@ -40,7 +42,7 @@ FROM ci as robot

# Configure a new non-root user
ARG USERNAME=blue
ARG USER_UID=1000
ARG USER_UID=1001 # ros image now includes a user "ubuntu" at UID 1000

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You may run into permissions issues here when trying to use the devcontainer. The blue user likely won't belong to the same group as your personal user on your local system (set to 1000 by default). My solution has been to go along with the ubuntu user standardization.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, I hadn't considered the permission ramifications. So you are using the user ubuntu?

# Configure a new non-root user
#
# ros image now includes a user "ubuntu" at UID 1000
ARG USERNAME=ubuntu
ARG USER_UID=1000  
ARG USER_GID=$USER_UID

RUN echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \
    && chmod 0440 /etc/sudoers.d/$USERNAME \
    && usermod -a -G dialout $USERNAME \
    && echo "source /usr/share/bash-completion/completions/git" >> /home/$USERNAME/.bashrc

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah. This was motivated by discussions in cloud-images!2005129, which make it seem like the Ubuntu devs are attempting to standardize the ubuntu user. You could still delete the ubuntu user to regain access to UID 1000, but I opted against that.

@amarburg amarburg changed the title Placeholder image for Jazzy with mavros from source Build for Jazzy with mavros from source Jun 19, 2024
@amarburg
Copy link
Author

@evan-palmer (finally), I believe this branch is complete. Multi-platform builds are time consuming.

Starting on testing.

Copy link

mergify bot commented Aug 6, 2024

This pull request is in conflict. Could you fix it @amarburg?

@amarburg
Copy link
Author

amarburg commented Aug 6, 2024

This PR has been split up:

  • blue PR 223 contains the migration from Gazebo Garden to Harmonic (for all releasese)
  • blue PR 220 handles the migration of rolling to ubuntu "Noble", which requires handling the "ubuntu" user and python venv. Once merged it should be propagated to jazzy

Once those two are merged, the jazzy branch then needs to be updated to build Mavros from source (there are binary packages for rolling)

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.

2 participants