[ROS 2] Machine Learning Tutorial - Could not import 'rosidl_typesupport_c' for package 'turtlebot3_msgs'
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
Since Anaconda is not part of the tutorial I would suggest trying it with the standard Python interpreter instead.
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?
Thanks Dirk, for me is Ok.
Guys, delete all the content of the folder
install
and try again