Skip to content

Inject custom vendor packages for Harmonic to avoid Python ABI problems#840

Merged
caguero merged 1 commit intojazzyfrom
jrivero/fix_docker_python_gz
Jul 24, 2025
Merged

Inject custom vendor packages for Harmonic to avoid Python ABI problems#840
caguero merged 1 commit intojazzyfrom
jrivero/fix_docker_python_gz

Conversation

@j-rivero
Copy link
Copy Markdown
Collaborator

Closes: #839

To avoid the installation of the ros-jazzy-gz-*-vendor (being * the Gz packages with Python wrappers) / ros-jazzy-sdformat-vendor packages the PR does the following:

  • The PR changes the Dockerfile.base not to be based in desktop-full but in ros-base
  • Create a fake debian package that Provides: the vendor packages for the Gazebo libraries that have Python bindings. This way the .deb package dependency chain can continue working without the risk of installing the vendor packages and rosdep can still be used.
  • To replace the real ROS Gazebo vendor packages "provided" by the fake .deb package, stablish a colcon workspace with a gz.repos file that builds from source the packages. The Gazebo vendor packages can use the system installation of Gazebo libraries if present so no real compilation is done and the .deb packages are being used.
  • Inject for interactive and non-interactive logins the variables that allows the transparent interaction for the user sourcing the colcon workspace and making the gz tool from ROS to work also with system packages.

Signed-off-by: Jose Luis Rivero <jrivero@honurobotics.com>
Copy link
Copy Markdown
Collaborator

@caguero caguero left a comment

Choose a reason for hiding this comment

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

I was able to reproduce the issue by running:

rocker --devices /dev/input/js0 --x11 --nvidia --user --home ghcr.io/osrf/vrx-devel:latest /bin/bash

and then inside the container

sudo apt-get update
sudo apt-get upgrade

After compiling VRX, I hit the issue when launching VRX:

caguero@1f7431d4c4df:~/vrx_ws$ ros2 launch vrx_gz competition.launch.py
[INFO] [launch]: All log files can be found below /home/caguero/.ros/log/2025-07-17-22-06-38-861309-1f7431d4c4df-5099
[INFO] [launch]: Default logging verbosity is set to INFO
[ERROR] [launch]: Caught exception in launch (see debug for traceback): Caught multiple exceptions when trying to load file of format [py]:
 - ImportError: /usr/lib/python3/dist-packages/sdformat14.cpython-312-x86_64-linux-gnu.so: undefined symbol: _ZNK3sdf3v144Cone14AxisAlignedBoxEv
 - InvalidFrontendLaunchFileError: The launch file may have a syntax error, or its format is unknown

Do you have some instructions to verify that this patch fixes the issue?

@j-rivero
Copy link
Copy Markdown
Collaborator Author

Do you have some instructions to verify that this patch fixes the issue?

Oh yes, sorry.

cd docker
docker-compose build base devel
rocker --devices /dev/input/js0 --x11 --nvidia --user --home vrx-devel:latest /bin/bash

Should leave you in the modified container.

@j-rivero j-rivero mentioned this pull request Jul 24, 2025
Copy link
Copy Markdown
Collaborator

@caguero caguero left a comment

Choose a reason for hiding this comment

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

It works for me now!

@caguero caguero merged commit ca212c9 into jazzy Jul 24, 2025
2 checks passed
@caguero caguero deleted the jrivero/fix_docker_python_gz branch July 24, 2025 15:17
exordor pushed a commit to exordor/vrx_tunnel that referenced this pull request Oct 26, 2025
…ms (osrf#840)

Signed-off-by: Jose Luis Rivero <jrivero@honurobotics.com>
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.

jazzy branch possibly broken

2 participants