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

Support ROS 2 Jazzy / Ubuntu 24.04 #169

Merged
merged 12 commits into from
May 6, 2024
Merged

Support ROS 2 Jazzy / Ubuntu 24.04 #169

merged 12 commits into from
May 6, 2024

Conversation

sea-bass
Copy link
Owner

@sea-bass sea-bass commented Apr 26, 2024

This PR switches to use ROS (not OSRF) Docker images and also adds Jazzy support now that it's out.

@sea-bass sea-bass requested a review from eholum May 5, 2024 20:06
Copy link

github-actions bot commented May 5, 2024

Coverage

Coverage Report
FileStmtsMissCoverMissing
__init__.py00100% 
core
   __init__.py90100% 
   dynamics.py430100% 
   gazebo.py136894%55, 124, 230, 244–248
   hallway.py731086%59, 61, 63, 96, 158, 196–199, 205
   locations.py1262183%53, 55, 69, 84–85, 87, 98–99, 101–102, 119, 177, 192, 217, 227, 273, 284–285, 287–288, 312
   objects.py69494%78, 106, 137, 197
   robot.py2145872%140–141, 203, 216, 263, 277–278, 282, 286, 292–293, 295–296, 313–314, 342, 344–345, 366–367, 370–373, 376–378, 403, 407–409, 411, 413–416, 429–431, 435, 437–439, 441, 444–445, 448, 470–471, 479, 484–489, 492, 505
   room.py48197%113
   world.py57113875%146–147, 183–184, 188, 241–242, 244–245, 273–274, 325, 339–340, 342–343, 372–376, 378–380, 382–383, 386, 390–394, 397–399, 402–409, 440, 476–477, 480, 496, 526–527, 538, 541, 563–567, 569–571, 574–575, 578–581, 583, 586, 588–590, 592–594, 596, 615, 625–629, 664–665, 668–671, 688–689, 695–696, 698–699, 701, 703–704, 706, 708–709, 719–720, 723, 725, 739, 741, 748, 795, 826–827, 846–847, 851–852, 887–888, 890, 907–908, 927–931, 943–946, 958–961, 986–987, 989, 1033–1034, 1166–1167
   yaml_utils.py1061189%64, 68, 152–154, 158–159, 182–183, 207–208
gui
   __init__.py20100% 
   main.py1522980%22, 24–26, 28, 49, 178–181, 188–191, 193, 196–202, 206–208, 212–213, 219, 230
   world_canvas.py2265276%34–36, 110, 112, 114, 177, 181, 232–237, 243–244, 246–248, 253–254, 257, 260–262, 265, 270–271, 273, 300, 322–327, 330, 333–334, 349–351, 354, 371, 400, 418–419, 421–422, 464, 480, 487
manipulation
   __init__.py10100% 
   grasping.py2366174%102, 110–112, 114–122, 124, 132, 462, 464–466, 470–472, 566–568, 571–575, 583, 586–588, 593–594, 600–604, 607–614, 617–619, 628, 630, 632–638
navigation
   __init__.py30100% 
   a_star.py781087%67–72, 74–76, 165
   execution.py34488%46–47, 49–50
   occupancy_grid.py1391489%44–47, 49–53, 56, 192, 226, 234, 238
   path_planner.py26676%33, 36, 38, 42, 85, 90
   planner_base.py591771%29–35, 51, 57–59, 140–145
   prm.py725622%40–44, 46, 50–51, 54, 57–64, 66–67, 76–79, 85, 101–102, 104–109, 111–112, 115–118, 121–126, 135, 144, 154, 156, 158–159, 161, 174–178
   rrt.py172795%228, 353–354, 360–361, 363, 392
   world_graph.py70395%118, 121, 145
planning
   __init__.py00100% 
   actions.py664334%59–60, 62, 66–75, 77–80, 82–86, 88–91, 93–97, 99–100, 102–104, 150–151, 154–158
planning/pddlstream
   __init__.py7185%13
   default_mappings.py90100% 
   planner.py40880%119–126
   primitives.py57296%68, 208
   utils.py85396%66, 99–100
utils
   __init__.py00100% 
   general.py33487%23, 45, 51–52
   knowledge.py1391688%90–91, 100, 135–138, 145, 149–150, 163, 178, 182, 224, 240, 295
   motion.py60690%56, 67–71
   polygon.py1110100% 
   pose.py89396%79, 211, 227
   search_graph.py93396%240–242
   trajectory.py650100% 
TOTAL351959982% 

Tests Skipped Failures Errors Time
168 0 💤 0 ❌ 0 🔥 3m 36s ⏱️

@sea-bass sea-bass marked this pull request as ready for review May 5, 2024 23:01
@sea-bass sea-bass changed the title Support ROS 2 Jazzy Support ROS 2 Jazzy / Ubuntu 24.04 May 5, 2024
Copy link
Collaborator

@eholum eholum left a comment

Choose a reason for hiding this comment

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

Might need a bit more time to diagnose wtf is going on here, I partially blame my arm64 processor but no idea if that's the case.

So asking my dumb question for clarification while I do that...

Comment on lines 37 to 38
RUN python3 -m venv ${VIRTUAL_ENV}
ENV PATH="${VIRTUAL_ENV}/bin:${PATH}"
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm learning a lot about venvs from you! In this case I might need a little more information - since it feels very "un-docker-y" to use a venv (I don't know if that's true). Would it be preferable to add a test target after installing baseline dependencies in the pyrobosim image? Is there some specific advantage to a venv?

Copy link
Collaborator

Choose a reason for hiding this comment

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

There are some weird issues that I run into building the base image... definitely unrelated here but man pip is messing me up.

8.903 Collecting PyQt5 (from pyrobosim==1.2.0)
8.931   Downloading PyQt5-5.15.10.tar.gz (3.2 MB)
11.68      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.2/3.2 MB 1.2 MB/s eta 0:00:00
11.95   Installing build dependencies: started
17.11   Installing build dependencies: finished with status 'done'
17.11   Getting requirements to build wheel: started
17.18   Getting requirements to build wheel: finished with status 'done'
17.18   Preparing metadata (pyproject.toml): started
17.26   Preparing metadata (pyproject.toml): finished with status 'error'
17.26   error: subprocess-exited-with-error
17.26   
17.26   × Preparing metadata (pyproject.toml) did not run successfully.
17.26   │ exit code: 1
17.26   ╰─> [23 lines of output]
17.26       pyproject.toml: line 7: using '[tool.sip.metadata]' to specify the project metadata is deprecated and will be removed in SIP v7.0.0, use '[project]' instead

Copy link
Owner Author

@sea-bass sea-bass May 6, 2024

Choose a reason for hiding this comment

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

So in Ubuntu >= 23.04 (introduced in Python 3.11) you get an error by default if you directly try pip install packages into system Python (apt installs are fine).

The 2 ways to get around that are:

  1. Make a virtual environment
  2. Add the --break-system-packages arg (which does not exist as an option in older versions)

Neither of them is ideal, but the first one can be made to work in both older and newer versions... at some cost as you can see here.

The 2nd option can be implemented with some logic that checks the Python and/or Ubuntu version and adds the argument only for newer versions. This would prevent the need for a venv in the Dockerfile AND let us actually run colcon test. So maybe this is preferable even if ugly?

Copy link
Owner Author

Choose a reason for hiding this comment

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

As for your error, I wonder if the version of PyQt5 released for your architecture is wonky. See if you can install a different version than whatever is pinned, or maybe pin it to an older version if not set in the requirements?

Copy link
Owner Author

Choose a reason for hiding this comment

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

Actually, I found a much better solution!

ENV PIP_BREAK_SYSTEM_PACKAGES=1

Copy link
Owner Author

@sea-bass sea-bass May 6, 2024

Choose a reason for hiding this comment

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

pyproject.toml: line 7: using '[tool.sip.metadata]' to specify the project metadata is deprecated and will be removed in SIP v7.0.0, use '[project]' instead

This one seems like a known issue... sigh
altendky/pyqt-tools#120

I guess if you put the image to something that uses Python 3.10 or earlier, you'll be at least able to work for now?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I guess this is now moot because of your migration off PyQt5... but for the build issues I ran into I just needed to apt-get install -y qtbase5-dev prior to installing the Python package. I guess you need to have the build tools installed and for some reason in my docker build they just weren't... Also needing to somehow auto accept the GPL license terms.

Either way if you merge the migration all those issues go away and I can have that hour of my life back.

@sea-bass sea-bass merged commit 74c3c65 into main May 6, 2024
7 checks passed
@sea-bass sea-bass deleted the support-jazzy branch May 6, 2024 23:04
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