Remote control and autonomous action using NXT-G

Discussion specific to NXT-G, NXC, NBC, RobotC, Lejos, and more.
Post Reply
hippicurean
Posts: 19
Joined: 12 Jun 2011, 20:51

Remote control and autonomous action using NXT-G

Post by hippicurean »

Hi everyone,

I had been working for quite awhile on a project that used Matlab/Simulink and nxtOSEK, and involved quite a bit of custom hardware. It was an utter pain to get everything to work. Now that it's finished, I would like to build some simple models for a bit of fun. I have constructed a vehicle with two rear wheels driven by individual motors. It's a differentially-driven system, so steering is achieved by varying the rotational speeds of the two motors. For now, I'm using the NXT-G environment and have created a simple test program to tell the vehicle to move forward in a straight line. The ultimate objective is to make the vehicle run along a certain path. In the meantime, I've downloaded a Bluetooth remote program that allows me to control the NXT from a laptop. The purpose of the remote control is to make minor adjustments to prevent the vehicle from hitting a wall or some other object in its path. But whenever I use the remote control, the motors will stop running and won't resume until the program terminates. The NXT-G editor doesn't seem to have a block that addresses the remote control functionality. So, I'm wondering whether it possible to use a remote to temporarily intervene in the autonomous actions of a program without permanently interrupting it. I can't use Simulink for this because the add-on library module (VU-LRT) doesn't have a Bluetooth remote control block. Besides, I don't really want to use Simulink just to program a basic task.

Suggestions, please! Thanks.

Bluetooth Remote program: http://www.norgesgade14.dk/bluetoothremote.php

Cheers
Hippie
hassenplug
Posts: 346
Joined: 27 Sep 2010, 03:05
Contact:

Re: Remote control and autonomous action using NXT-G

Post by hassenplug »

That's not going to work. It's kind of like trying to watch two TV shows on one TV. Most TVs are only designed to watch one at a time. If the TV can be programmed to automatically turn on (and go to a channel), it simply doesn't know when you've changed to another channel, so it won't try to go back to the first one.

So, you can either control the motors via the program OR by remote. Not both.

One option is to have a bluetooth program that simply sends messages (not motor commands) to the robot. Then, the robot program could watch for the messages, and adjust as needed.

Steve
---> Link to lots of MINDSTORMS stuff under my picture --->
hippicurean
Posts: 19
Joined: 12 Jun 2011, 20:51

Re: Remote control and autonomous action using NXT-G

Post by hippicurean »

hassenplug wrote:t simply doesn't know when you've changed to another channel, so it won't try to go back to the first one.

Thanks, Steve. It's what I thought. That's why I mentioned previously that I tried to look for a block that addresses the remote functionality but couldn't find one. Since the remote program uses Bluetooth, I was hoping to place a custom block (if someone has made one) within an NXT-G program to detect the signal. If it were possible, one could use a loop to constantly poll for Bluetooth signals, and default to the regular commands within the program when none is detected. A workable plan, no?

One option is to have a bluetooth program that simply sends messages (not motor commands) to the robot. Then, the robot program could watch for the messages, and adjust as needed.

I might have to find a program that does that. After finishing my previous project, I was really hoping to do something uncomplicated that wouldn't tax my brain too much. Looks like this apparently simple task isn't all that simple after all. :-|
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests