Skip to content

Commit 17897b4

Browse files
authored
Merge pull request #25 from hillbrook/master
Remove Multicast in endpoint discovery.
2 parents 59db996 + 65abb25 commit 17897b4

File tree

4 files changed

+56
-20
lines changed

4 files changed

+56
-20
lines changed

ros/ros_comm/roscpp/src/libros/discovery/participant.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,8 @@ bool Participant::init(user_callback cb)
158158
pub_param.topic.historyQos.depth = 5000;
159159
pub_param.topic.resourceLimitsQos.max_samples = 10000;
160160

161-
pub_param.times.heartbeatPeriod.seconds = 0;
162-
pub_param.times.heartbeatPeriod.fraction = 4294967 * 500;
161+
pub_param.times.heartbeatPeriod.seconds = 2;
162+
pub_param.times.heartbeatPeriod.fraction = 0;
163163

164164
_meta_publisher = Domain::createPublisher(_participant, pub_param, &_pub_listener);
165165
if (_meta_publisher == nullptr)

ros/third_party/FastRTPS_1.4.0.patch

Lines changed: 54 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
diff -Npur -x .git a/CMakeLists.txt b/CMakeLists.txt
2-
--- a/CMakeLists.txt 2017-05-25 20:37:18.851594345 -0700
3-
+++ b/CMakeLists.txt 2017-05-25 21:31:41.247771694 -0700
2+
--- a/CMakeLists.txt 2017-09-14 15:59:29.813198704 +0800
3+
+++ b/CMakeLists.txt 2017-09-14 16:01:09.589195047 +0800
44
@@ -175,9 +175,7 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PAT
55
# Default shared libraries
66
###############################################################################
@@ -13,8 +13,8 @@ diff -Npur -x .git a/CMakeLists.txt b/CMakeLists.txt
1313

1414
###############################################################################
1515
diff -Npur -x .git a/include/fastrtps/utils/IPFinder.h b/include/fastrtps/utils/IPFinder.h
16-
--- a/include/fastrtps/utils/IPFinder.h 2017-05-25 20:36:33.539369654 -0700
17-
+++ b/include/fastrtps/utils/IPFinder.h 2017-06-08 15:28:09.021049038 -0700
16+
--- a/include/fastrtps/utils/IPFinder.h 2017-09-14 15:55:02.933208485 +0800
17+
+++ b/include/fastrtps/utils/IPFinder.h 2017-09-14 16:01:09.693195043 +0800
1818
@@ -61,7 +61,7 @@ public:
1919
IPFinder();
2020
virtual ~IPFinder();
@@ -25,14 +25,14 @@ diff -Npur -x .git a/include/fastrtps/utils/IPFinder.h b/include/fastrtps/utils/
2525
/**
2626
* Get the IP4Adresses in all interfaces.
2727
diff -Npur -x .git a/src/cpp/rtps/builtin/discovery/endpoint/EDPSimple.cpp b/src/cpp/rtps/builtin/discovery/endpoint/EDPSimple.cpp
28-
--- a/src/cpp/rtps/builtin/discovery/endpoint/EDPSimple.cpp 2017-05-25 20:37:18.859594385 -0700
29-
+++ b/src/cpp/rtps/builtin/discovery/endpoint/EDPSimple.cpp 2017-05-25 20:56:02.109164279 -0700
28+
--- a/src/cpp/rtps/builtin/discovery/endpoint/EDPSimple.cpp 2017-09-14 15:59:29.821198703 +0800
29+
+++ b/src/cpp/rtps/builtin/discovery/endpoint/EDPSimple.cpp 2017-09-14 16:01:09.593195047 +0800
3030
@@ -129,6 +129,9 @@ bool EDPSimple::createSEDPEndpoints()
3131
watt.times.nackResponseDelay.fraction = 0;
3232
watt.times.initialHeartbeatDelay.seconds = 0;
3333
watt.times.initialHeartbeatDelay.fraction = 0;
34-
+ watt.times.heartbeatPeriod.seconds = 0;
35-
+ watt.times.heartbeatPeriod.fraction = 4294967 * 500;
34+
+ watt.times.heartbeatPeriod.seconds = 1;
35+
+ watt.times.heartbeatPeriod.fraction = 0;
3636
+
3737
if(mp_RTPSParticipant->getRTPSParticipantAttributes().throughputController.bytesPerPeriod != UINT32_MAX &&
3838
mp_RTPSParticipant->getRTPSParticipantAttributes().throughputController.periodMillisecs != 0)
@@ -41,14 +41,50 @@ diff -Npur -x .git a/src/cpp/rtps/builtin/discovery/endpoint/EDPSimple.cpp b/src
4141
watt.times.nackResponseDelay.fraction = 0;
4242
watt.times.initialHeartbeatDelay.seconds = 0;
4343
watt.times.initialHeartbeatDelay.fraction = 0;
44-
+ watt.times.heartbeatPeriod.seconds = 0;
45-
+ watt.times.heartbeatPeriod.fraction = 4294967 * 500;
44+
+ watt.times.heartbeatPeriod.seconds = 1;
45+
+ watt.times.heartbeatPeriod.fraction = 0;
4646
if(mp_RTPSParticipant->getRTPSParticipantAttributes().throughputController.bytesPerPeriod != UINT32_MAX &&
4747
mp_RTPSParticipant->getRTPSParticipantAttributes().throughputController.periodMillisecs != 0)
4848
watt.mode = ASYNCHRONOUS_WRITER;
49+
@@ -384,7 +389,7 @@ void EDPSimple::assignRemoteEndpoints(Pa
50+
watt.guid.guidPrefix = pdata->m_guid.guidPrefix;
51+
watt.guid.entityId = c_EntityId_SEDPPubWriter;
52+
watt.endpoint.unicastLocatorList = pdata->m_metatrafficUnicastLocatorList;
53+
- watt.endpoint.multicastLocatorList = pdata->m_metatrafficMulticastLocatorList;
54+
+ //watt.endpoint.multicastLocatorList = pdata->m_metatrafficMulticastLocatorList;
55+
watt.endpoint.reliabilityKind = RELIABLE;
56+
watt.endpoint.durabilityKind = TRANSIENT_LOCAL;
57+
pdata->m_builtinWriters.push_back(watt);
58+
@@ -402,7 +407,7 @@ void EDPSimple::assignRemoteEndpoints(Pa
59+
ratt.guid.guidPrefix = pdata->m_guid.guidPrefix;
60+
ratt.guid.entityId = c_EntityId_SEDPPubReader;
61+
ratt.endpoint.unicastLocatorList = pdata->m_metatrafficUnicastLocatorList;
62+
- ratt.endpoint.multicastLocatorList = pdata->m_metatrafficMulticastLocatorList;
63+
+ //ratt.endpoint.multicastLocatorList = pdata->m_metatrafficMulticastLocatorList;
64+
ratt.endpoint.durabilityKind = TRANSIENT_LOCAL;
65+
ratt.endpoint.reliabilityKind = RELIABLE;
66+
pdata->m_builtinReaders.push_back(ratt);
67+
@@ -419,7 +424,7 @@ void EDPSimple::assignRemoteEndpoints(Pa
68+
watt.guid.guidPrefix = pdata->m_guid.guidPrefix;
69+
watt.guid.entityId = c_EntityId_SEDPSubWriter;
70+
watt.endpoint.unicastLocatorList = pdata->m_metatrafficUnicastLocatorList;
71+
- watt.endpoint.multicastLocatorList = pdata->m_metatrafficMulticastLocatorList;
72+
+ //watt.endpoint.multicastLocatorList = pdata->m_metatrafficMulticastLocatorList;
73+
watt.endpoint.reliabilityKind = RELIABLE;
74+
watt.endpoint.durabilityKind = TRANSIENT_LOCAL;
75+
pdata->m_builtinWriters.push_back(watt);
76+
@@ -437,7 +442,7 @@ void EDPSimple::assignRemoteEndpoints(Pa
77+
ratt.guid.guidPrefix = pdata->m_guid.guidPrefix;
78+
ratt.guid.entityId = c_EntityId_SEDPSubReader;
79+
ratt.endpoint.unicastLocatorList = pdata->m_metatrafficUnicastLocatorList;
80+
- ratt.endpoint.multicastLocatorList = pdata->m_metatrafficMulticastLocatorList;
81+
+ //ratt.endpoint.multicastLocatorList = pdata->m_metatrafficMulticastLocatorList;
82+
ratt.endpoint.durabilityKind = TRANSIENT_LOCAL;
83+
ratt.endpoint.reliabilityKind = RELIABLE;
84+
pdata->m_builtinReaders.push_back(ratt);
4985
diff -Npur -x .git a/src/cpp/transport/UDPv4Transport.cpp b/src/cpp/transport/UDPv4Transport.cpp
50-
--- a/src/cpp/transport/UDPv4Transport.cpp 2017-05-25 20:36:33.559369753 -0700
51-
+++ b/src/cpp/transport/UDPv4Transport.cpp 2017-06-08 15:28:35.781181734 -0700
86+
--- a/src/cpp/transport/UDPv4Transport.cpp 2017-09-14 15:59:29.845198702 +0800
87+
+++ b/src/cpp/transport/UDPv4Transport.cpp 2017-09-14 16:01:09.593195047 +0800
5288
@@ -31,7 +31,7 @@ static const uint32_t maximumUDPSocketSi
5389
static const uint32_t maximumMessageSize = 65500;
5490
static const uint8_t defaultTTL = 1;
@@ -75,8 +111,8 @@ diff -Npur -x .git a/src/cpp/transport/UDPv4Transport.cpp b/src/cpp/transport/UD
75111
}
76112

77113
diff -Npur -x .git a/thirdparty/fastcdr/CMakeLists.txt b/thirdparty/fastcdr/CMakeLists.txt
78-
--- a/thirdparty/fastcdr/CMakeLists.txt 2017-05-25 20:41:04.208711831 -0700
79-
+++ b/thirdparty/fastcdr/CMakeLists.txt 2017-05-25 21:31:55.783843775 -0700
114+
--- a/thirdparty/fastcdr/CMakeLists.txt 2017-09-14 16:00:20.797196835 +0800
115+
+++ b/thirdparty/fastcdr/CMakeLists.txt 2017-09-14 16:01:09.629195045 +0800
80116
@@ -106,9 +106,7 @@ endif()
81117
# Default shared libraries
82118
###############################################################################
@@ -89,8 +125,8 @@ diff -Npur -x .git a/thirdparty/fastcdr/CMakeLists.txt b/thirdparty/fastcdr/CMak
89125

90126
###############################################################################
91127
diff -Npur -x .git a/thirdparty/fastcdr/include/fastcdr/Cdr.h b/thirdparty/fastcdr/include/fastcdr/Cdr.h
92-
--- a/thirdparty/fastcdr/include/fastcdr/Cdr.h 2017-05-25 20:41:04.244712009 -0700
93-
+++ b/thirdparty/fastcdr/include/fastcdr/Cdr.h 2017-05-25 21:10:34.305489267 -0700
128+
--- a/thirdparty/fastcdr/include/fastcdr/Cdr.h 2017-09-14 16:00:20.821196834 +0800
129+
+++ b/thirdparty/fastcdr/include/fastcdr/Cdr.h 2017-09-14 16:01:09.629195045 +0800
94130
@@ -726,6 +726,7 @@ namespace eprosima
95131
* @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
96132
*/
@@ -126,8 +162,8 @@ diff -Npur -x .git a/thirdparty/fastcdr/include/fastcdr/Cdr.h b/thirdparty/fastc
126162
#if HAVE_CXX0X
127163
/*!
128164
diff -Npur -x .git a/thirdparty/fastcdr/src/cpp/Cdr.cpp b/thirdparty/fastcdr/src/cpp/Cdr.cpp
129-
--- a/thirdparty/fastcdr/src/cpp/Cdr.cpp 2017-05-25 20:41:04.244712009 -0700
130-
+++ b/thirdparty/fastcdr/src/cpp/Cdr.cpp 2017-05-25 21:08:59.949021378 -0700
165+
--- a/thirdparty/fastcdr/src/cpp/Cdr.cpp 2017-09-14 16:00:20.821196834 +0800
166+
+++ b/thirdparty/fastcdr/src/cpp/Cdr.cpp 2017-09-14 16:01:09.629195045 +0800
131167
@@ -570,6 +570,38 @@ Cdr& Cdr::serialize(const char *string_t
132168
return *this;
133169
}
-28.8 MB
Binary file not shown.
-28.8 MB
Binary file not shown.

0 commit comments

Comments
 (0)