From 3e1be1f6cf0c752cb762f123451e6b4f3e84c499 Mon Sep 17 00:00:00 2001 From: Wen Da Ng <73514541+wen-da-ng@users.noreply.github.com> Date: Fri, 4 Mar 2022 10:05:45 +0800 Subject: [PATCH 1/2] Update new "Image Navigator" function name Rename the old "ImageNavigator" function to a new name based on ROS2Djs, "NavigationImage" --- src/navigator/Navigator.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/navigator/Navigator.js b/src/navigator/Navigator.js index b463554..e378bc9 100644 --- a/src/navigator/Navigator.js +++ b/src/navigator/Navigator.js @@ -114,8 +114,8 @@ NAV2D.Navigator = function(options) { // marker for the robot var robotMarker = null; - if (use_image && ROS2D.hasOwnProperty('ImageNavigator')) { - robotMarker = new ROS2D.ImageNavigator({ + if (use_image && ROS2D.hasOwnProperty('NavigationImage') ||) { + robotMarker = new ROS2D.NavigationImage({ size: 2.5, image: use_image, pulse: true From 89ae5fa583844bc5d1ecdbadceef91080389deb6 Mon Sep 17 00:00:00 2001 From: Wen Da Ng <73514541+wen-da-ng@users.noreply.github.com> Date: Fri, 4 Mar 2022 10:12:19 +0800 Subject: [PATCH 2/2] Update Navigator.js --- src/navigator/Navigator.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/navigator/Navigator.js b/src/navigator/Navigator.js index e378bc9..8db8ce0 100644 --- a/src/navigator/Navigator.js +++ b/src/navigator/Navigator.js @@ -67,8 +67,8 @@ NAV2D.Navigator = function(options) { // create a marker for the goal if (that.goalMarker === null) { - if (use_image && ROS2D.hasOwnProperty('ImageNavigator')) { - that.goalMarker = new ROS2D.ImageNavigator({ + if (use_image && ROS2D.hasOwnProperty('NavigationImage')) { + that.goalMarker = new ROS2D.NavigationImage({ size: 2.5, image: use_image, alpha: 0.7, @@ -208,8 +208,8 @@ NAV2D.Navigator = function(options) { var currentPos = stage.globalToRos(event.stageX, event.stageY); var currentPosVec3 = new ROSLIB.Vector3(currentPos); - if (use_image && ROS2D.hasOwnProperty('ImageNavigator')) { - orientationMarker = new ROS2D.ImageNavigator({ + if (use_image && ROS2D.hasOwnProperty('NavigationImage')) { + orientationMarker = new ROS2D.NavigationImage({ size: 2.5, image: use_image, alpha: 0.7,