diff --git a/rwt_image_view/www/js/multi_image_viewer.js b/rwt_image_view/www/js/multi_image_viewer.js index a782bb9d..c9be2921 100644 --- a/rwt_image_view/www/js/multi_image_viewer.js +++ b/rwt_image_view/www/js/multi_image_viewer.js @@ -30,7 +30,7 @@ $(function() { var ros = new ROSLIB.Ros(); - ros.install_config_button("config-button"); + ros.install_config_button("config-button", true, 9090); ros.on("connection", function() { ros.getTopicsForType('sensor_msgs/Image', function(image_topics) { diff --git a/rwt_image_view/www/js/rwt_image_view_main.js b/rwt_image_view/www/js/rwt_image_view_main.js index 86c12a52..6c3c8664 100644 --- a/rwt_image_view/www/js/rwt_image_view_main.js +++ b/rwt_image_view/www/js/rwt_image_view_main.js @@ -30,7 +30,7 @@ $(function() { var ros = new ROSLIB.Ros(); - ros.install_config_button("config-button"); + ros.install_config_button("config-button", true, 9090); ros.on("connection", function() { ros.getTopicsForType('sensor_msgs/Image', function(image_topics) { diff --git a/rwt_utils_3rdparty/www/rwt_utils.js b/rwt_utils_3rdparty/www/rwt_utils.js index 99be0d01..5d8c89f5 100644 --- a/rwt_utils_3rdparty/www/rwt_utils.js +++ b/rwt_utils_3rdparty/www/rwt_utils.js @@ -1,4 +1,4 @@ -ROSLIB.Ros.prototype.install_config_button = function(id, auto_connect) { +ROSLIB.Ros.prototype.install_config_button = function(id, auto_connect, port=8888) { var auto_connect = typeof auto_connect !== 'undefined' ? auto_connect : true; var that = this; var parent = document.getElementById(id); @@ -52,7 +52,7 @@ ROSLIB.Ros.prototype.install_config_button = function(id, auto_connect) { input.type = "text"; input.pattern = "^wss?://[a-zA-Z0-9\-\._]+:[0-9]+/$"; input.required = true; - input.value = "ws://" + location.hostname + ":8888/"; + input.value = "ws://" + location.hostname + ":" + port + "/"; input.setAttribute("class", "form-control"); input.setAttribute("placeholder", "ROS WS Master URI"); // input.setAttribute("aria-label", "ROS WS Master URI");