Page 1 of 3 123 LastLast
Results 1 to 10 of 26

Thread: node_server example

  1. node_server example

    Hi all,

    I am trying to run the node_server example, everything looks ok. When a run node app.js a get this:

    root@hros1:~/HROS1-Framework/Linux/project/node_server/src# node app.js
    listening on port 2114
    Page 4 has no action
    successful robot init

    In the client computer a can access through the IP and port, I get 5 buttons (stand,sit, wave, turn walk on and say something), but when I click any of the buttons nothing happens

    Somebody has any idea how to run this example propertly?

  2. #2
    Join Date
    Apr 2015
    Location
    Los Angeles
    Posts
    25
    Rep Power
    7

    Re: node_server example

    I've not had any luck with the node server, but it is most likely something on my side.

    What URL did you access to see the server page?

    I will flash/reinstall mine tonight, and see if I can deploy.

  3. #3

    Re: node_server example

    the node server code as it stands is based on some old code for the HR-OS5, and is a little wonky. I've got a working example that I'll try to push this week to a separate branch for those interested in helping test and refine it

  4. #4
    Join Date
    Apr 2015
    Location
    Los Angeles
    Posts
    25
    Rep Power
    7

    Re: node_server example

    I know the node server is not complete, but I wanted to share my experience:

    Here are my results tonight:

    Fresh install of robot on Raspberry Pi.

    history:
    136 cd node_server/
    138 ls
    139 npm install
    140 ls
    141 cd src
    142 ls
    143 node app.js


    Here is the output (This looks almost identical to my experience on Edison):

    /home/pi/HROS1-Framework/Linux/project/node_server/src$ node app.js
    /home/pi/HROS1-Framework/Linux/project/node_server/node_modules/ffi/lib/dynamic_library.js:74
    throw new Error('Dynamic Linking Error: ' + err)
    ^
    Error: Dynamic Linking Error: ../api_wrapper/apiwrapper.so: cannot open shared object file: No such file or directory
    at new DynamicLibrary (/home/pi/HROS1-Framework/Linux/project/node_server/node_modules/ffi/lib/dynamic_library.js:74:11)
    at Object.Library (/home/pi/HROS1-Framework/Linux/project/node_server/node_modules/ffi/lib/library.js:45:12)
    at Object.<anonymous> (/home/pi/HROS1-Framework/Linux/project/node_server/src/app.js:62:19)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Function.Module.runMain (module.js:501:10)
    at startup (node.js:129:16)
    at node.js:814:3

  5. Re: node_server example

    Hi bg404,

    The error is because you didn't compile the api_wrapper (this step is not mentioned in the wiki).

    To compile the api_wrapper just go to the folder api_wrapper inside node_server folder and run make:

    $cd api_wrapper
    $make

    Once you have the wrapper compiled, you can run the example:

    $node app.js

    To access to your robot, you need to use the IP of him with the port 2114

    for example:

    http://192.168.1.20:2114


    @Kyle:

    I think it will be nice if you put that part in the wiki (compile wrapper and access to the folder src to run the example).

  6. Re: node_server example

    Quote Originally Posted by kgranat View Post
    the node server code as it stands is based on some old code for the HR-OS5, and is a little wonky. I've got a working example that I'll try to push this week to a separate branch for those interested in helping test and refine it

    OK, in that case I will look the code. Please let us know when you push the code.

  7. #7
    Join Date
    Apr 2015
    Location
    Los Angeles
    Posts
    25
    Rep Power
    7

    Re: node_server example

    Awesome! Now I can run the example.

    Just following instructions...

    Thanks for the help @oesile!

  8. Re: node_server example

    Hey guys, were you able to get the entire example running? I was able to get the server running but the index.html page is kaput for me too. If you look in the code, it is referencing another source file that seems to contain data on the API for the 20th Century Robot. It's not present anywhere in my code or on the GitHub though. Was anyone able to use the API to perform commands/call commands through the web page?

  9. #9
    Join Date
    Apr 2015
    Location
    Austin, Texas
    Posts
    17
    Images
    15
    Rep Power
    7

    Re: node_server example

    Hey there,

    I have been able to get it up and running, but only by writing the missing code in the app.js file. The app.js server file is incomplete, there are still pending functions that need to be written. I have been writing them, if you guys are interested I am happy to push the changes.

  10. Re: node_server example

    Quote Originally Posted by Piper View Post
    Hey guys, were you able to get the entire example running? I was able to get the server running but the index.html page is kaput for me too. If you look in the code, it is referencing another source file that seems to contain data on the API for the 20th Century Robot. It's not present anywhere in my code or on the GitHub though. Was anyone able to use the API to perform commands/call commands through the web page?
    Yes, you are right, there is missing a file, also I couldn't find the file even in the 20 century repo. That is why am waiting for Karl's example. He will push the code soon (I hope).

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •