Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Clone this wiki locally
Overview of node_server
Node.js API Server for HR-OSX Humanoid Robots
You must build the api_wrapper.so prior to running the node_server project, see api_wrapper README.
**This project does NOT work without a bit of code modification and page remapping, as it needs updating to bring it up to sync with the motion page changes we made among other things. **
This project allows the use of a Node.js API Server. This node_server project connects to the HR-OSX-Framework libraries via Linux/build/api_wrapper/api_wrapper.so The api_wrapper.so has basic high-level functions of the robot exposed to the node_server API, allowing users to send high-level commands such as "walk on/off, walk forward/back X speed, Turn left/right Y degree/sec, play action page X, etc"
It uses a socket server connection over IP to communicate with a Hello World app on a remote device (Android Tablet, etc).
Ensure these are installed via root user or sudo.
node_server dependencies & install
Dependencies: (installed via package.json file)
- node.js http://nodejs.org
- python v 2.7
Change Directory to your node_server project folder:
$ cd path/to/HROSXFramework/Linux/project/node_server
Install dependencies via npm install, using package.json file within node_server:
$ npm install
This installs socket.io, ffi, node-gyp, and grunt.
To launch the node_server app.js program:
$ node app.js
Optional: If you would like to build a minimal version of the node server, dev dependencies are required:
$ npm install --dev
Lint node.js install:
To launch the minimized node_server app.js program:
$ node node-app.min.js
node_server start on boot
HR-OS5 Humanoid Research Robot
- Use upstart to start node server
HR-OS1 Humanoid Robot
- Use init.d to start node server
Make sure the node server is running properly:
http://<ipaddress>:<port#>in the URL box
- You should see various action "pages" buttons