Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Key topics #56

Open
manuelValch opened this issue Mar 13, 2024 · 4 comments · May be fixed by #68
Open

Support for Key topics #56

manuelValch opened this issue Mar 13, 2024 · 4 comments · May be fixed by #68

Comments

@manuelValch
Copy link

Hello,

Would like to know if keyed topics will be supported by this plotjuggler plugin ?

By that i mean in plotjuggler if the topic is keyed:
-declared in the data_type.xml, don't know if dynamic types carry this information

  • Create a new time series in plotjuggler with topic_name + key
  • Update this time series when receiving datas.

For example this Idl:

struct message1{
    @key string helloAppName
    @key unsigned long id
    unsigned long index;
    string message;
};

With a xml like this (this would require an update in the parser right ?):

<types>
    <type>
        <struct name="message1">
            <member name="AppName" type="string" isKey="true"/>
            <member name="id" type="uint32" isKey="true"/>
            <member name="index" type="uint32"/>
            <member name="message" type="string"/>
        </struct>
    </type>
</types>

Would create 1 time series per topic instance (my guess is that would be around FastDdsDataStreamer::on_topic_discovery methods).

Would be something like this:

image

Maybe it is already implemented and I missed it ?

@manuelValch
Copy link
Author

Just taking notes with where I am currently (implementation not started at all)

  • In dynamic type field key is already defined:
       <type>
            <struct name="my_keyed_struct">
                <member name="first" type="int32"/>
                <member name="second" type="int64"/>
                <member name="third" type="int32" key="true"/>
            </struct>
        </type>

Once a plotgroup is created for a keyed topic then I can dispatch (or create) the time series + its state

@EduPonz
Copy link

EduPonz commented May 6, 2024

Hi @manuelValch,

Last week we merged eProsima/Fast-DDS#4694, which fixes support for keyed topics when types are defined through the XML API. This means that you can know use XML defined types to achieve what you want.

@manuelValch
Copy link
Author

Hello,

yes saw that PR will keep going :)

manuelValch added a commit to manuelValch/fastdds-visualizer-plugin that referenced this issue May 28, 2024
If this commit is applied then TimeSeries creation post topic selection
will be moved to a new auxiliar method.
So that I can perform some changes in it to manage keyed topics.

Issue: [#eProsima#56]
Signed-off-by: Manuel Valch <manuelValch@proton.me>
manuelValch added a commit to manuelValch/fastdds-visualizer-plugin that referenced this issue May 28, 2024
If this commit is applied then TimeSeries creation post topic selection
will be moved to a new auxiliar method.
So that I can perform some changes in it to manage keyed topics.

Issue: [#eProsima#56]
Signed-off-by: Manuel Valch <manuelValch@proton.me>
manuelValch added a commit to manuelValch/fastdds-visualizer-plugin that referenced this issue Jun 15, 2024
If this commit is applied then plotJuggler groups will be used instead
of series so that if a topic is keyed then it is easy to add its
instance to the group.
Stored all groups pointer into an unordered map so that I can find back
the group based on topic names.

Issue: [eProsima#56]
Signed-off-by: Manuel Valch <manuelValch@proton.me>
manuelValch added a commit to manuelValch/fastdds-visualizer-plugin that referenced this issue Jun 15, 2024
If this commit is applied then plotJuggler groups will be used instead
of series so that if a topic is keyed then it is easy to add its
instance to the group.
Stored all groups pointer into an unordered map so that I can find back
the group based on topic names.

Note that I have used default separator "/", might be an issue if it
changes.

Issue: [eProsima#56]
Signed-off-by: Manuel Valch <manuelValch@proton.me>
manuelValch added a commit to manuelValch/fastdds-visualizer-plugin that referenced this issue Jun 18, 2024
If this commit is applied then plugin will apply a default reader QOS
for keyed topic.
This QOS have been taken from Key example from eProsima Fast-DDS repo,
might need to refine it latter.

Issue: [eProsima#56]
Signed-off-by: Manuel Valch <manuelValch@proton.me>
manuelValch added a commit to manuelValch/fastdds-visualizer-plugin that referenced this issue Aug 28, 2024
With recent version of fastDDS we can now read wml file with key, so
read this value and create group.
Plotjuggler groups are now created in FastDdsDataStreamer so that it can
latter handle them.

Issue: [eProsima#56]
Signed-off-by: Manuel Valch <manuelValch@proton.me>
manuelValch added a commit to manuelValch/fastdds-visualizer-plugin that referenced this issue Aug 29, 2024
With recent version of fastDDS we can now read wml file with key, so
read this value and create group.
Plotjuggler groups are now created in FastDdsDataStreamer so that it can
latter handle them.

Issue: [eProsima#56]
Signed-off-by: Manuel Valch <manuelValch@proton.me>
manuelValch added a commit to manuelValch/fastdds-visualizer-plugin that referenced this issue Aug 29, 2024
If this commit is applied, Participants will check if the topic is keyed
or not before Readerhandler creation.
So that we can use this information to know in which PLotJugglerGroup
received data needs to be added.

Issue: [eProsima#56]
Signed-off-by: Manuel Valch <manuelValch@proton.me>
manuelValch added a commit to manuelValch/fastdds-visualizer-plugin that referenced this issue Aug 29, 2024
If this commit is applied, Participants will check if the topic is keyed
or not before Readerhandler creation.
So that we can use this information to know in which PLotJugglerGroup
received data needs to be added.

Issue: [eProsima#56]
Signed-off-by: Manuel Valch <manuelValch@proton.me>
manuelValch added a commit to manuelValch/fastdds-visualizer-plugin that referenced this issue Sep 8, 2024
In order to be able to modify the dataReader Qos, moved its modification
(in case of a keyed topic) to Participant::create_subscription method.
Otherwise It is impossible to modify a QOS of an already created
dataReader.
Also retreive dataReader if not already created as per my understanding
for keyed topics only one reader is enougth

Issue: [eProsima#56]
Signed-off-by: Manuel Valch <manuelValch@proton.me>
@manuelValch manuelValch linked a pull request Nov 5, 2024 that will close this issue
3 tasks
@manuelValch
Copy link
Author

Hi @manuelValch,

Last week we merged eProsima/Fast-DDS#4694, which fixes support for keyed topics when types are defined through the XML API. This means that you can know use XML defined types to achieve what you want.

Hello @EduPonz, just rebased on latest plugin version, could not find anymore the API key_annotation() has it been replaced with something else, Is there any doc where I could where it went ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants