Code Monkey home page Code Monkey logo

Comments (15)

codebot avatar codebot commented on August 12, 2024

What OS are you using?

from rmf_demos.

youliangtan avatar youliangtan commented on August 12, 2024

@destkk Thanks for trying this out. For the web-based rmf_demo_panel, we will need an extra step to build the frontend gui (via npm). The instructions are mentioned here in the README. Else, the web gui will not be available to the user.

npm install --prefix src/rmf_demos/rmf_demo_panel/rmf_demo_panel/static/
npm run build --prefix src/rmf_demos/rmf_demo_panel/rmf_demo_panel/static/
colcon build --packages-select rmf_demo_panel

from rmf_demos.

destkk avatar destkk commented on August 12, 2024

What OS are you using?

I am using Ubuntu 20.04.

from rmf_demos.

destkk avatar destkk commented on August 12, 2024

@destkk Thanks for trying this out. For the web-based rmf_demo_panel, we will need an extra step to build the frontend gui (via npm). The instructions are mentioned here in the README. Else, the web gui will not be available to the user.

npm install --prefix src/rmf_demos/rmf_demo_panel/rmf_demo_panel/static/
npm run build --prefix src/rmf_demos/rmf_demo_panel/rmf_demo_panel/static/
colcon build --packages-select rmf_demo_panel

Hi there. Thanks for the suggested solution. I have took these extra steps and I am currently facing this issue.

sudo apt install npm
python3 -m pip install Flask flask-socketio flask-cors
cd ~/rmf_demos_ws
npm install --prefix src/rmf_demos/rmf_demo_panel/rmf_demo_panel/static/
npm run build --prefix src/rmf_demos/rmf_demo_panel/rmf_demo_panel/static/
colcon build --packages-select rmf_demo_panel

from rmf_demos.

youliangtan avatar youliangtan commented on August 12, 2024

Just some sanity check, is it possible to check if dist/app.bundle.js exists in both src/rmf_demos/rmf_demo_panel/rmf_demo_panel/static/ and install/rmf_demo_panel/lib/pythonX.X/site-packages/rmf_demo_panel/static/? These are created when you run the steps above.

from rmf_demos.

destkk avatar destkk commented on August 12, 2024

Just some sanity check, is it possible to check if dist/app.bundle.js exists in both src/rmf_demos/rmf_demo_panel/rmf_demo_panel/static/ and install/rmf_demo_panel/lib/pythonX.X/site-packages/rmf_demo_panel/rmf_demo_panel/static/? These are created when you run the steps above.

Its not in the 2 folders! The attached below is the results after keying the commands.

user:/$ cd ~/rmf_demos_ws
user:~/rmf_demos_ws$ npm install --prefix src/rmf_demos/rmf_demo_panel/rmf_demo_panel/static/
up to date in 0.437s
found 0 vulnerabilities

user:~/rmf_demos_ws$ npm run build --prefix src/rmf_demos/rmf_demo_panel/rmf_demo_panel/static/
user:~/rmf_demos_ws$ colcon build --packages-select rmf_demo_panel
Starting >>> rmf_demo_panel
Finished <<< rmf_demo_panel [0.46s]          

Summary: 1 package finished [0.64s]

from rmf_demos.

vallq avatar vallq commented on August 12, 2024

hello @destkk , could you check the following?

  1. npm version
  2. a node_modules folder is installed in static with the first npm line npm install --prefix src/rmf_demos/rmf_demo_panel/rmf_demo_panel/static/
    if no, run npm install --prefix --verbose src/rmf_demos/rmf_demo_panel/rmf_demo_panel/static/
  3. run npm cache clean

from rmf_demos.

destkk avatar destkk commented on August 12, 2024

hello @destkk , could you check the following?

1. npm version

2. a `node_modules` folder is installed in `static` with the first npm line `npm install --prefix src/rmf_demos/rmf_demo_panel/rmf_demo_panel/static/`
   if no, run `npm install --prefix --verbose src/rmf_demos/rmf_demo_panel/rmf_demo_panel/static/`

3. run `npm cache clean`

Hi there, please find the answers to your questions as it is still not solving the issue. Thank you in advance and appreciate your help. All the commands are run in ~/rmf_demos_ws

{
  npm: '6.14.10',
  ares: '1.16.1',
  brotli: '1.0.9',
  cldr: '37.0',
  http_parser: '2.9.4',
  icu: '67.1',
  llhttp: '2.1.3',
  modules: '72',
  napi: '7',
  nghttp2: '1.41.0',
  node: '12.20.1',
  openssl: '1.1.1i',
  tz: '2019c',
  unicode: '13.0',
  uv: '1.40.0',
  v8: '7.8.279.23-node.45',
  zlib: '1.2.11'
}
  1. I have run npm install --prefix --verbose src/rmf_demos/rmf_demo_panel/rmf_demo_panel/static/ and received the following errors
npm install --prefix --verbose src/rmf_demos/rmf_demo_panel/rmf_demo_panel/static/
npm WARN saveError ENOENT: no such file or directory, open '/home/user/rmf_demos_ws/--verbose/package.json'
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN enoent ENOENT: no such file or directory, open '/home/user/rmf_demos_ws/--verbose/package.json'
npm WARN --verbose No description
npm WARN --verbose No repository field.
npm WARN --verbose No README data
npm WARN --verbose No license field.
~/rmf_demos_ws$ npm cache clean
npm ERR! As of npm@5, the npm cache self-heals from corruption issues and data extracted from the cache is guaranteed to be valid. If you want to make sure everything is consistent, use 'npm cache verify' instead. On the other hand, if you're debugging an issue with the installer, you can use `npm install --cache /tmp/empty-cache` to use a temporary cache instead of nuking the actual one.
npm ERR! 
npm ERR! If you're sure you want to delete the entire cache, rerun this command with --force.


from rmf_demos.

youliangtan avatar youliangtan commented on August 12, 2024

If you follow the steps, rmf_demos pkg will be located here $RMF_WS/src/rmf/rmf_demos. Which in this case, the prefix for the aforementioned npm install and build will be incorrect.

Now can you try:

npm install --prefix src/rmf/rmf_demos/rmf_demo_panel/rmf_demo_panel/static/
npm run build --prefix src/rmf/rmf_demos/rmf_demo_panel/rmf_demo_panel/static/

If this is the case, we will also update the README respectively. Thanks

from rmf_demos.

destkk avatar destkk commented on August 12, 2024

If you follow the steps, rmf_demos pkg will be located here $RMF_WS/src/rmf/rmf_demos. Which in this case, the prefix for the aforementioned npm install and build will be incorrect.

Now can you try:

npm install --prefix src/rmf/rmf_demos/rmf_demo_panel/rmf_demo_panel/static/
npm run build --prefix src/rmf/rmf_demos/rmf_demo_panel/rmf_demo_panel/static/

If this is the case, we will also update the README respectively. Thanks

Hi, I have followed your steps and now dist/app.bundle.js exists in both src/rmf/rmf_demos/rmf_demo_panel/rmf_demo_panel/static/ and install/rmf_demo_panel/lib/pythonX.X/site-packages/rmf_demo_panel/rmf_demo_panel/static/

I am getting this error after executing firefox localhost:5000

[api_server-11] [WARN] [1610690962.845513910] [dispatcher_client]: Dispatcher node is not avail, waiting...
[api_server-11] Set Server IP to: 0.0.0.0:8080
[api_server-11] Starting Dispatcher API Server
[api_server-11]  * Serving Flask app "rmf_demo_panel.api_server" (lazy loading)
[api_server-11]  * Environment: production
[api_server-11]    WARNING: This is a development server. Do not use it in a production deployment.
[api_server-11]    Use a production WSGI server instead.
[api_server-11]  * Debug mode: off
[rviz2-7] [INFO] [1610690963.344911172] [door_panel_requester_node]: New door [coe_door] found, refreshing...
[rviz2-7] [INFO] [1610690963.378893190] [door_panel_requester_node]: New door [hardware_door] found, refreshing...
[rviz2-7] [INFO] [1610690964.144925869] [door_panel_requester_node]: New door [main_door] found, refreshing...
[api_server-11] [WARN] [1610690967.511074978] [dispatcher_client]: /get_tasks srv call failed
[gui_server-12] 127.0.0.1 - - [15/Jan/2021 14:10:03] "GET / HTTP/1.1" 200 -
[gui_server-12] 127.0.0.1 - - [15/Jan/2021 14:10:03] "GET /static/dist/app.bundle.js HTTP/1.1" 404 -
[gui_server-12] 127.0.0.1 - - [15/Jan/2021 14:10:03] "GET /static/dist/app.bundle.js HTTP/1.1" 404 -
[gui_server-12] 127.0.0.1 - - [15/Jan/2021 14:11:13] "GET / HTTP/1.1" 200 -
[gui_server-12] 127.0.0.1 - - [15/Jan/2021 14:11:13] "GET /static/dist/app.bundle.js HTTP/1.1" 404 -
[gui_server-12] 127.0.0.1 - - [15/Jan/2021 14:11:13] "GET /static/dist/app.bundle.js HTTP/1.1" 404 -
[api_server-11] [WARN] [1610691180.439360253] [dispatcher_client]: /get_tasks srv call failed

from rmf_demos.

youliangtan avatar youliangtan commented on August 12, 2024

Hi @destkk, we are not able to recreate the issue.
The static file should be availble if install/rmf_demo_panel/lib/pythonX.X/site-packages/rmf_demo_panel/static/dist/app.bundle.js exists.
Try a clean colcon and npm build again.

from rmf_demos.

destkk avatar destkk commented on August 12, 2024

Hi @destkk, we are not able to recreate the issue.
The static file should be availble if install/rmf_demo_panel/lib/pythonX.X/site-packages/rmf_demo_panel/static/dist/app.bundle.js exists.
Try a clean colcon and npm build again.

Hi there, it is not able to work at all. May I know what are the steps to uninstall/remove all the packages?

from rmf_demos.

youliangtan avatar youliangtan commented on August 12, 2024

Hi there, it is not able to work at all. May I know what are the steps to uninstall/remove all the packages?

Try rebuild the rmf_demo_panel pkg via colcon, assuming you have successfully run npm.

rm -rf install/rmf_demo_panel/ build/rmf_demo_panel/
colcon build --packages-select rmf_demo_panel
source install/setup.bash

from rmf_demos.

destkk avatar destkk commented on August 12, 2024

Hi there, it is not able to work at all. May I know what are the steps to uninstall/remove all the packages?

Try rebuild the rmf_demo_panel pkg via colcon, assuming you have successfully run npm.

rm -rf install/rmf_demo_panel/ build/rmf_demo_panel/
colcon build --packages-select rmf_demo_panel
source install/setup.bash

Hi there. Thanks for the assistance, it has solved the issues! You could update README according to the lines below,

npm install --prefix src/rmf/rmf_demos/rmf_demo_panel/rmf_demo_panel/static/
npm run build --prefix src/rmf/rmf_demos/rmf_demo_panel/rmf_demo_panel/static/

from rmf_demos.

youliangtan avatar youliangtan commented on August 12, 2024

Updated the README: #185

from rmf_demos.

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.