Coder Social home page Coder Social logo

[IDEA] - Crowd Source AI about bb8-commander HOT 3 OPEN

mintuz avatar mintuz commented on August 20, 2024
[IDEA] - Crowd Source AI

from bb8-commander.

Comments (3)

ShahNewazKhan avatar ShahNewazKhan commented on August 20, 2024

Hi @mintuz I am currently working on an idea to use a reinforcement learning algorithm ( https://github.com/karpathy/reinforcejs ) where we use the velocity, distance traveled and heading from BB8 as inputs. The output will be the actions roll forward, backwards, turn left or turn right and based on collision detection, feedback a reward to the RLA so that it can adjust to behaviors where it avoids collisions and hopefully maps out a room.

The issue I am facing is where OSX is unable to get a response back from BB8 once a command is issued:

Unhandled rejection Error: Command sync response was lost.
    at Sphero.handler (/Users/shah/projects/node/ai8/node_modules/sphero/lib/sphero.js:252:21)
From previous event:
    at Sphero.command (/Users/shah/projects/node/ai8/node_modules/sphero/lib/sphero.js:180:10)
    at Sphero.device.setRgbLed (/Users/shah/projects/node/ai8/node_modules/sphero/lib/devices/sphero.js:369:12)
    at Sphero.device.color (/Users/shah/projects/node/ai8/node_modules/sphero/lib/devices/custom.js:168:19)
    at file:///Users/shah/projects/node/ai8/js/orb.js:7:7�[0m

My current environment is:

ProductName:	Mac OS X
ProductVersion:	10.11.6
BuildVersion:	15G31

node -v
v6.9.5

npm -v 
3.10.10

system_profiler SPBluetoothDataType | sed -n "/Apple Bluetooth Software Version\:/,/Manufacturer\:/p" | tr -s "[\n]" "[ ]" | sed "s:.*Address\: ::g" | sed "s: Manufacturer\:.*::g" | grep "[[:graph:]]"

80-E6-50-1B-50-31 Bluetooth Low Energy Supported: Yes Handoff Supported: Yes Instant Hot Spot Supported: Yes

Do you have any inputs towards this?

from bb8-commander.

mintuz avatar mintuz commented on August 20, 2024

Hey this is a great idea, really look forward to see what you can achieve with it as for the issue you are seeing, I've not seen this before but can take a look for you at the weekend if you still haven't got anywhere with it by then.

My initial thoughts though may be a compatibility issue with the Sphero API and the version of node you are using as that's the only difference between your machine and mine. I am running node v4.2.4 at the moment.

It may also be to do with how you are running BB8 Commander, I haven't used it as a library in an external project for a while and it was a really basic project just to test the functionality. Maybe there's a bug in there somewhere.

I will certainly take a look at the weekend though if you haven't managed to figure it out. If you do find out if it's an issue with BB8-Commander itself please do raise a PR.

from bb8-commander.

ShahNewazKhan avatar ShahNewazKhan commented on August 20, 2024

Thanks for looking into this, I actually have not tried this with the Commander module yet, I am having issues with the vanilla SpheroJs module. I will give it a try with the Commander module and let you know how it goes.

As for the reinforcement learning portion, I believe the temporal limitations of the DQN algorithm might limit BB8 from learning to map a room as the steps taken to get a negative reward will be too far in time between positive rewards.

In any event we will have to cross that bridge when we get there!

UPDATE:

I tried the BB8 Commander CLI module and received the following error:

$bb8 power

Getting battery Info

Beep Boop!! Something went wrong !
 Error: Command sync response was lost.
    at Sphero.cb (/usr/local/lib/node_modules/bb8-commander/node_modules/sphero/lib/sphero.js:243:21)
    at ontimeout (timers.js:365:14)
    at tryOnTimeout (timers.js:237:5)
    at Timer.listOnTimeout (timers.js:207:5)

from bb8-commander.

Related Issues (18)

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.