Skip to content

AttributeError: type object 'type' has no attribute '_TYPE_SUPPORT' This might be a ROS 1 message type but it should be a ROS 2 message type. Make sure to source your ROS 2 workspace after your ROS 1 workspace. #8

Description

@YY-GX

Hi, I'm now using ros2 foxy. When I run the command ros2 run rosgpt rosgptparser_turtlesim, I got the following error:

Traceback (most recent call last):
  File "myfolder/rosgpt/install/rosgpt/lib/rosgpt/rosgptparser_turtlesim", line 33, in <module>
    sys.exit(load_entry_point('rosgpt==0.0.1', 'console_scripts', 'rosgptparser_turtlesim')())
  File "myfolder/rosgpt/install/rosgpt/lib/python3.8/site-packages/rosgpt/rosgptparser_turtlesim.py", line 179, in main
    node = TurtlesimController()
  File "myfolder/rosgpt/install/rosgpt/lib/python3.8/site-packages/rosgpt/rosgptparser_turtlesim.py", line 32, in __init__
    self.create_subscription(String,'/voice_cmd',self.voice_cmd_callback,10)
  File "/opt/ros/foxy/lib/python3.8/site-packages/rclpy/node.py", line 1205, in create_subscription
    check_for_type_support(msg_type)
  File "/opt/ros/foxy/lib/python3.8/site-packages/rclpy/type_support.py", line 20, in check_for_type_support
    ts = msg_type.__class__._TYPE_SUPPORT
AttributeError: type object 'type' has no attribute '_TYPE_SUPPORT' This might be a ROS 1 message type but it should be a ROS 2 message type. Make sure to source your ROS 2 workspace after your ROS 1 workspace.

Could you help check what leads to this issue? Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions