Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate sensor names and type, causes "failed to create topic in Cyclone DDS" #636

Open
andrewbest-tri opened this issue Aug 29, 2022 · 1 comment · May be fixed by #656
Open

Duplicate sensor names and type, causes "failed to create topic in Cyclone DDS" #636

andrewbest-tri opened this issue Aug 29, 2022 · 1 comment · May be fixed by #656

Comments

@andrewbest-tri
Copy link

When running the ROS bridge against foxy using cyclone, or galactic I suppose, I am running into a duplicate topic error.

The problem occurs when multiple sensors (or actors) try to create the same topic with a different type. I am not yet sure which sensors are creating duplicates, but we have a test that spawns one of everything and it consistently fails on sensor creation.

exception in thread Thread-1:
TraceTraceback (most recent call last):
  File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.8/threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "/[OBFUSCATED]install/carla_ros_bridge/lib/python3.8/site-packages/carla_ros_bridge/actor_factory.py", line 96, in _update_thread
    self.update_available_objects()
  File "/[OBFUSCATED]install/carla_ros_bridge/lib/python3.8/site-packages/carla_ros_bridge/actor_factory.py", line 114, in update_available_objects
    self._create_object_from_actor(carla_actor)
  File "/[OBFUSCATED]install/carla_ros_bridge/lib/python3.8/site-packages/carla_ros_bridge/actor_factory.py", line 256, in _create_object_from_actor
    obj = self._create_object(carla_actor.id, carla_actor.type_id, name,
  File "/[OBFUSCATED]install/carla_ros_bridge/lib/python3.8/site-packages/carla_ros_bridge/actor_factory.py", line 403, in _create_object
    actor = ImuSensor(uid, name, parent, spawn_pose, self.node,
  File "/[OBFUSCATED]install/carla_ros_bridge/lib/python3.8/site-packages/carla_ros_bridge/imu.py", line 52, in __init__
    self.imu_publisher = node.new_publisher(Imu, self.get_topic_prefix(), qos_profile=10)
  File "/[OBFUSCATED]install/ros_compatibility/lib/python3.8/site-packages/ros_compatibility/node.py", line 175, in new_publisher
    return self.create_publisher(
  File "/opt/ros/foxy/lib/python3.8/site-packages/rclpy/node.py", line 1144, in create_publisher
    publisher_capsule = _rclpy.rclpy_create_publisher(
_rclpy.RCLError: Failed to create publisher: failed to create topic, at /tmp/binarydeb/ros-foxy-rmw-cyclonedds-cpp-0.7.8/src/rmw_node.cpp:1872, at /tmp/binarydeb/ros-foxy-rcl-1.1.13/src/rcl/publisher.c:180

It's related to ros2/rmw_cyclonedds#111 but adding multiple types for a topic is definitely not supported.

@andrewbest-tri andrewbest-tri changed the title Failed to create topic in Cyclone DDS Duplicate sensor names and type, causes "failed to create topic in Cyclone DDS" Oct 20, 2022
@andrewbest-tri
Copy link
Author

@germanros1987 This is the issue we discussed.

Every sensor of a given type (i..e. camera) for a given actor gets the same name when

  1. passive mode is on
  2. register all sensors is on

The end result is crashes and confusion. Ideally, we'd be able to provide some naming scheme to the bridge to de-duplicate. As it stands all cameras are called /hero/front and will causes crashes in cyclone DDS. It's also confusing for us downstream as we get multiple feeds on the same topic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant