RoboticsCape Library & Node.JS

134 views
Skip to first unread message

Andrew DeVries

unread,
May 5, 2017, 3:10:48 PM5/5/17
to BeagleBoard

I seem to have all the kinks worked out of my fork of the RoboticsCape library for the BBWG now need to start on Node.js interface, but before I do wanted to know if you knew of any existing efforts either of you knew off.

 

Is this the only node.js project using LibRoboticsCape at the moment.  http://www.github.com/jadonk/node-roboticscape

 

 

Current plan is to expose RoboticCape interfaces to Node.js then add enhancements starting with drive forward, backwards inches, turn degrees using just encoders. 


This has worked well for us when developing lower stuff for our First Robotics student on the android platform and if exposed in Node.js should work well in NodeRed, Bone101, etc.

 

Was thinking something like

 

var robot = new Robot( {“leftdrive”: {“motor”:0, “encoder”:0, “inchesPerTick”:”.25”, “degressPerTick”:”2.13”}, “rightdrive”: {“motor”:1, “encoder”:1, “inchesPerTick”:”.25”, “degressPerTick”:”2.13”} );

 

robot.drive(24); // Drive Forward 24 inches;

 

while (!robot.driveIsComplete){

                robot.toggleled();

}

 

//Or using Promise

 

robot.drive(-24).then(function(){   // Drive Backwards 24 inches; use Promise

                robot.turn(90).then(function(){

                                robot.stop();

}

}

 


William Hermans

unread,
May 5, 2017, 7:39:14 PM5/5/17
to beagl...@googlegroups.com
Well, specific to the beaglebone blue or Robotics cape ? I do not know of anything personally. But , I wrote this: https://github.com/wphermans/Bonejs.

Basically, I wrote this because I wanted to have something I knew how it worked, was simple, very maintainable, and did not rely on npm at all. Just drop what you need into an existing project, "require" the necessary file(s), and be on your way. Really though, it's an example project demonstrating how easy it can be to wrap additional functionality, into Nodejs. Geared towards embedded projects of course, but it does not have to be.

I've used this myself for a web based application that shows the beaglebone's PMIC register states. In real time of course. You click on a link for a specific register, and the information is relayed back to the browser very fast. Link: https://github.com/wphermans/Beaglebone-Web-PMIC-Register-Viewer

Even though I do not have an license agreement, the code is available to use, however they want. As such there is also no warranty, implied or otherwise, Basically you break it, it's yours, and you "bought it" ;) You're welcome to use it, modify it, use it as an example, or whatever. Just keep in mind the code is meant to be simple, without much other than intended functionality built in. But it should be very easily extensible,

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/f1907a02-cd89-40a2-b6bf-fe85328ed225%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Andrew DeVries

unread,
May 10, 2017, 11:22:48 AM5/10/17
to BeagleBoard
Thank you for the response but I want to use the Robotics Cape Library as the base as that is the direction the community seems to be headed and as such should have the most community support.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages