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

Errors while using multiple ROS2 systems and DDS system #72

Open
marcus89 opened this issue Apr 23, 2021 · 1 comment
Open

Errors while using multiple ROS2 systems and DDS system #72

marcus89 opened this issue Apr 23, 2021 · 1 comment
Assignees

Comments

@marcus89
Copy link

Dear All,

I'm currently using SOSS in order to connect a ROS2 domain (domain_id=1) with a pure DDS domain (domain_id=3). For this, I followed examples provided by SOSS and everything works as expected.

Now, I want to connect 2 different ROS2 domains (domain_id=1 and domain_id=2) with a pure DDS domain (domain_id=3).
This is a piece of my soss-config.yaml file :

systems:
    ros2_domain1: { type: ros2, domain: 1, node_name: "soss_ros2_d1" }
    ros2_domain2: { type: ros2, domain: 2, node_name: "soss_ros2_d2" }
    dds_system: 
      type: dds
      types-from: [ ros2_domain1, ros2_domain2]
      participant: 
        file_path: "dds.xml"
        profile_name: "soss_dds_profile"

routes:
    ros2_domain1_to_dds: { from: ros2_domain1, to: dds_system }
    ros2_domain2_to_dds: { from: ros2_domain2, to: dds_system }

    dds_to_ros2_domain1: { from: dds_system, to: ros2_domain1 }
    dds_to_ros2_domain2: { from: dds_system, to: ros2_domain2 }    

When I want to run SOSS with this yaml file, I get the following error :

[soss-ros2] Created node '/soss_ros2_d1' with Domain ID: 1
[soss-ros2] Created node '/soss_ros2_d2' with Domain ID: 2
terminate called after throwing an instance of 'YAML::InvalidNode'
  what():  invalid node; this may result from using a map iterator as a sequence iterator, or vice-versa
Abandon (core dumped)

I think this is due to type-from in my dds_system.

Could anyone give me some advice regarding this error? Could I use different systems in the same 'types-from' for DDS?

Thank you for your answers.
Best Regards,
Marius

@lauramg15
Copy link
Contributor

Good afternoon @marcus89,

This error is definitely related to the types-from tag of the YAML file. It is seems that is not working correctly with sequences. Nevertheless, your example doesn't need to inherit types from both ros2 instances as all of the have the same types. Try using just one of them.

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