mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-21 04:33:10 +08:00
microRTPS: fix topic name when ROS2 is not being used
This commit is contained in:
@@ -116,7 +116,7 @@ bool @(topic)_Publisher::init()
|
||||
Wparam.topic.topicName = "rt/@(topic)_PubSubTopic";
|
||||
@[ end if]@
|
||||
@[else]@
|
||||
Wparam.topic.topicName = "@(topic)_PubSubTopic";
|
||||
Wparam.topic.topicName = "@(topic)PubSubTopic";
|
||||
@[end if]@
|
||||
mp_publisher = Domain::createPublisher(mp_participant, Wparam, static_cast<PublisherListener*>(&m_listener));
|
||||
if(mp_publisher == nullptr)
|
||||
|
||||
@@ -116,7 +116,7 @@ bool @(topic)_Subscriber::init(uint8_t topic_ID, std::condition_variable* t_send
|
||||
Rparam.topic.topicName = "rt/@(topic)_PubSubTopic";
|
||||
@[ end if]@
|
||||
@[else]@
|
||||
Rparam.topic.topicName = "@(topic)_PubSubTopic";
|
||||
Rparam.topic.topicName = "@(topic)PubSubTopic";
|
||||
@[end if]@
|
||||
mp_subscriber = Domain::createSubscriber(mp_participant, Rparam, static_cast<SubscriberListener*>(&m_listener));
|
||||
if(mp_subscriber == nullptr)
|
||||
|
||||
Reference in New Issue
Block a user