ros2/ros1_bridge

ValueError: Expected the full name of a message, got 'std_msgs/msg/String'

Void12987 opened this issue · 1 comments

Bug report

Required Info:

  • Operating System:
    • Ubuntu 20.04
  • Installation type:
    • binaries for noetic and foxy
  • Version or commit hash:
    • N/A
  • DDS implementation:
    • N/A

Steps to reproduce issue

  1. In ROS1, launch rosserial_python's serial_node.py.
  2. An Arduino Uno is publishing a string.
  3. ros2 run ros1_bridge dynamic_bridge --bridge-all-topics
  4. ros2 topic echo /test

Expected behavior

to see the message

Actual behavior

nathan@nathan-vm-20-04:~/catkin_ws$ ros2 topic echo /test
Traceback (most recent call last):
  File "/opt/ros/foxy/bin/ros2", line 11, in <module>
    load_entry_point('ros2cli==0.9.9', 'console_scripts', 'ros2')()
  File "/opt/ros/foxy/lib/python3.8/site-packages/ros2cli/cli.py", line 67, in main
    rc = extension.main(parser=parser, args=args)
  File "/opt/ros/foxy/lib/python3.8/site-packages/ros2topic/command/topic.py", line 41, in main
    return extension.main(args=args)
  File "/opt/ros/foxy/lib/python3.8/site-packages/ros2topic/verb/echo.py", line 81, in main
    return main(args)
  File "/opt/ros/foxy/lib/python3.8/site-packages/ros2topic/verb/echo.py", line 95, in main
    message_type = get_msg_class(node, args.topic_name, include_hidden_topics=True)
  File "/opt/ros/foxy/lib/python3.8/site-packages/ros2topic/api/__init__.py", line 88, in get_msg_class
    msg_class = _get_msg_class(node, topic, include_hidden_topics)
  File "/opt/ros/foxy/lib/python3.8/site-packages/ros2topic/api/__init__.py", line 133, in _get_msg_class
    return get_message(message_type)
  File "/opt/ros/foxy/lib/python3.8/site-packages/rosidl_runtime_py/utilities.py", line 30, in get_message
    raise ValueError("Expected the full name of a message, got '{}'".format(identifier))
ValueError: Expected the full name of a message, got 'std_msgs/msg/String'

Additional information

rostopic echo /test works. I think this may have something to do with serialization.

I figured out the issue was for my ROS2 terminals, I needed to run all .bashrc code related to ROS2 after the code for ROS1. Same for the ROS1 terminal.