ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

kentarou's profile - activity

2021-11-05 19:50:58 -0500 marked best answer Error when Custom messages will be built

Hi, I cannot build custom messages.

Target: ROS2 foxy

Created custom messages:

By refering https://index.ros.org/doc/ros2/Tutori..., I made srv file and tried to build it.

Error messages:

I found error messages as follows:

$ colcon build --symlink-install
Starting >>> tutorial_interfaces
--- stderr: tutorial_interfaces                         
CMake Error at /opt/ros/foxy/share/rosidl_adapter/cmake/rosidl_adapt_interfaces.cmake:60 (message):
  execute_process(/home/kentarou/.pyenv/shims/python3 -m rosidl_adapter
  --package-name tutorial_interfaces --arguments-file
  /home/kentarou/program/ros2/tmp/build/tutorial_interfaces/rosidl_adapter__arguments__tutorial_interfaces.json
  --output-dir
  /home/kentarou/program/ros2/tmp/build/tutorial_interfaces/rosidl_adapter/tutorial_interfaces
  --output-file
  /home/kentarou/program/ros2/tmp/build/tutorial_interfaces/rosidl_adapter/tutorial_interfaces.idls)
  returned error code 1:

  Traceback (most recent call last):

    File "/home/kentarou/.pyenv/versions/3.5.4/lib/python3.5/runpy.py", line 183, in _run_module_as_main
      mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
    File "/home/kentarou/.pyenv/versions/3.5.4/lib/python3.5/runpy.py", line 142, in _get_module_details
      return _get_module_details(pkg_main_name, error)
    File "/home/kentarou/.pyenv/versions/3.5.4/lib/python3.5/runpy.py", line 109, in _get_module_details
      __import__(pkg_name)
    File "/opt/ros/foxy/lib/python3.8/site-packages/rosidl_adapter/__init__.py", line 32
      assert False, f"Unsupported interface type '{interface_file.suffix}'"
                                                                          ^

  SyntaxError: invalid syntax

Call Stack (most recent call first):
  /opt/ros/foxy/share/rosidl_cmake/cmake/rosidl_generate_interfaces.cmake:130 (rosidl_adapt_interfaces)
  CMakeLists.txt:25 (rosidl_generate_interfaces)


make: *** [Makefile:222: cmake_check_build_system] エラー 1 (<- sorry for japanese language, meaning error code 1)
---
Failed   <<< tutorial_interfaces [3.91s, exited with code 2]

Summary: 0 packages finished [4.06s]
  1 package failed: tutorial_interfaces
  1 package had stderr output: tutorial_interfaces
---

Question:

Does the way to build custom messages change? I could not build other project made on eloquent.

2021-11-05 03:51:01 -0500 received badge  Student (source)
2021-01-20 09:30:48 -0500 received badge  Famous Question (source)
2020-07-09 06:33:55 -0500 received badge  Notable Question (source)
2020-06-26 12:02:48 -0500 received badge  Popular Question (source)
2020-06-26 08:25:08 -0500 answered a question Error when Custom messages will be built

Hi, I fixed my problem. I installed pyenv and it caused the problem. ROS2 foxy system seems to use python 3.8.2. But p

2020-06-26 08:25:08 -0500 received badge  Rapid Responder (source)
2020-06-26 02:43:02 -0500 asked a question Error when Custom messages will be built

Error when Custom messages will be built Hi, I cannot build custom messages. Target: ROS2 foxy Created custom messages