How to enable fastdds' typelookup functionality?

asked 2021-05-05 14:47:11 -0500

fwr-ml gravatar image

Hello,

using fastdds I'm trying to put together a c++ library that listens to ros2 participants and gathers information on the topics the seen endpoints are about, groups them as topics, services, and actions, and makes them usable on demand, i.e. fetches the needed type information, puts something together employing fastdds' dynamic type builders and so on.

As I understand it fastdds' typelookup functionality should help with that, but I cannot find how to enable that for a ros2 instance.

It's the use_server value here that I'd like to set to true: https://fast-dds.docs.eprosima.com/en...

I tried to do that with a default profile xml file, but fastdds' xml parser doesn't know to handle the value. I had hoped, it just wasn't mentioned yet in their online documentation, but I looked at their source code - they don't recognise a typelookup_config element.

In c++ it's there though. That's ok code for example:

DomainParticipantQos pqos; pqos.name("DDSTest_sub"); pqos.wire_protocol().builtin.typelookup_config.use_client = true;

Since when writing ros2 node code you don't deal with the underlying dds implementation, how do you do it then? (Making changes to the nodes' code can be done.)

edit retag flag offensive close merge delete