Hello,
We are currently making a plugin for unreal engine 4.27 in C++ that would be able to read DDS Data, at the moment we are developping the managers to handle multiple writers on one topic.
We encountered a problem where a publisher uses rti 4.5 while we use 6.1.0 and publishes the following topic :
struct WeaponFireTopic // Used for shot creation. { unsigned long long UniqueID; //@key boolean IsRemote; long ShotID; long ShooterEntityID; string<NAME_SIZE> WeaponDescriptorName; string<NAME_SIZE> AmmunitionDescriptorName; boolean IgnoreCreationSFX; boolean IgnoreCreationSound; float CurrentTime; boolean Force; Vector3FTopic Position; Vector3FTopic LinearVelocity; Vector3FTopic LinearAcceleration; QuaternionFTopic Rotation; Vector3FTopic Spin; }
Our manager discovers each writer and spawns in the subscriber with the correct reader, but the subscriber never reads the sample, the code is :
if (reader != dds::core::null)
{
rti::sub::LoanedSamples<dds::core::xtypes::DynamicData> samples =
reader.select().instance(instance).take();for (const auto& sample : samples)
{
if (sample->info().valid())
{
for (TFieldIterator<FProperty> PropIt(TopicClass); PropIt; ++PropIt)
{
GetFromSample(*PropIt, sample, &type, Instance);
}
}
bool die = false;
/* Get the instance state */
const dds::sub::status::InstanceState& state =
sample.info().state().instance_state();
if (state == dds::sub::status::InstanceState::not_alive_disposed()) {
die = true;
}
if (state == dds::sub::status::InstanceState::not_alive_no_writers()) {
die = true;
}
if (state == dds::sub::status::InstanceState::not_alive_mask()) {
die = true;
}
if (die) {
reader = dds::core::null;
instance = dds::core::null;
GetOwner()->Destroy();
}
}
}
But when debugging the program stops at line 6 when checking if the sample is valid. The QoS is "supposed" to be matching (we're trusting our boss on that). We can read other topics with simple subscribers but when there is multiple writers and we have to use a manager it bugs out. RTI Admin Console can't read the topic as it is, but when we create our subscriber it can read the data with the topic we created.
Hello LouiisR09,
Is the ureal pluging using 4.5 or 6.1.0?
Did you check out the migration guides available here: https://community.rti.com/documentation (search for Migration guide).
Best,
Gianpiero
The publisher (another computer) uses 4.5 and we can't change that.
The plugin on the other hand uses 6.1.0
Update
So I found out that you can check RTI logs and when read, I saw a bunch of errors all pointing to my QoS profile and how it is incompatible with versions older than 5.2.
I checked out this page : https://community.rti.com/kb/what-causes-error-discovered-remote-participant
But no solution fixed the issue.
I then checked out this page : https://community.rti.com/kb/what-does-cant-reach-locator-error-message-mean
Which suggested to enable UDPv4 on my local machine but I'm not sure how.
I also tried activating Multicast but that didn't seem to work.
So I'm guessing I have to completly change my QoS but I have no idea what to.
Thank you in advance ;)
Can you provide us with your logs?
https://pastebin.com/ty1PHz1B
Here