Ask Your Question
1

[ROS 2] Machine Learning Tutorial - Could not import 'rosidl_typesupport_c' for package 'turtlebot3_msgs'

asked 2020-07-04 12:00:03 -0500

EDS gravatar image

updated 2020-07-04 12:01:59 -0500

Hello, I found an issue about the tutorial (https://emanual.robotis.com/docs/en/p... ) section 24.3.1 Stage 1 (No Obstacle), the issue is when I execute the sentence:

$ ros2 run turtlebot3_dqn dqn_environment

The following sentences were executed correctly ...

$ ros2 launch turtlebot3_gazebo turtlebot3_dqn_stage1.launch.py

$ ros2 run turtlebot3_dqn dqn_gazebo 1

But the sentence:

$ ros2 run turtlebot3_dqn dqn_environment

generate the following error:

(base) eds@ubuntu:~$ ros2 run turtlebot3_dqn dqn_environment

Traceback (most recent call last): File "/opt/ros/dashing/lib/python3.6/site-packages/rosidl_generator_py/import_type_support_impl.py", line 40, in import_type_support return importlib.import_module(module_name, package=pkg_name) File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap="">", line 994, in _gcd_import File "<frozen importlib._bootstrap="">", line 971, in _find_and_load File "<frozen importlib._bootstrap="">", line 953, in _find_and_load_unlocked ModuleNotFoundError: No module named 'turtlebot3_msgs.turtlebot3_msgs_s__rosidl_typesupport_c'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/eds/turtlebot3_ws/install/turtlebot3_dqn/lib/turtlebot3_dqn/dqn_environment", line 11, in <module> load_entry_point('turtlebot3-dqn', 'console_scripts', 'dqn_environment')() File "/home/eds/turtlebot3_ws/build/turtlebot3_dqn/turtlebot3_dqn/dqn_environment/dqn_environment.py", line 250, in main dqn_environment = DQNEnvironment() File "/home/eds/turtlebot3_ws/build/turtlebot3_dqn/turtlebot3_dqn/dqn_environment/dqn_environment.py", line 92, in __init__ self.dqn_com_server = self.create_service(Dqn, 'dqn_com', self.dqn_com_callback) File "/opt/ros/dashing/lib/python3.6/site-packages/rclpy/node.py", line 1219, in create_service check_for_type_support(srv_type) File "/opt/ros/dashing/lib/python3.6/site-packages/rclpy/type_support.py", line 29, in check_for_type_support msg_type.__class__.__import_type_support__() File "/home/eds/turtlebot3_ws/install/turtlebot3_msgs/lib/python3.7/site-packages/turtlebot3_msgs/srv/_dqn.py", line 331, in __import_type_support__ module = import_type_support('turtlebot3_msgs') File "/opt/ros/dashing/lib/python3.6/site-packages/rosidl_generator_py/import_type_support_impl.py", line 42, in import_type_support raise UnsupportedTypeSupport(pkg_name) rosidl_generator_py.import_type_support_impl.UnsupportedTypeSupport: Could not import 'rosidl_typesupport_c' for package 'turtlebot3_msgs' (base) eds@ubuntu:~$

I had installed Ubuntu 18.04, Anaconda with python 3.7, ROS2, and Gazebo 9.

Can you help me please...

Thanks a lot.

Regards.

EDS

edit retag flag offensive close merge delete

Comments

1

Since Anaconda is not part of the tutorial I would suggest trying it with the standard Python interpreter instead.

Dirk Thomas gravatar image Dirk Thomas  ( 2020-07-06 12:11:51 -0500 )edit

Hello, for me the same error message is being generated when I am trying to use a custom service that was created in a C++ project in Python. Has there been any progress on this issue?

doekaschi gravatar image doekaschi  ( 2020-07-16 07:55:15 -0500 )edit
1

Thanks Dirk, for me is Ok.

EDS gravatar image EDS  ( 2020-09-19 16:46:08 -0500 )edit
1

Guys, delete all the content of the folder install and try again

Andromeda gravatar image Andromeda  ( 2021-07-20 02:52:21 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2020-07-17 01:32:44 -0500

doekaschi gravatar image

I had the same issue and did some research to fix it. For me, the problem was, that I had not declared the dependencies of the message(s) correctly when defining it in the CMakeLists.txt. For furhter info, please check out this question that solved my issue: https://answers.ros.org/question/3260...

edit flag offensive delete link more

Comments

hi, I got into the same issue as OP. As I am following the tutorial, I am not sure which message(s) are you referring. Can you give more hints on what did you do to fix the issue?

flint1025 gravatar image flint1025  ( 2020-10-26 04:11:30 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2020-07-04 12:00:03 -0500

Seen: 12,979 times

Last updated: Jul 17 '20