Discovery fails if daemon is started as root
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 262
- Forks
- 228
- Avg merge
- 23h 15m
- Merged PRs (30d)
- 12
Description
Bug report
Required Info:
- Operating System: Ubuntu 20.04
- Installation type: official foxy docker image
- Version or commit hash:
- DDS implementation: rmw_fastrtps_cpp
- Client library (if applicable):
Steps to reproduce issue
Open two terminal sessions. In the first terminal run:
$ docker run -it --rm --name test ros:foxy
root@f536811845fe:/# apt update -y && apt upgrade -y
...
root@f536811845fe:/# useradd test -m
root@f536811845fe:/# sudo -u test bash
test@f536811845fe:/$ . /opt/ros/foxy/setup.bash
test@f536811845fe:/$ ros2 topic pub /test std_msgs/String "data: Hello"
publisher: beginning loop
publishing #1: std_msgs.msg.String(data='Hello')
...
In second terminal run:
$ docker exec -it test bash
root@f536811845fe:/# . /opt/ros/foxy/setup.bash
root@f536811845fe:/# ros2 topic list
/parameter_events
/rosout
Expected behavior
Topic /test should be visible on topic list
Actual behavior
Topic /test is not present.
Additional information
Even after stopping root-owned _ros2_daemon and starting a new one as "test" user, topics in existing nodes are not discovered.
This issue only appears when ros packages are upgraded to the latest version from apt repository.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure using the Docker and ros2 topic commands in the issue, comparing discovery when the daemon runs as root and as test. Start by tracing the ros2 daemon and topic list entry points involved in discovery; done means /test appears reliably after the daemon is started under either user following an apt upgrade.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, python
- Domain
- cli, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100