gt-rail / nav2djs Goto Github PK
View Code? Open in Web Editor NEW2D Navigation Widget
Home Page: http://robotwebtools.org/
License: Other
2D Navigation Widget
Home Page: http://robotwebtools.org/
License: Other
After starting rosbridge server and move_base, I tried open two clients on different computers; the first client works well, map and robot pose are correctly displayed, but the 2nd client can't load the map, and the error message is below,
Error: Uncaught, unspecified 'error' event.
[Break On This Error]
..._listeners:delete this._events[e])}else if(r===t||r.listener&&r.listener===t||r....
ros_bundle.min.js (line 1)
It looks that the websocket itself does support multiple clients, as hinted by the fact that in the rosbridge console window two clients are captured and both subscribe to the same topics and service, but some conflict happens by two these two clients.
Please advise.
clark
I wonder how can I resize nav arrow with Navigator's optional?
Version 0.3.0 is one year old and a lot of improvements have been made since then.
It would be very useful to have them in the CDN.
It would be good if the canvas tells whether it is being loaded, not loaded, or in error status.
I meet a problem when I try to showing a map.
Uncaught TypeError: Cannot read property 'x' of undefined
at d.<anonymous> (nav2d.min.js:1)
at d.h.emit (roslib.min.js:1)
at d._messageCallback (roslib.min.js:2)
at d.h.emit (roslib.min.js:1)
at b (roslib.min.js:2)
at c (roslib.min.js:2)
at WebSocket.onmessage (roslib.min.js:2)
It seems it's a problem with showing current location in map : The data format mismatch.
And I have some nother questions:
nav2djs
support mutiple goal navigation? And how to do it?nav2d
calculate goal point
when I double click the map?Thanks for your time!
We are working with amcl localisation which publishes the robot's localised pose as a geometry_msgs/PoseWithCovarianceStamped
on topic /amcl_pose
. This is ignored by Navigator (which only listens for geometry_msgs/Pose
on /robot_pose
). It would be great if users could configure how the Navigator obtains a pose somehow.
Right now, nav2d requires every message received before it displays. Would be great if a PNG is given, to go ahead and load it, instead of waiting for pose, and anything else.
I am trying it with different settings, and managed to visualize the map and robot with example/nav2d.html.
In overall, it's an amazing project. Never the less, there is one issue to report.
when I test it with navigation_stage and amcl, I have to change, inside nav2d.js, the topic name for poseListener from /robot_pose into /amcl_pose, and change the variable pose into pose.pose.pose in the following lines. I guess adding that topic name as an parameter for nav2D and allow user to set it in .html should make things convenient.
I am just writing down nice features to have. I will contribute some.
Hello ,
So i am trying to use Nav2djs to send my project's robot to different locations in my 2d map using this example : http://wiki.ros.org/nav2djs/Tutorials/CreatingABasicNav2DWidget .
So far , i am able to see the robot on the map and i can send it to different goals using rviz. My problem is every time i double click in the 2d map to specify a goal to the robot in the map, i get errors in one of my launch files ( the one that launches the move_base) and the robot doesn't move.
[ERROR] [1617013162.716205551, 2844.706000000]: The goal pose passed to this planner must be in the map frame. It is instead in the /map frame.
[ INFO] [1617013162.716235264, 2844.706000000]: Nearest node index: 0
[ INFO] [1617013162.716256593, 2844.706000000]: Nearest node index: 0
[ERROR] [1617013162.716277433, 2844.706000000]: The goal pose passed to this planner must be in the map frame. It is instead in the /map frame.
[ INFO] [1617013162.716303435, 2844.706000000]: Nearest node index: 0
[ INFO] [1617013162.716324705, 2844.706000000]: Nearest node index: 0
....
I have been looking everywhere for a while now and i can't seem to find a solution.. Has anyone encountered this before ? am i missing something ?
I am working on ros melodic on Ubuntu 18.04.
Thank you !
Line 94 of the built file references this.rootObject.addChild(robotMarker);
. Should that be stage.addChild(robotMarker);
?
I'm using nav2djs since a while on my React project and I've never had issues before. From a moment to another, without editing nothing from the components where I'm using this library, the robot on the map doesn't move anymore when I click on the map to set the goal or when I move it via Rviz o via teleoperations. I'm using NAV2D.js REVISION : '0.3.0', but I tried NAV2D.js REVISION : '0.5.0' too.
I declared the nav like this
var nav = new NAV2D.OccupancyGridClientNav({ ros : rosbridgeConnection, rootObject : viewer.scene, viewer : viewer, serverName : '/move_base', //tfClient: tfClient, continuous: true, withOrientation: true });
How can I solve this problem?
If navigation goal is set in the rviz, the web interface does not show the goal.
I'm trying to use nav2d in my React JS project with ROS2. I'm unable to get nav2d work since it's CDN link isn't working. Has it been discontinued? Or is there any alternative?
I have a code in Rosjs in which I have uploaded map and position of the robot successfully. But I want to upload the image on top of the map the code is given below
<script type="text/javascript" src="http://static.robotwebtools.org/EaselJS/current/easeljs.min.js"></script> <script type="text/javascript" src="http://static.robotwebtools.org/EventEmitter2/current/eventemitter2.min.js"></script> <script type="text/javascript" src="http://static.robotwebtools.org/roslibjs/current/roslib.min.js"></script> <script type="text/javascript" src="http://static.robotwebtools.org/ros2djs/current/ros2d.min.js"></script> <script type="text/javascript" src="http://static.robotwebtools.org/nav2djs/current/nav2d.min.js"></script> <script type="text/javascript"> /** * Setup all GUI elements when the page is loaded. */ function init() { // Connect to ROS. var ros = new ROSLIB.Ros({ url : 'ws://192.168.51.186:9090' }); // Create the main viewer. var viewer = new ROS2D.Viewer({ divID : 'nav', width : 750,//750 height : 800//800 }); // Setup the nav client. var nav = NAV2D.OccupancyGridClientNav({ ros : ros, rootObject : viewer.scene, viewer : viewer, serverName : '/move_base', continuous: true }); } </script>how can I add the image on top of the map guys here the map is
// Create the main viewer.
var viewer = new ROS2D.Viewer({
divID : 'nav',
width : 750,//750
height : 800//800
});
// Setup the nav client.
var nav = NAV2D.OccupancyGridClientNav({
ros : ros,
rootObject : viewer.scene,
viewer : viewer,
serverName : '/move_base',
continuous: true
});
}
please help guys
I have created a html page with 2dnav widget and I'm not able to see anything. I thought that may be I was doing something wrong and I tested it with Pr2 example, following your tutorial, but I get the same result, a black image.
Do you have any idea, about how to proceed?
I'm trying to display a saved map on website the map is visible but when I'm trying give nav goal the goal point is visible but the robot s not moving towards goal
to calculate correct pose of robot.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.