From 33942fc9acc30ec964cc376c60fb4f5fb06423eb Mon Sep 17 00:00:00 2001 From: stmoon Date: Wed, 15 Jul 2020 23:27:42 +0900 Subject: [PATCH] fix the fastrtps version problem in case of v1.10.0 --- msg/templates/urtps/Publisher.cpp.em | 4 ++-- msg/templates/urtps/Subscriber.cpp.em | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/msg/templates/urtps/Publisher.cpp.em b/msg/templates/urtps/Publisher.cpp.em index ff862d409d4d..b1bc7f482e04 100644 --- a/msg/templates/urtps/Publisher.cpp.em +++ b/msg/templates/urtps/Publisher.cpp.em @@ -90,12 +90,12 @@ bool @(topic)_Publisher::init() { // Create RTPSParticipant ParticipantAttributes PParam; -@[if version.parse(fastrtps_version[:3]) < version.parse('2.0')]@ +@[if version.parse(fastrtps_version) < version.parse('2.0')]@ PParam.rtps.builtin.domainId = 0; @[else]@ PParam.domainId = 0; @[end if]@ -@[if version.parse(fastrtps_version[:3]) <= version.parse('1.8')]@ +@[if version.parse(fastrtps_version) <= version.parse('1.8')]@ PParam.rtps.builtin.leaseDuration = c_TimeInfinite; @[else]@ PParam.rtps.builtin.discovery_config.leaseDuration = c_TimeInfinite; diff --git a/msg/templates/urtps/Subscriber.cpp.em b/msg/templates/urtps/Subscriber.cpp.em index 8a5d17c8d960..cb2e31ca35fc 100644 --- a/msg/templates/urtps/Subscriber.cpp.em +++ b/msg/templates/urtps/Subscriber.cpp.em @@ -90,12 +90,12 @@ bool @(topic)_Subscriber::init(uint8_t topic_ID, std::condition_variable* t_send // Create RTPSParticipant ParticipantAttributes PParam; -@[if version.parse(fastrtps_version[:3]) < version.parse('2.0')]@ +@[if version.parse(fastrtps_version) < version.parse('2.0')]@ PParam.rtps.builtin.domainId = 0; @[else]@ PParam.domainId = 0; @[end if]@ -@[if version.parse(fastrtps_version[:3]) <= version.parse('1.8')]@ +@[if version.parse(fastrtps_version) <= version.parse('1.8')]@ PParam.rtps.builtin.leaseDuration = c_TimeInfinite; @[else]@ PParam.rtps.builtin.discovery_config.leaseDuration = c_TimeInfinite;