Skip to content

Commit

Permalink
[windows] Workaround for Python 2 xmlrpc performance issues. (#1872)
Browse files Browse the repository at this point in the history
* workaround for Python 2 xmlrpc performance issues.

* address the feedback.
  • Loading branch information
seanyen authored Feb 7, 2020
1 parent 2365bc7 commit aedcece
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion tools/roslaunch/env-hooks/10.roslaunch.bat
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
REM roslaunch/env-hooks/10.roslaunch.bat

:: workaround Python 2 xmlrpc performance issue
:: https://stackoverflow.com/questions/2617615/slow-python-http-server-on-localhost
:: use IP address instead to avoid unnecessary DNS lookups.
if "%ROS_MASTER_URI%" == "" (
set ROS_MASTER_URI=http://localhost:11311
set ROS_MASTER_URI=http://127.0.0.1:11311
)

:: it is discourage to set ROS_IP and ROS_HOSTNAME at the same time.
if "%ROS_IP%" == "" (
if "%ROS_HOSTNAME%" == "" (
set ROS_IP=127.0.0.1
)
)

0 comments on commit aedcece

Please sign in to comment.