ros2 / rosidl_typesupport

Packages which provide the typesupport for ROS messages and services
Apache License 2.0
13 stars 34 forks source link

No module named `rosidl_generator_type_description` and `rosidl_generator_c` in Rolling CycloneDDS #138

Closed Crola1702 closed 1 year ago

Crola1702 commented 1 year ago

Bug report

Required Info:

Steps to reproduce issue

  1. Run a build in Rolling and using CycloneDDS
  2. See tests fail

Expected behavior

Tests should pass

Actual behavior

The following tests are failing:

Additional information

Reference build: https://build.ros2.org/view/Rci/job/Rci__nightly-cyclonedds_ubuntu_jammy_amd64/393/

Error Message is:

Log output:

rosidl_typesupport_cpp.src.ros2.rosidl_typesupport.rosidl_typesupport_cpp.test.test_cli_extension.test_cli_extension_for_smoke:

``` tmp_path = PosixPath('/tmp/pytest-of-buildfarm/pytest-12/test_cli_extension_for_smoke0') capsys = <_pytest.capture.CaptureFixture object at 0x7f2e12691d50> def test_cli_extension_for_smoke(tmp_path, capsys): # NOTE(hidmic): pytest and empy do not play along, # the latter expects some proxy will stay in sys.stdout # and the former insists in overwriting it interface_files = [TEST_DIR + ':msg/Test.msg'] with capsys.disabled(): # so do everything in one run # Passing target typesupport implementations explictly ts = 'cpp[typesupport_implementations:{}]'.format( list(get_resources('rosidl_typesupport_cpp')) ) > generate( package_name='rosidl_typesupport_cpp', interface_files=interface_files, typesupports=[ts], output_path=tmp_path / 'explicit_args' ) ../../src/ros2/rosidl_typesupport/rosidl_typesupport_cpp/test/test_cli_extension.py:34: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../install_isolated/rosidl_cli/lib/python3.10/site-packages/rosidl_cli/command/generate/api.py:96: in generate return [extensions[0].generate( ../../install_isolated/rosidl_typesupport_cpp/local/lib/python3.10/dist-packages/rosidl_typesupport_cpp/cli.py:73: in generate return generate_cpp( ../../install_isolated/rosidl_typesupport_cpp/local/lib/python3.10/dist-packages/rosidl_typesupport_cpp/__init__.py:28: in generate_cpp return generate_files( ../../install_isolated/rosidl_pycommon/lib/python3.10/site-packages/rosidl_pycommon/__init__.py:112: in generate_files raise(e) ../../install_isolated/rosidl_pycommon/lib/python3.10/site-packages/rosidl_pycommon/__init__.py:103: in generate_files expand_template( ../../install_isolated/rosidl_pycommon/lib/python3.10/site-packages/rosidl_pycommon/__init__.py:165: in expand_template interpreter.string(template_content, template_path, locals=data) /usr/lib/python3/dist-packages/em.py:2391: in string self.safe(scanner, True, locals) /usr/lib/python3/dist-packages/em.py:2401: in safe self.parse(scanner, locals) /usr/lib/python3/dist-packages/em.py:2421: in parse token.run(self, locals) /usr/lib/python3/dist-packages/em.py:1547: in run self.subrun(info[0][1], interpreter, locals) /usr/lib/python3/dist-packages/em.py:1631: in subrun token.run(interpreter, locals) /usr/lib/python3/dist-packages/em.py:1425: in run interpreter.execute(self.code, locals) /usr/lib/python3/dist-packages/em.py:2596: in execute _exec(statements, self.globals, locals) :2: in ??? ../../install_isolated/rosidl_pycommon/lib/python3.10/site-packages/rosidl_pycommon/__init__.py:214: in _expand_template interpreter.string(content, str(template_path), kwargs) /usr/lib/python3/dist-packages/em.py:2391: in string self.safe(scanner, True, locals) /usr/lib/python3/dist-packages/em.py:2401: in safe self.parse(scanner, locals) /usr/lib/python3/dist-packages/em.py:2421: in parse token.run(self, locals) /usr/lib/python3/dist-packages/em.py:1425: in run interpreter.execute(self.code, locals) /usr/lib/python3/dist-packages/em.py:2596: in execute _exec(statements, self.globals, locals) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > ??? E ModuleNotFoundError: No module named 'rosidl_generator_type_description' :2: ModuleNotFoundError ```

rosidl_typesupport_c.src.ros2.rosidl_typesupport.rosidl_typesupport_c.test.test_cli_extension.test_cli_extension_for_smoke:

``` tmp_path = PosixPath('/tmp/pytest-of-buildfarm/pytest-8/test_cli_extension_for_smoke0') capsys = <_pytest.capture.CaptureFixture object at 0x7fcf637aee90> def test_cli_extension_for_smoke(tmp_path, capsys): # NOTE(hidmic): pytest and empy do not play along, # the latter expects some proxy will stay in sys.stdout # and the former insists in overwriting it interface_files = [TEST_DIR + ':msg/Test.msg'] with capsys.disabled(): # so do everything in one run # Passing target typesupport implementations explictly ts = 'c[typesupport_implementations:{}]'.format( list(get_resources('rosidl_typesupport_c')) ) > generate( package_name='rosidl_typesupport_c', interface_files=interface_files, typesupports=[ts], output_path=tmp_path / 'explicit_args' ) ../../src/ros2/rosidl_typesupport/rosidl_typesupport_c/test/test_cli_extension.py:34: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../install_isolated/rosidl_cli/lib/python3.10/site-packages/rosidl_cli/command/generate/api.py:96: in generate return [extensions[0].generate( ../../install_isolated/rosidl_typesupport_c/local/lib/python3.10/dist-packages/rosidl_typesupport_c/cli.py:75: in generate generated_files.extend(generate_c( ../../install_isolated/rosidl_typesupport_c/local/lib/python3.10/dist-packages/rosidl_typesupport_c/__init__.py:28: in generate_c return generate_files( ../../install_isolated/rosidl_pycommon/lib/python3.10/site-packages/rosidl_pycommon/__init__.py:112: in generate_files raise(e) ../../install_isolated/rosidl_pycommon/lib/python3.10/site-packages/rosidl_pycommon/__init__.py:103: in generate_files expand_template( ../../install_isolated/rosidl_pycommon/lib/python3.10/site-packages/rosidl_pycommon/__init__.py:165: in expand_template interpreter.string(template_content, template_path, locals=data) /usr/lib/python3/dist-packages/em.py:2391: in string self.safe(scanner, True, locals) /usr/lib/python3/dist-packages/em.py:2401: in safe self.parse(scanner, locals) /usr/lib/python3/dist-packages/em.py:2421: in parse token.run(self, locals) /usr/lib/python3/dist-packages/em.py:1547: in run self.subrun(info[0][1], interpreter, locals) /usr/lib/python3/dist-packages/em.py:1631: in subrun token.run(interpreter, locals) /usr/lib/python3/dist-packages/em.py:1425: in run interpreter.execute(self.code, locals) /usr/lib/python3/dist-packages/em.py:2596: in execute _exec(statements, self.globals, locals) :2: in ??? ../../install_isolated/rosidl_pycommon/lib/python3.10/site-packages/rosidl_pycommon/__init__.py:214: in _expand_template interpreter.string(content, str(template_path), kwargs) /usr/lib/python3/dist-packages/em.py:2391: in string self.safe(scanner, True, locals) /usr/lib/python3/dist-packages/em.py:2401: in safe self.parse(scanner, locals) /usr/lib/python3/dist-packages/em.py:2421: in parse token.run(self, locals) /usr/lib/python3/dist-packages/em.py:1425: in run interpreter.execute(self.code, locals) /usr/lib/python3/dist-packages/em.py:2596: in execute _exec(statements, self.globals, locals) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > ??? E ModuleNotFoundError: No module named 'rosidl_generator_c' :2: ModuleNotFoundError ```
emersonknapp commented 1 year ago

OK - I was able to reproduce this with

touch src/ros2/rosidl_typesupport_fastrtps/COLCON_IGNORE
colcon build --packages-up-to rosidl_typesupport_cpp --packages-ignore fastcdr foonathan_memory_vendor rosbag2_converter_default_plugins --packages-ignore-regex .*connext.* .*fastrtps.*  
colcon test --packages-select rosidl_typesupport_cpp
clalancette commented 1 year ago

Fixed by #140