Skip to content

Commit

Permalink
feat: Use DDS improved discovery options (#58)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tiryoh authored Sep 5, 2023
1 parent a8b1158 commit 301352c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions ros2-iron-desktop-main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,10 @@ grep -F "source /opt/ros/$CHOOSE_ROS_DISTRO/setup.bash" ~/.bashrc ||
echo "source /opt/ros/$CHOOSE_ROS_DISTRO/setup.bash" >> ~/.bashrc
grep -F "source /usr/share/colcon_argcomplete/hook/colcon-argcomplete.bash" ~/.bashrc ||
echo "source /usr/share/colcon_argcomplete/hook/colcon-argcomplete.bash" >> ~/.bashrc
grep -F "export ROS_LOCALHOST_ONLY=1" ~/.bashrc ||
echo "# export ROS_LOCALHOST_ONLY=1" >> ~/.bashrc
# ROS 2 Iron uses ROS_AUTOMATIC_DISCOVERY_RANGE instead of ROS_LOCALHOST_ONLY
# https://docs.ros.org/en/iron/Releases/Release-Iron-Irwini.html#improved-discovery-options
grep -F "export ROS_AUTOMATIC_DISCOVERY_RANGE=" ~/.bashrc ||
echo "# export ROS_AUTOMATIC_DISCOVERY_RANGE=LOCALHOST" >> ~/.bashrc

set +u

Expand Down
6 changes: 4 additions & 2 deletions ros2-iron-ros-base-main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,10 @@ grep -F "source /opt/ros/$CHOOSE_ROS_DISTRO/setup.bash" ~/.bashrc ||
echo "source /opt/ros/$CHOOSE_ROS_DISTRO/setup.bash" >> ~/.bashrc
grep -F "source /usr/share/colcon_argcomplete/hook/colcon-argcomplete.bash" ~/.bashrc ||
echo "source /usr/share/colcon_argcomplete/hook/colcon-argcomplete.bash" >> ~/.bashrc
grep -F "export ROS_LOCALHOST_ONLY=1" ~/.bashrc ||
echo "# export ROS_LOCALHOST_ONLY=1" >> ~/.bashrc
# ROS 2 Iron uses ROS_AUTOMATIC_DISCOVERY_RANGE instead of ROS_LOCALHOST_ONLY
# https://docs.ros.org/en/iron/Releases/Release-Iron-Irwini.html#improved-discovery-options
grep -F "export ROS_AUTOMATIC_DISCOVERY_RANGE=" ~/.bashrc ||
echo "# export ROS_AUTOMATIC_DISCOVERY_RANGE=LOCALHOST" >> ~/.bashrc

set +u

Expand Down

0 comments on commit 301352c

Please sign in to comment.