-
Notifications
You must be signed in to change notification settings - Fork 49
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
Relax EmPy version requirement now that v4 is working #667
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #667 +/- ##
==========================================
- Coverage 87.35% 87.29% -0.06%
==========================================
Files 67 67
Lines 3921 3921
Branches 775 775
==========================================
- Hits 3425 3423 -2
- Misses 392 394 +2
Partials 104 104 ☔ View full report in Codecov by Sentry. |
Hi There, We run into an issue with using colcon-core 0.18.1 with ros2 humble on Ubuntu 22.04 LTS, where 'colcon build' failed to build a custom service interface definition due to braking changes introduced by empy>=4. $ colcon build
Starting >>> hwadapter_srvs
CMake Error at /opt/ros/humble/share/rosidl_adapter/cmake/rosidl_adapt_interfaces.cmake:59 (message):
execute_process(/home/user/Development/rosws/.venv/bin/python3 -m
rosidl_adapter --package-name hwadapter_srvs --arguments-file
/home/user/Development/rosws/build/hwadapter_srvs/rosidl_adapter__arguments__hwadapter_srvs.json
--output-dir
/home/user/Development/rosws/build/hwadapter_srvs/rosidl_adapter/hwadapter_srvs
--output-file
/home/user/Development/rosws/build/hwadapter_srvs/rosidl_adapter/hwadapter_srvs.idls)
returned error code 1:
AttributeError processing template 'srv.idl.em'
Traceback (most recent call last):
File "/opt/ros/humble/local/lib/python3.10/dist-packages/rosidl_adapter/resource/__init__.py", line 51, in evaluate_template
em.BUFFERED_OPT: True,
AttributeError: module 'em' has no attribute 'BUFFERED_OPT'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/opt/ros/humble/local/lib/python3.10/dist-packages/rosidl_adapter/__main__.py", line 19, in <module>
sys.exit(main())
File "/opt/ros/humble/local/lib/python3.10/dist-packages/rosidl_adapter/main.py", line 53, in main
abs_idl_file = convert_to_idl(
File "/opt/ros/humble/local/lib/python3.10/dist-packages/rosidl_adapter/__init__.py", line 24, in convert_to_idl
return convert_srv_to_idl(
File "/opt/ros/humble/local/lib/python3.10/dist-packages/rosidl_adapter/srv/__init__.py", line 39, in convert_srv_to_idl
expand_template('srv.idl.em', data, output_file, encoding='iso-8859-1')
File "/opt/ros/humble/local/lib/python3.10/dist-packages/rosidl_adapter/resource/__init__.py", line 23, in expand_template
content = evaluate_template(template_name, data)
File "/opt/ros/humble/local/lib/python3.10/dist-packages/rosidl_adapter/resource/__init__.py", line 69, in evaluate_template
_interpreter.shutdown()
AttributeError: 'NoneType' object has no attribute 'shutdown'
Call Stack (most recent call first):
/opt/ros/humble/share/rosidl_cmake/cmake/rosidl_generate_interfaces.cmake:130 (rosidl_adapt_interfaces)
CMakeLists.txt:15 (rosidl_generate_interfaces)
---
Failed <<< hwadapter_srvs [1.11s, exited with code 1]
We use If you can think of an alternative resolution, it would be appreciated. As using the older version is bearable for us at the moment, I decided to put this here for your information, instead of opening an issue. |
The problem you're seeing has nothing to do with colcon. The backtrace originates in It's the same underlying cause, but your problem has nothing to do with colcon. |
Ok, maybe I had a misconception about how independent colcon and ros2 are as projects. |
It's possible that by finally relaxing the constraint in colcon, there were no other pip packages holding EmPy back and pip felt free to finally update it to the latest release, which doesn't happen to be compatible with Because ROS packages built from source don't play a role in pip's dependency resolution, pip wasn't aware that updating EmPy would cause problems. I would say that this is one of many sharp edges you'll experience using package managers other than your platform's default package manager (apt, in your case), and is one of the reasons we've been driving pip dependencies out of the installation instructions. Nearly all colcon packages are available as deb packages, either in the ROS 2 repositories or the standalone colcon packagecloud repository. I encourage you to consider using that to install colcon and other ROS 2 dependencies rather than resorting to pip, and avoid problems like this in the future. |
Requires #666
Closes #627