Code Monkey home page Code Monkey logo

naoserver's Introduction

Server application for NAO Robot

Server code for NAOController App. Uses Java sockets and multi-threading.

Description

Server application for NAO Robot V5. Server is split into two parts, BroadcastServer and NAOServer, both running on separate threads. BroadcastServer uses the connection-less DatagramSocket and waits for broadcast messages that includes a certain message. After the message is received, we construct a packet which includes this server's ip address and send it back. NAOServer uses connection-oriented TCP ServerSocket. When a client connects, we make a new thread and pass a handler to it.

We can now pass data between client and a server using the socket's input&output streams. On the server side, when data is received, we strip down the received object which contains a command and possible arguments. There is a singleton instance that controls the robot and using Java Reflection, we can call the corresponding method that correlates with the command. Every method on the singleton instance is asynchronous.

After calling the method, we send back data to the client if there is any.

Installation

requirements

More in-depth guide how to setup your NAO-Robot can be found here: link

install

  1. Clone this project
$ git clone https://github.com/juhito/NAOServer
  1. Change CWD to the cloned project.
$ cd NAOServer
  1. Compile the application and upload class files to NAO (using FTP or scp)
  2. Run the application on NAO
$ java -cp /path/to/java-naoqi-sdk-<version>-<platform>.jar:. NAOServer

License

MIT

Project status

This project isn't currently under active development.

naoserver's People

Contributors

juhito avatar

Stargazers

 avatar

Watchers

 avatar

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.