Giter Club home page Giter Club logo

Comments (27)

MaxZhaloba avatar MaxZhaloba commented on July 19, 2024

I'm currently trying to pull the nav2djs module from github via npm. When I configure it in package.json, I receive the following prompt:

The authenticity of host 'github.com (192.30.253.112)' can't be established.
RSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8.
Are you sure you want to continue connecting (yes/no)? 

So, even if real user accepts it (which would make it possible to perform a man-in-the-middle attack), the CI servers will fail on timeout, so we cannot use this method. I'm looking into possible solutions.

from leobot.

MaxZhaloba avatar MaxZhaloba commented on July 19, 2024

When I switched to https, this issue went away, but then I got

npm ERR! addLocal Could not install /tmp/npm-26041-cbe729c1/git-cache-b960861e/ef7bebf8bdb1919d947afe46ab4b2fb4278039b3

This is caused by the fact that npm cannot install repositories which contain no package.json.

from leobot.

MaxZhaloba avatar MaxZhaloba commented on July 19, 2024

At the moment, all libraries are configured and loaded into browser without console errors.

from leobot.

MaxZhaloba avatar MaxZhaloba commented on July 19, 2024

Documentation on ros.org:

from leobot.

MaxZhaloba avatar MaxZhaloba commented on July 19, 2024

@LyubomyrD, I'm currently trying to configure the the map widget. It throws no errors in browser console but the area remains black. I'm thinking about the possible reasons. This widget uses such configuration by default:

Parameter Name Parameter Value Description
topic /map_metadata the map meta data topic to listen to
robot_pose /robot_pose the robot topic or TF to listen position
serverName /move_base the action server name to use for navigation
actionName move_base_msgs/MoveBaseAction the navigation action name

Can you please verify that these settings are correct?

from leobot.

MaxZhaloba avatar MaxZhaloba commented on July 19, 2024

I've found that we have a TF topic at /robot_state_publisher/tf but configuring this value doesn't seem to have any impact.

from leobot.

LyubomyrD avatar LyubomyrD commented on July 19, 2024

@MaxZhaloba,
Please use map instead of /map_metadata
You can find all other topic using the following command
rostopic list

I believe that robot pose should be in geometry_msgs, but I can't verify this right now.

from leobot.

MaxZhaloba avatar MaxZhaloba commented on July 19, 2024

Thanks, Lyubomyr. I've just had a second look and it seems that /map is a default value for topic. I tried several settings but with no luck so far.

@AndriyPt, can you please advise on this?

from leobot.

MaxZhaloba avatar MaxZhaloba commented on July 19, 2024

The docs specify that it's necessary to initialise the robot_pose_publisher node. Trying this now.

from leobot.

MaxZhaloba avatar MaxZhaloba commented on July 19, 2024

I've initialised the robot_pose_publisher in web_server package and pushed the code to git.

from leobot.

MaxZhaloba avatar MaxZhaloba commented on July 19, 2024

Aha, and we need an instance of map_server. Gmapping node should do the trick.

from leobot.

MaxZhaloba avatar MaxZhaloba commented on July 19, 2024

FWIW, running the simulation in default world, gmapping, web server and PyCharm together requires more than 3.6 Gb of RAM or a swap partition. Otherwise, the OS freezes.

from leobot.

MaxZhaloba avatar MaxZhaloba commented on July 19, 2024

In the end, this stack yet requires more than 4 GB of real RAM. Swapping takes too much time, and freezes the interface.

from leobot.

AndriyPt avatar AndriyPt commented on July 19, 2024

@MaxZhaloba for comfort development with simulation I would recommend at least 8GB (or even 16GB) of RAM. Regarding sequence of staring things:

  1. Launch simulation
  2. Launch navigation
  3. Launch web_servers

Using rostopic list you should be able to find all needed topics which should be self explanatory.

from leobot.

MaxZhaloba avatar MaxZhaloba commented on July 19, 2024

@AndriyPt, thanks for your help. I have managed to launch this configuration, however any additional program will overflow the RAM.

Still, the widget didn't display any objects and remained black. At the moment I don't have any new ideas how to troubleshoot this issue further.

I'm receiving the following output in web server console:

[INFO] [1523387851.687793, 91.500000]: Client connected.  1 clients total.
[INFO] [1523387872.787702, 102.450000]: [Client 0] Subscribed to /wheel_diff_drive_controller/cmd_vel
[INFO] [1523387872.844967, 102.460000]: Client connected.  2 clients total.
[INFO] [1523387874.130276, 103.260000]: [Client 0] Subscribed to /head_position_controller/state
[INFO] [1523387874.134174, 103.260000]: [Client 1] Subscribed to /wheel_diff_drive_controller/cmd_vel
[INFO] [1523387874.740766, 103.610000]: [Client 0] Subscribed to /map
[INFO] [1523387874.747857, 103.610000]: [Client 1] Subscribed to /head_position_controller/state
[INFO] [1523387875.316874, 103.850000]: [Client 1] Subscribed to /map
[INFO] [1523387875.583050, 103.900000]: Client disconnected. 1 clients total.
[INFO] [1523387875.816874, 104.060000]: [Client 1] Subscribed to /move_base/status
[INFO] [1523387876.205529, 104.170000]: [Client 1] Subscribed to /move_base/feedback
[INFO] [1523387876.783990, 104.370000]: [Client 1] Subscribed to /move_base/result
[INFO] [1523387877.188288, 104.630000]: [Client 1] Subscribed to /robot_pose

So, it looks like the web client (actually 2 of them as I reloaded the page) successfully connects to ROS to read the necessary topics but for some reason the widget doesn't display the map.

from leobot.

AndriyPt avatar AndriyPt commented on July 19, 2024

@MaxZhaloba it would be nice if you provide branch name in such requests :)
Also you need to upgrade your machine else each task will be hard to accomplish. Please note that we haven't yet started implementation of high level behaviour.

from leobot.

MaxZhaloba avatar MaxZhaloba commented on July 19, 2024

@AndriyPt, here you are: F#84_nav_widget

from leobot.

MaxZhaloba avatar MaxZhaloba commented on July 19, 2024

I've just run another test over remote access on a PC with 8 Gb of RAM. When I launched the headless simulation (see readme.md), navigation, web server and browser it took 3 Gb of RAM. As soon as I opened the main page, it allocated another 3 Gb of memory and the PC has frozen. I repeated this twice with Firefox and Chrome.

@SystemDiagnosticss, can you please try to run this configuration when you finish working on the joystick?

from leobot.

MaxZhaloba avatar MaxZhaloba commented on July 19, 2024

Ok, it also freezes in windowed simulation mode on this computer. I've just tried it once again.

from leobot.

AndriyPt avatar AndriyPt commented on July 19, 2024

@MaxZhaloba I have done small investigation to run the following example page https://github.com/ros-ukraine/leobot/blob/F_sample_nav_widget/leobot_web_server/web_content/sample.html on my machine.
Steps:

  1. Launched NVidia-Docker of leobot
  2. Launched Firefox on host machine
  3. roslaunch leobot_launch simulation.launch world_file:=artgallery headless:=True gui:=False
  4. roslaunch leobot_launch navigation.launch map_file:=artgallery
  5. roslaunch leobot_launch web_server.launch
  6. Open in Firefox on my host machine address http://localhost:8080/sample.html
  7. Saw the following after 1-2 minutes of waiting
    image

My machine used 12 GB of RAM at peak period and 8 GB after map appeared in the map.
So you definitely need more RAM or tune component to have lower refresh rate or implement your own component.
A lot of memory at peak point was consumed by ROS WebSocketServer.

from leobot.

MaxZhaloba avatar MaxZhaloba commented on July 19, 2024

@AndriyPt, thanks for your help. I’ll try to give it more time. Maybe it will fit into 8 Gb of RAM and swap.

from leobot.

MaxZhaloba avatar MaxZhaloba commented on July 19, 2024

Cool. I've just opened the sample.html page and gave it several minutes to intialise. The interface was almost frozen, but after some time it displayed the map. Now working on branch F#84_nav_widget.

from leobot.

MaxZhaloba avatar MaxZhaloba commented on July 19, 2024

Just an update: I've initialised the first draft version of navigation widget on index.html. I'm continuing to investigate why it didn't work at the beginning.

from leobot.

MaxZhaloba avatar MaxZhaloba commented on July 19, 2024

Ok, it turned out that I just didn't wait enough to let it initialize the map.

Here's the current progress on this task:

map

And current issues:

  1. The map is too small
  2. There's no robot on the map
  3. The map is rendened only once and not updated when the robot is moving
  4. The map is not rotating along with the robot
  5. Functionality to set the navigation goal

@AndriyPt, which of the abovementioned issues should we consider important and implement in this task?

from leobot.

AndriyPt avatar AndriyPt commented on July 19, 2024

@MaxZhaloba maybe we should implement it ourselves? How long do you think it will take you to download the map from ROS topic and scale it on HTML 5 canvas?

from leobot.

MaxZhaloba avatar MaxZhaloba commented on July 19, 2024

@AndriyPt, that's possible. I'll try to estimate the scope of work. But I'm not sure that the slowdown happens on frontend. It could be on backend. I'd like to check it before we proceed with new widget.

I'm thinking how to measure the values of CPU and RAM usage if we run the robot separately on 2 physical machines - server and client. Do you have any idea where we can get a second computer to benchmark this? Perhaps @SystemDiagnosticss could help?

from leobot.

ENGINEERDK avatar ENGINEERDK commented on July 19, 2024

@MaxZhaloba I suggest you edit your map's PGM file. these files are editable. The hight RAM requirement is due to the loading of the unnecessarily large map.

I am working on ROS2DJS WEB control, any lead???

from leobot.

Related Issues (20)

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.