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

Turtlebot topics not visible, only on Ubuntu 22.04 jammy #88

Open
pabsan-0 opened this issue Jul 5, 2024 · 2 comments
Open

Turtlebot topics not visible, only on Ubuntu 22.04 jammy #88

pabsan-0 opened this issue Jul 5, 2024 · 2 comments

Comments

@pabsan-0
Copy link

pabsan-0 commented Jul 5, 2024

Hi, I can't get the simulation and terminals to communicate using source run_discovery_service.sh in Ubuntu 22.04 + humble, using the jammy branch and UE5.1. After starting the simulation, I can't see topics published by the engine. Here are my outputs:

  • Editor
~/dev/turtlebot3-UE$ ./run_editor.sh 
2024-07-05 11:26:38.919 [XMLPARSER Error] Found incorrect tag 'userTransports' -> Function fillDataNode
2024-07-05 11:26:38.919 [XMLPARSER Error] Error parsing participant profile -> Function parseXMLParticipantProf
2024-07-05 11:26:38.920 [XMLPARSER Error] Error parsing profile's tag participant -> Function parseProfiles
2024-07-05 11:26:38.920 [XMLPARSER Error] Error parsing '/home/catec/dev/turtlebot3-UE/fastdds_config.xml' -> Function loadXMLFile
### Server is running ###
  Participant Type:   SERVER
  Security:           NO
  Server ID:          0
  Server GUID prefix: 44.53.00.5f.45.50.52.4f.53.49.4d.41
  Server Addresses:   UDPv4:[0.0.0.0]:11811
The daemon has been started
Increasing per-process limit of core file size to infinity.
* UE5 output * 
  • Listener
~/dev/turtlebot3-UE$ source run_discovery_service.sh 
2024-07-05 11:26:56.890 [XMLPARSER Error] Found incorrect tag 'userTransports' -> Function fillDataNode
2024-07-05 11:26:56.890 [XMLPARSER Error] Error parsing participant profile -> Function parseXMLParticipantProf
2024-07-05 11:26:56.890 [XMLPARSER Error] Error parsing profile's tag participant -> Function parseProfiles
2024-07-05 11:26:56.890 [XMLPARSER Error] Error parsing '/home/catec/dev/turtlebot3-UE/fastdds_config.xml' -> Function loadXMLFile
2024-07-05 11:26:56.892 [RTPS_PARTICIPANT Error] Discovery Server wasn't able to allocate the specified listening port. -> Function createParticipant
2024-07-05 11:26:56.893 [DOMAIN_PARTICIPANT Error] Problem creating RTPSParticipant -> Function enable
Server creation failed with the given settings. Please review locators setup.
The daemon is already running
fastdds discovery <discovery-args>

1
 fast-discovery-server tool not found!
~/dev/turtlebot3-UE$ ros2 topic list
/parameter_events
/rosout
~/dev/turtlebot3-UE$ 

This was not an issue in Ubuntu 20.04 + foxy under the devel branch. I have noticed that the fastdds_config.xml is the same for both devel and jammy. Might this be an issue with this config file, which is outdated for the more recent humble fastdds version?

As a workaround, not using the repo scripts and just running $UE5_DIR/Engine/Binaries/Linux/UnrealEditor turtlebot.uproject then sourcing ROS on the receiving terminal makes all topics visible and echoable.

@mhl787156
Copy link

Hi @pabsan-0 I'm also encountering this problem trying to test locally! Did running ./run_editor.sh false with the discovery server turned off work for you? Because it also doesnt seem to for me - I can't seem to get any ros topics in another terminal.

I was just reading and it seems there's issues running discovery server on localhost: eProsima/Fast-DDS#2031 (comment)

@mhl787156
Copy link

Hi after some testing I stumbled upon the following post which pointed towards a solution! ros2/rmw_fastrtps#676 (comment)

Essentially discovery server by default will work in the background, but all of the ros2 cli tools fail. They require the super client settings in order for the ros2 cli tools to work (https://fast-dds.docs.eprosima.com/en/latest/fastdds/ros2/discovery_server/ros2_discovery_server.html#daemon-s-related-commands). This combined with an outdated format for the fastdds config meant that you could not get a connection and instead got the Error parsing errors.

What worked for me was to update the fastdds_config.xml to the following:

<?xml version="1.0" encoding="UTF-8" ?>
<profiles xmlns="http://www.eprosima.com/XMLSchemas/fastRTPS_Profiles">
  <transport_descriptors>
    <transport_descriptor>
      <transport_id>udp_transport</transport_id>
      <type>UDPv4</type>
      <maxMessageSize>1400</maxMessageSize>
    </transport_descriptor>
  </transport_descriptors>

  <participant profile_name="participant_profile" is_default_profile="true">
    <rtps>
      <userTransports>
        <transport_id>udp_transport</transport_id>
      </userTransports>
      <useBuiltinTransports>false</useBuiltinTransports>

      <builtin>
        <discovery_config>
          <discoveryProtocol>SUPER_CLIENT</discoveryProtocol>
          <discoveryServersList>
            <RemoteServer prefix="44.53.00.5f.45.50.52.4f.53.49.4d.41">
              <metatrafficUnicastLocatorList>
                <locator>
                  <udpv4>
                    <address>127.0.0.1</address>
                    <port>11811</port>
                  </udpv4>
                </locator>
              </metatrafficUnicastLocatorList>
            </RemoteServer>
          </discoveryServersList>
        </discovery_config>
      </builtin>
    </rtps>
  </participant>
</profiles>

The docs mention that the RemoteServer should be set to whatever the output of fastdds discovery -i 0 is.

Then additionally you should add the following to the bottom of fastdds_setup.sh

# Restart the daemon to setup the super client config
echo "Restarting ROS2 Daemon For New FASTRTPS Settings" 
ros2 daemon stop
ros2 daemon start

Which restarts the ros2 daemon with the super client enabled automatically!

Hopefully this works for you!

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

2 participants