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

Integration Service instance crashes on wan example when remap is used #115

Open
keivanh opened this issue Aug 10, 2020 · 5 comments
Open
Assignees

Comments

@keivanh
Copy link

keivanh commented Aug 10, 2020

Following wan example, I made two servers one with client talker (ros2_to_dds) and server running server listener profile (dds_to_ros2)

First issue; I used Docker file (without any change), but SOSS fails to run both profiles if "remap" key exists in the YAML files:

chatter: { type: "std_msgs/String", route: ros2_to_dds, remap: { dds: { type: "std_msgs/String", topic: HelloWorldTopicC } } }

I get this error message:

terminate called after throwing an instance of 'YAML::TypedBadConversion<std::__cxx11::basic_string<char, std::char_traits, std::allocator > >'
what(): yaml-cpp: error at line 0, column 0: bad conversion

removing "remap" key solves this problem and I get:
[soss-dds]: subscriber created. topic: chatter, type: std_msgs/String

but next problem is server does not re-publish DDS domain messages into ROS2.
When server profile runs I can see stream of packets (RTCP) is established between 2 machines. I get packets from client machine inside server Docker (SOSS instance), but from here nothing happens.

neither SOSS instance shows any incoming DDS message, nor "ros2 topic echo chatter" shows anything

here is client (talker) YAML file:

systems:
    dds:
      type: dds
      dynamic types:
        struct std_msgs__String:
          string: "data"
      participant:
        file_path: "wan_config.xml"
        profile_name: soss_profile_client
    ros2:
      type: ros2
routes:
    ros2_to_dds: { from: ros2, to: dds }
topics:
    chatter: { type: "std_msgs/String", route: ros2_to_dds }

and server (listener) YAML file:

systems:
    ros2:
      type: ros2
    dds:
      type: dds
      types-from: ros2
      dynamic types:
        struct std_msgs__String:
          string: "data"
      participant:
        file_path: "wan_config.xml"
        profile_name: soss_profile_server

routes:
    dds_to_ros2: { from: dds, to: ros2 }

topics:
    chatter: { type: "std_msgs/String", route: dds_to_ros2 }

and finally wan_config.xml:

<?xml version="1.0"?>
<dds>
<profiles>
    <transport_descriptors>
        <transport_descriptor>
            <transport_id>tcp_transport_server</transport_id>
            <type>TCPv4</type>
            <listening_ports>
                <port>5005</port>
            </listening_ports>
            <wan_addr>x.x.x.x (server public IP address)</wan_addr>
        </transport_descriptor>
    </transport_descriptors>

    <transport_descriptors>
        <transport_descriptor>
            <transport_id>tcp_transport_client</transport_id>
            <type>TCPv4</type>
        </transport_descriptor>
    </transport_descriptors>
 
    <participant profile_name="soss_profile_server">
        <rtps>
            <userTransports>
                <transport_id>tcp_transport_server</transport_id>
            </userTransports>
            <builtin>
                <leaseAnnouncement>
                    <sec>1</sec>
                </leaseAnnouncement>
            </builtin>
            <useBuiltinTransports>false</useBuiltinTransports>
        </rtps>
    </participant>

    <participant profile_name="soss_profile_client">
        <rtps>
            <userTransports>
                <transport_id>tcp_transport_client</transport_id>
            </userTransports>
            <builtin>
                <initialPeersList>
                    <locator>
                        <tcpv4>
                            <physical_port>5005</physical_port>
			    <port>5005</port>
                            <address>x.x.x.x (server public IP address)</address>
                            <wan_address>x.x.x.x (server public IP address)</wan_address>
                        </tcpv4>
                    </locator>
                </initialPeersList>
		<leaseAnnouncement>
                    <sec>1</sec>
                </leaseAnnouncement>
            </builtin>
            <useBuiltinTransports>false</useBuiltinTransports>
        </rtps>
    </participant>
</profiles>

    <log>
        <use_default>FALSE</use_default>

        <consumer>
            <class>StdoutConsumer</class>
        </consumer>
</log>
</dds>

Third problem is <discovery_config> tag, SOSS does not recognize it, I checked version numbers and it seems Docker is using latest code to compile SOSS, I am not sure what is missing there.

@RealBotics
Copy link

I think I'm having a similar issue.

@jamoralp
Copy link
Contributor

jamoralp commented Aug 24, 2020

Good morning,

Sorry for the delay, but we've been on vacation since August 7th.

I took a look at these and, apparently, my SOSS instance is running out of the box, using the provided YAML files.

The only reason for this to happen could be any of the required systemhandles failing during compile/build time. Have you checked out that soss-ros2 and soss-dds packages are properly built?

Also, please notice that downloading both soss_v2 and soss-dds repositories using the feature/xtypes-dds branch is mandatory, as specified in the tutorials: https://integration-service.docs.eprosima.com/en/latest/getting_started.html#installation

@keivanh
Copy link
Author

keivanh commented Aug 24, 2020

Hello Jose,

Thank you for response :)

I think I must clarify two important points:

1- I don't install anything manually, I just create Docker container from SOSS-DSS Docker file without any changes, I think it must has everything it needed to run examples.

2- It looks Docker container has all components, it can run wan_client_talker.yaml only if "remap" key removed from file.

Error message when "remap" is present.

terminate called after throwing an instance of 'YAML::TypedBadConversion<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >'
  what():  yaml-cpp: error at line 0, column 0: bad conversion
Aborted (core dumped)

Also, it shows an error message if <discovery_config> node be present in wan_config.xml file.

2020-08-24 11:07:31.390 [XMLPARSER Error] Invalid element found into 'builtinAttributesType'. Name: discovery_config -> Function getXMLBuiltinAttributes
2020-08-24 11:07:31.390 [XMLPARSER Error] Error parsing participant profile -> Function parseXMLParticipantProf
2020-08-24 11:07:31.390 [XMLPARSER Error] Error parsing profile's tag participant -> Function parseProfiles
[soss-dds]: 2020-08-24 11:07:31.390 [XMLPARSER Error] Error parsing 'wan_config.xml' -> Function loadXMLFile
Error loading xml file
Failed to load middlewares!

So I think either Docker file installs something wrong (or old) or "apt-get install -y libyaml-cpp-dev" install wrong version of Yaml parser, "remap" key error is outside of SOSS-DSS domain (I guess).

Let me explain my setup in details, I have 2 Docker containers running on separate machines (both has valid static IP), on one instance, I run wan_server_listener.yaml and wan_client_talker.yaml on second machine/Docker container. (modified yaml and xml file as I mentioned in the first post, without "remap" keys)

Inside talker instance, I can see SOSS detects ROS2 topic (chatter) and writes on console:

[soss-dds]: configured!
[soss-dds]: publisher created. topic: chatter, type: std_msgs/String
[soss-dds][publisher]: translate message: soss -> dds (chatter) 
[soss-dds][publisher]: translate message: soss -> dds (chatter) 
[soss-dds][publisher]: translate message: soss -> dds (chatter) 
[soss-dds][publisher]: translate message: soss -> dds (chatter) 
[soss-dds][publisher]: translate message: soss -> dds (chatter) 

On server instance, SOSS-DDS starts without problem:

[soss-dds]: configured!
[soss-dds]: subscriber created. topic: chatter, type: std_msgs/String

I can see RTCP packets reach the Docker instance (when client starts to send, I see many RTCP packets in tcpdump console in server instance), but from here it seems server can't recognize the topic and re-publish it to ROS2 domain. I guess, whole thing is because of missing "remap" key on both side.

Would you please verify same example with Docker file?

@jamoralp
Copy link
Contributor

Oh, I see. I'm afraid that Docker file is pretty much outdated and only valid for master branch. Let me check and update it accordingly. Thanks!

@keivanh
Copy link
Author

keivanh commented Sep 1, 2020

Docker file is using SOSS/OSRF source code, that was source of many problems. I have made necessary changes in Docker file and now example WAN files will parse without problem.
#114 is still there and DDS does not publish to ROS2 domain

@jamoralp jamoralp transferred this issue from eProsima/FastDDS-SH May 25, 2021
@jamoralp jamoralp changed the title SOSS instance crashes on wan example when remap is used Integration Service instance crashes on wan example when remap is used Jun 15, 2021
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

No branches or pull requests

4 participants