Releases: husarnet/husarnet-ros2router
1.5.0
-
New default value for
ROS_LOCALHOST_ONLY
. Now it's set to1
to listen only to the DDS communication on the localhost (remember to setROS_LOCALHOST_ONLY=1
before starting your ROS 2 nodes on the localhost) -
If
ROS_LOCALHOST_ONLY=0
, a newLANParticipant
is created with the following config:
- name: LANParticipant
kind: local
domain: 0
transport: udp
ignore-participant-flags: filter_different_and_same_process
- Both when the value of the
ROS_LOCALHOST_ONLY
env is0
or1
, deppending on theROS_DISTRO
env the following participant is created:
- ROS 2 Humble (default):
- name: LocalUdpParticipant
kind: local
domain: 0
transport: udp
ignore-participant-flags: no_filter
whitelist-interfaces:
- 127.0.0.1
- ROS 2 Iron:
- name: LocalUdpParticipant
kind: local
domain: 0
transport: udp
ignore-participant-flags: filter_different_host
whitelist-interfaces: []
- Removed
EXIT_IF_HUSARNET_NOT_AVAILABLE
env. IfUSE_HUSARNET=TRUE
(default value) and Husarnet Daemon is not reachable, the conainer exits with the error code.
1.4.0
1. New Envs
Removed the following envs:
ROS_DOMAIN_ID
ROS_DOMAIN_ID_2
WHITELIST_INTERFACES
LOCAL_TRANSPORT
And introduced the LOCAL_PARTICIPANT
env that gives more flexibility in setting up the localhost setup. Eg.
services:
ros2router:
image: husarnet/ros2router:1.4.0
network_mode: host
ipc: shareable
volumes:
- ./filter.yaml:/filter.yaml
environment:
- DISCOVERY_SERVER_ID=2
- DISCOVERY_SERVER_LISTENING_PORT=8888
- ROS_LOCALHOST_ONLY=1
- ROS_DISTRO
- |
LOCAL_PARTICIPANT=
- name: LocalParticipant
kind: local
domain: 0
transport: udp
- name: LocalDockerParticipant
kind: local
domain: 123
transport: shm
2. New Default Local Participants
The default local participants (non-husarnet) are defined like that:
- name: LocalParticipant
kind: local
domain: 0
transport: udp
- name: LocalDockerParticipant
kind: local
domain: 0
transport: shm
There is a separate default participant for ROS 2 nodes running on host (LocalParticipant
) and for ROS 2 nodes running inside the Docker container (LocalDockerParticipant
).
3. New Logic Behind the ROS_LOCALHOST_ONLY
Env
The ROS_LOCALHOST_ONLY=1
setup modifies the LocalParticipant
setup as follows:
- for
ROS 2 Humble
:
- name: LocalParticipant
kind: local
domain: 0
transport: udp
ignore-participant-flags: "no_filter"
whitelist-interfaces: "127.0.0.1"
- name: LocalDockerParticipant
kind: local
domain: 0
transport: shm
- for
ROS 2 Iron
:
- name: LocalParticipant
kind: local
domain: 0
transport: udp
ignore-participant-flags: "filter_different_host"
whitelist-interfaces: []
- name: LocalDockerParticipant
kind: local
domain: 0
transport: shm
3. New Default LAN Setup for USE_HUSARNET=FALSE
Env
- name: RemoteParticipant
kind: local
domain: 0
transport: udp
ignore-participant-flags: filter_different_and_same_process # Discovery traffic from own host is discarded
1.3.0
Generating superclient.xml
config file that can be used (on the host OS level) instead of using husarnet/ros2router
Docker image on the DDS Discovery Server client side.
Example:
docker run --rm -it \
--network host \
-e ROS_DISCOVERY_SERVER=rosbot2r:11811 \
-e DISCOVERY_SERVER_ID=10 \
husarnet/ros2router:1.3.0 \
cat /var/tmp/superclient.xml | awk '/\?xml version="1.0" encoding="UTF-8" \?/,0' > superclient.xml
export FASTRTPS_DEFAULT_PROFILES_FILE=$(pwd)/superclient.xml
1.2.0
1.1.0
Allowing running ros2router
Docker image as non-root user, eg.:
ros2router:
image: husarnet/ros2router:1.1.0
network_mode: host
ipc: host
pid: host
user: ${DOCKER_UID:-1000}:${DOCKER_GID:-1000}
volumes:
- /etc/group:/etc/group:ro
- /etc/passwd:/etc/passwd:ro
- /etc/shadow:/etc/shadow:ro
- /home/husarion/.ros:/home/husarion/.ros
volumes:
- ./filter.yaml:/filter.yaml
environment:
- WHITELIST_INTERFACES="127.0.0.1" # if setting this param, you need to set "ROS_LOCALHOST_ONLY=1" on this host
- LISTENING_PORT=11888
- ID=0
- ROS_DOMAIN_ID