dora-rs / dora

DORA (Dataflow-Oriented Robotic Application) is middleware designed to streamline and simplify the creation of AI-based robotic applications. It offers low latency, composable, and distributed dataflow capabilities. Applications are modeled as directed graphs, also referred to as pipelines.
https://dora-rs.ai
Apache License 2.0
1.36k stars 69 forks source link

does dora node support two output topics? #435

Closed bobd988 closed 2 months ago

bobd988 commented 4 months ago

Dora latest 0.3.2 from main branch. OS: Ubuntu 20.04

There is a need to support more than one topics from a node. I tried below

auto vel_topic = node->create_topic_geometry_msgs_Twist("/turtle1", "cmd_vel", qos);
auto vel_publisher = node->create_publisher(vel_topic, qos);
// below are newly added topics
auto vel_topic2 = node->create_topic_geometry_msgs_Twist("/turtle1", "cmd_vel2", qos);
auto vel_publisher2 = node->create_publisher(vel_topic2, qos);

....
     vel_publisher->publish(twist);
     vel_publisher2->publish(twist);   // test publish as second topic

for first topic I got message ok with 'ros2 topic echo /turtle1/cmd_vel'

however for second topic when running 'ros2 topic echo /turtle1/cmd_vel2'

from pkg_resources import load_entry_point ^[[A1709653911.502436 [0] dq.builtin: data (SPDP, vendor 1.18): no/invalid payload 1709653911.502451 [0] dq.builtin: data (SPDP, vendor 1.18): no/invalid payload 1709653911.502454 [0] dq.builtin: data (SPDP, vendor 1.18): no/invalid payload

bobd988 commented 4 months ago

I have tried export RMW_IMPLEMENTATION=rmw_fastrtps_cpp and export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp, and it works. Don't know what is the root cause.

phil-opp commented 4 months ago

I just tried your example and it works for me even without RMW_IMPLEMENTATION set.

What's the content of RMW_IMPLEMENTATION for you if you don't overwrite it?