Released: MindSqualls v2.0

Discussion specific to NXT-G, NXC, NBC, RobotC, Lejos, and more.
mindsqualls
Posts: 16
Joined: 25 Jul 2011, 09:38
Location: Denmark
Contact:

Released: MindSqualls v2.0

Post by mindsqualls »

I am reviving my MindSqualls project after a prolonged period of hibernation.

With MindSqualls you can control your NXT robot directly from your PC. You write your program in C# or VB.Net or any other .Net language you like. You can command motors to run and you can have sensor values returned to you program.

Controlling you NXT this way does not give you the same control as running a program directly on the NXT, but there are plenty of other advantages and the power of being able to remote control your robot is well worth it.

MindSqualls v2.0:
  • Full support for NXT 1.0 and NXT 2.0.
  • NXT 1.0 Touch and Light sensors, the NXT Ultrasonic sensor and the NXT 2.0 Color sensor.
  • HiTechnic Compass sensor, Color sensor and the Acceleration / Tilt sensor.
  • Connect to your NXT via Bluetooth or USB.
  • Low-level usage: Implements all commands from appendix 1 and 2 of the BDK.
  • High-level usage: Work with classes like the NxtBrick, NxtMotor, Nxt2ColorSensor, HiTechnicColorSensor etc.
  • Programmed in C#.
  • Can be used from any .net language.
  • Can be used with the compact framework e.g. run from a Windows Phone.
  • Extensive documentation.
You can find it here:
http://mindsqualls.net

Leg Godt,
Niels
linusa
Posts: 228
Joined: 16 Oct 2010, 11:44
Location: Aachen, Germany
Contact:

Re: Released: MindSqualls v2.0

Post by linusa »

Really cool, :like:! I think it's nice to have a feature-rich and stable remote framework for the popular and widely-used .net languages!

Since you seem to be back into development: Are you generally interested in improving the motor commands for better precision? If so, then this might be a solution for you: http://www.mindstorms.rwth-aachen.de/tr ... torControl . The nxt-python project has recently adopted it. The alternative would be to directly add support for the new APR http://nxt-firmware.ni.fr.eu.org/change ... egulation/ .

Keep on coding :-)
RWTH - Mindstorms NXT Toolbox for MATLAB
state of the art in nxt remote control programming
http://www.mindstorms.rwth-aachen.de
MotorControl now also in Python, .net, and Mathematica
mightor
Site Admin
Posts: 1079
Joined: 25 Sep 2010, 15:02
Location: Rotterdam, Netherlands
Contact:

Re: Released: MindSqualls v2.0

Post by mightor »

Oh, I'll have to download the latest version. I am using Mindsqualls in my project :)

Thank you for reviving this project.

- Xander
| My Blog: I'd Rather Be Building Robots (http://botbench.com)
| RobotC 3rd Party Driver Suite: (http://rdpartyrobotcdr.sourceforge.net)
| Some people, when confronted with a problem, think, "I know, I'll use threads,"
| and then two they hav erpoblesms. (@nedbat)
mightor
Site Admin
Posts: 1079
Joined: 25 Sep 2010, 15:02
Location: Rotterdam, Netherlands
Contact:

Re: Released: MindSqualls v2.0

Post by mightor »

I posted about it on my blog: [LINK].

- Xander
| My Blog: I'd Rather Be Building Robots (http://botbench.com)
| RobotC 3rd Party Driver Suite: (http://rdpartyrobotcdr.sourceforge.net)
| Some people, when confronted with a problem, think, "I know, I'll use threads,"
| and then two they hav erpoblesms. (@nedbat)
mindsqualls
Posts: 16
Joined: 25 Jul 2011, 09:38
Location: Denmark
Contact:

Re: Released: MindSqualls v2.0

Post by mindsqualls »

linusa wrote:Since you seem to be back into development: Are you generally interested in improving the motor commands for better precision? If so, then this might be a solution for you: http://www.mindstorms.rwth-aachen.de/tr ... torControl .
Definitely looks interesting. :)

Yes, I must confess that I find it a bit annoying that you cannot control motors with the same exactness as when you run e.g. a NXT-G program on the NXT. This is also an issue that I have received a mail or two on in the past.

It has always been my goal that my main MindSqualls library should simply be able to work with the NXT brick as-is. But I can easily imagine that I will implement it as an "add-on project". Will give me a chance to experiment a bit with those mail-boxers – something that I have not done before (since I only have one brick)

Leg Godt,
Niels
Running your NXT with .NET:
http://mindsqualls.net/
mindsqualls
Posts: 16
Joined: 25 Jul 2011, 09:38
Location: Denmark
Contact:

Re: Released: MindSqualls v2.0

Post by mindsqualls »

mightor wrote:Oh, I'll have to download the latest version. I am using Mindsqualls in my project :)
That's actually a project that I have been following with interest. So cool to be able to remote control you NXT via a Kinect. Cannot wait until they release the final SDK.

(Myself I am working on a project with doing the same from a Wii remote).

One of the really rewarding (and somewhat unexpected) aspects of making the MindSqualls library is seeing just how many widely different projects that it is being used for. :D

Leg Godt,
Niels
Running your NXT with .NET:
http://mindsqualls.net/
linusa
Posts: 228
Joined: 16 Oct 2010, 11:44
Location: Aachen, Germany
Contact:

Re: Released: MindSqualls v2.0

Post by linusa »

mindsqualls wrote: It has always been my goal that my main MindSqualls library should simply be able to work with the NXT brick as-is. But I can easily imagine that I will implement it as an "add-on project". Will give me a chance to experiment a bit with those mail-boxers – something that I have not done before (since I only have one brick)
Both downloading the MotorControl RXE file and flashing the brick with a new firmware (e.g. supporting APR) can be automated via batch files or shell scripts. If you're interested, just ask.
RWTH - Mindstorms NXT Toolbox for MATLAB
state of the art in nxt remote control programming
http://www.mindstorms.rwth-aachen.de
MotorControl now also in Python, .net, and Mathematica
mindsqualls
Posts: 16
Joined: 25 Jul 2011, 09:38
Location: Denmark
Contact:

Re: Released: MindSqualls v2.0

Post by mindsqualls »

MindSqualls v2.1 - now has full support for the MotorControl-program:

http://mindsqualls.net/MotorControl.aspx
Running your NXT with .NET:
http://mindsqualls.net/
linusa
Posts: 228
Joined: 16 Oct 2010, 11:44
Location: Aachen, Germany
Contact:

Re: Released: MindSqualls v2.0

Post by linusa »

Thanks so much for implementing.

While we're at it, another thing: Do you have the feeling that "I2C is slow", as in "the ultrasonic sensor could really be faster, especially via Bluetooth"? I'm not sure how exactly you request input data from digital sensors using direct commands, but there might be a way for you to save 1 packet on average (which could be as much as 30ms gain in performance, depending on statistics). I suggested this for nxt-python a while ago: https://code.google.com/p/nxt-python/is ... tail?id=11

Short summary: Instead of doing it like this:

Code: Select all

1. Use LSWrite to tell the sensor which I2C register you need
2. In a loop, keep polling LSGetStatus until I2C is not busy anymore (no error is detected, statusbyte == 0).
3. Use LSRead to retrieve the sensor data.
Now, maybe you've noticed, you already get a statusbyte with LSRead, too. So you can completely omit the LSGetStatus command. The optimized version looks like this:

Code: Select all

1. Use LSWrite to tell the sensor which I2C register you need
2. In a loop, keep polling LSRead until I2C is not busy anymore (no error is detected, statusbyte == 0).
3. Once the loop is done, you already have the sensor's answer (payload of last LSRead command with statusbyte == 0).
In regular cases, this can save 1 direct command out of 3. Even though in that nxt-python issue there were bugs reported, I'm sure it works this way -- we've been doing it for years and it significantly improved speed for digital sensors.

Maybe you're already doing it this way, then consider it done :-)
RWTH - Mindstorms NXT Toolbox for MATLAB
state of the art in nxt remote control programming
http://www.mindstorms.rwth-aachen.de
MotorControl now also in Python, .net, and Mathematica
mindsqualls
Posts: 16
Joined: 25 Jul 2011, 09:38
Location: Denmark
Contact:

Re: Released: MindSqualls v2.0

Post by mindsqualls »

linusa wrote:Do you have the feeling that "I2C is slow" ...
Continuing this elsewhere before we get too off-topic:
https://sourceforge.net/apps/phpbb/mind ... f=3&t=1014
Running your NXT with .NET:
http://mindsqualls.net/
Post Reply

Who is online

Users browsing this forum: Semrush [Bot] and 3 guests