Code Monkey home page Code Monkey logo

nav2djs's Issues

issue in case of multi clients

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

Resize Nav Arrow

I wonder how can I resize nav arrow with Navigator's optional?

Release 0.4.0

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.

Map loading indication

It would be good if the canvas tells whether it is being loaded, not loaded, or in error status.

cannot read property 'x' of undefined

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)

image
image

It seems it's a problem with showing current location in map : The data format mismatch.

And I have some nother questions:

  1. Is nav2djs support mutiple goal navigation? And how to do it?
  2. Does the map support zooming and zomming in? If NO, how should I do it?
  3. How does nav2d calculate goal point when I double click the map?

Thanks for your time!

Extend Navigator to listen for other pose types/topics

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.

topic name for poseListener

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.

Nice things to have

I am just writing down nice features to have. I will contribute some.

  • Init pose.
  • Orientation Setter
  • Zoom-in/out. Dragging around map.

The goal pose passed to this planner must be in the map frame. It is instead in the /map frame.

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 !

Robot doesn't move anymore

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?

Trying to upload the image in Rosjs on top of the map

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>

Simple Navigation Example

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 can't visualize anything

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?

Not Compatible with ROS2 Humble ??

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.