-
Notifications
You must be signed in to change notification settings - Fork 793
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
Nodes don't reconnect to TCP discovery server [13706] #2299
Comments
Hi @JLBuenoLopez-eProsima I can still reproduce it on rolling release, here are the versions
|
Hi @amfern , First of all, ROS 2 Rolling is not using the latest version of Fast DDS. The latest release is v2.5.0 from December 2021. ROS 2 Rolling is using release v2.3.4 from August 2021. This release does not include the latest features and bug fixes. We intend to update the ROS 2 Rolling version in the coming weeks, but the process is not straight forward. That being said, I have been able to reproduce your issue with Fast DDS v2.5.0, but I've also tested that the issue is gone when using this branch. I'm attaching a Dockerfile you can use to build the latest Fast DDS on top of ROS 2 Galactic. As for the branch, we are currently working on adding some regression test and we'll issue a PR in the upcoming week, so the fix will included in Fast DDS v2.5.1. Be aware that killing the talker node will most likely leave the socket in a netstat -tac When everything is connected, it should look something like:
When you kill the talker:
As for the listener shell, it looked:
On a final comment, note that I'm using Build the Docker imagePut all the following files under a common directory, and from within said directory run: docker build -t galactic-fastdds:tcp-fix -f Dockerfile . DockerfileFROM ros:galactic-ros-base
# Needed for a dependency that forces to set timezone
ENV TZ=Europe/Madrid
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
SHELL ["/bin/bash", "-c"]
# Install ROS 2 packages
RUN apt update && apt install -y \
ros-galactic-demo-nodes-cpp \
ros-galactic-osrf-testing-tools-cpp \
ros-galactic-performance-test-fixture \
ros-galactic-test-msgs
RUN apt-get update && apt-get install --yes --no-install-recommends \
build-essential \
cmake \
git \
libasio-dev \
libssl-dev
# ROS 2 overlay: Fast DDS (and dependecies), and rmw_fastrtps_cpp
WORKDIR /overlay_ws
RUN mkdir src
COPY overlay.repos .
COPY colcon.meta .
RUN vcs import src < overlay.repos && \
source /opt/ros/galactic/setup.bash && \
colcon build --packages-up-to rmw_fastrtps_cpp && \
source install/setup.bash && \
colcon build && \
source install/setup.bash
# Set Fast DDS as ROS 2 middleware
ENV RMW_IMPLEMENTATION=rmw_fastrtps_cpp
RUN echo 'export RMW_IMPLEMENTATION=rmw_fastrtps_cpp' >> ~/.bashrc
RUN echo 'source /opt/ros/galactic/setup.bash' >> ~/.bashrc
RUN echo 'source /overlay_ws/install/local_setup.bash' >> ~/.bashrc overlay.reposrepositories:
foonathan_memory_vendor:
type: git
url: https://github.com/eProsima/foonathan_memory_vendor.git
version: v1.2.0
fastcdr:
type: git
url: https://github.com/eProsima/Fast-CDR.git
version: v1.0.23
fastrtps:
type: git
url: https://github.com/eProsima/Fast-DDS.git
version: bugfix/tcp_client_block
rmw_fastrtps:
type: git
url: https://github.com/ros2/rmw_fastrtps.git
version: galactic
rosidl_typesupport_fastrtps:
type: git
url: https://github.com/ros2/rosidl_typesupport_fastrtps.git
version: galactic colcon.meta{
"names":
{
"fastrtps":
{
"cmake-args":
[
"-DSECURITY=ON",
]
},
"rmw_fastrtps_cpp":
{
"cmake-args":
[
"-DSECURITY=ON"
]
}
}
} |
Yes!! It is fixed. It would really help if you can add this docker to source code for future reference. |
Hi @amfern , It is great to here that! I'll leave this ticket open until the proper PR is merged into master. Regarding the Dockerfile, we are planning something along those lines. Stay tuned! |
Stopping and starting the same node don't reconnect to other nodes when using TCP discovery
Expected Behavior
Nodes connect to other publishers
Current Behavior
Starting and stopping nodes will not reconnect when uding TCP discovery server
Steps to Reproduce
RMW_IMPLEMENTATION=rmw_fastrtps_dynamic_cpp FASTRTPS_DEFAULT_PROFILES_FILE=./discovery_server_tcp.xml ros2 run demo_nodes_cpp listener --ros-args -r __ns:=/aaaaaaaaa -r __node:=discovery_server
RMW_IMPLEMENTATION=rmw_fastrtps_dynamic_cpp FASTRTPS_DEFAULT_PROFILES_FILE=./discovery_client_tcp.xml ros2 run demo_nodes_cpp listener
RMW_IMPLEMENTATION=rmw_fastrtps_dynamic_cpp FASTRTPS_DEFAULT_PROFILES_FILE=./discovery_client_tcp_2.xml ros2 run demo_nodes_cpp talker
System information
Testing inside container, all nodes are running inside the same container
Linux ilya.linux 5.13.13-zen1-1-zen #1 ZEN SMP PREEMPT Thu, 26 Aug 2021 19:14:35 +0000 x86_64 GNU/Linux
Additional context
video recording of the problem: https://youtu.be/NvcrguDneug
Additional resources
discovery_server_tcp.xml
discovery_client_tcp.xml
discovery_client_tcp_2.xml
The text was updated successfully, but these errors were encountered: