Archive for September, 2007

Robotic bulldozer

Very cool totally autonomous robotic bulldozer. It uses the new Power Function (PF) motors, which are controlled by the NXT via infrared signals through the new HiTechnic ‘Infrared Link’ (or IR-Link) sensor. Read more about it at nxtasy.org.

Comments

NXT# and NXT.pm

Wow! two modules to control an NXT robot via bluetooth using C# and Perl. We are on the bleeding edge (drip), but things look very promising.

We may be able to use the stock mindstorms firmware and use one of these modules to control it via bluetooth. Less painful than swapping out NXT firmware with leJOS NXJ or NXC. Besides C# and Perl are easier to interface with web servers.

Comments

Bluetooth drivers for communicating with the NXT

I just finished reading an interesting article on Communicating with LEGO NXT via Bluetooth in C# written by Pierre Poliakoff. There was a very useful hint in there that may explain our difficulties with communicating with the NXT via bluetooth from Windows. Pierre states…

I confirm what many other people have reported: Bluetooth communication with Lego NXT is very sensitive to the Bluetooth drivers used. Most of the time, it is strongly recommended to NOT install — or if they are already installed, to uninstall — the drivers provided by the Bluetooth adapter manufacturer and to use the Microsoft Bluetooth default drivers instead. 

This article will help immensely if we have to resort to low level (byte-by-byte) bluetooth communication with the NXT. I’m hoping that we can find a library or high-level framework for bluetooth communication. 

Comments

Bluetooth and links

My meeting with Professor Cumaranatunge started with me showing him the grabber program I had created. My first attempt did not work, as I had position the robot crooked on the diagram. Once I straightened the robot, it worked perfectly the next three times I executed the program. Professor Cumaranatunge was real impressed with what I had done. We plan on taping the robot in action and maybe even putting it on the school website.

Next we tried to tackle the Bluetooth problem. We were able to make a wireless connection between a Mac computer and the NXT brick. On the other hand, we were not able to find the solution to the problem that I had in connecting my PC to the robot. However, we have not given up hope that we may in fact be able to get the Bluetooth connection to work.

Finally, we began searching for information about how to remotely control the robot using Bluetooth. We were able to find some information about people who have used C# and Pearl to communicate with the NXT brick using Bluetooth. Some of the material seemed very promising. Professor Cumaranatunge and I decided that we would both try and find as many websites as we could relating to how use Bluetooth to communicate with the NXT brick so as to allow us to remotely control a robot.

The following is a list of a few of the websites we have found so far:

http://nxt.ivorycity.com/

http://lego.fokke.net/

http://www.codeproject.com/useritems/nxtBluetooth.asp

http://www.impossibilities.com/blog/pivot/entry.php?id=236

http://mindstormsnxt.blogspot.com/2006/08/nxt-bluetooth-and-control.html

Although the future is filled with uncertainty, both Professor Cumaranatunge and I feel certain that we will be able to find a solution.

Comments

First Step

Getting used to the NXT programming environment. Justin programmed the ball grabber.[MEDIA=1] We are having some difficulty connecting to the NXT via bluetooth from Windows XP. However, bluetooth works like a charm from MacOS. Getting bluetooth to work is critical for the project, so we will need to do more troubleshooting.

Comments (1)

Bluetooth problems

Today I started the day off by trying to once again establish a Bluetooth connection between my computer and the NXT brick. Sadly, this did not take place. No matter what action I preformed, I just could not get the NXT device to connect with my computer. Ironically, both the NXT brick and my computer would inform me that the device was in range, but neither of the devices would allow a wireless connection to be formed. I decided to wait for my meeting on Thursday with Professor Cumaranatunge to see if we could fix the problem together.

Comments (1)

Introduction to Bluetooth

Having learned the NXT programming environment, the next step in the project was to become familiar with Bluetooth. My endeavor in to the realm of the Bluetooth world started very promising, as I was able to connect my computer to the NXT brick despite receiving a warning message that my Bluetooth radio was incompatible with the NXT. With the Bluetooth working, I decided to send a copy of the grabber program to the device. This worked flawlessly.

Since I ultimately was looking to use Bluetooth as a method to remotely control the robot, I began exploring this possibility. I started by looking in the user manual that came with the NXT software. As my query, I typed in “Bluetooth”. I soon discovered that Bluetooth can be used in one of two ways: to send a program wirelessly from your computer to the NXT brick or to send messages between other NXT bricks. Because of the limited information about Bluetooth, I decided to move my search to the internet.

In doing so, I started by looking at the Lego Mindstorms website, http://mindstorms.lego.com/. I quickly came to the conclusion that the information provided on this site was extremely limited. As such, I moved my query to the web. When searching on the web, I came across a few blogs that briefly mentioned Bluetooth. I also found some experiments that were centered on the use of Bluetooth as a means of controlling an NXT robot wirelessly. However, most of the information I found dealt with the fact the people were having trouble getting their computer and the robot to connect using Bluetooth. After enduring much frustration, I decided to turn off the robot and my computer and come back to it the next day.

Comments

Grabber Program

After charging the batteries, I decided to test my latest and greatest program. However, when I set the car on the floor, I realized I did not know how far away I had to put the grabber from the ball. This was because I no longer used the push of the touch sensor to open the grippers. Instead I had designed the robot to travel a set distance, three revolutions of the wheel, and then open the grippers. To figure out the distance I needed between the robot and the ball, I programmed the motors on the robot to make one revolution. I then measured the starting and ending point of the robot to determine the distance it traveled. Then, using the diagram supplied with the NXT kit, I measured the distance between the stand and the robot as shown in the diagram below.

As it turns out, the distance is two revolutions. Going back to the program I created, I changed the amount of revolutions for each motor to two. After making those changes I again tested the program. To my excitement, the grabber was able to grab the ball while only slightly moving the stand. Since the stand essentially stayed in place, the robot was able to drop the ball back on the stand on its return trip.

Considering where I started from, getting the “grabber program” to work was very rewarding. The time and effort put into it had lead to success. Overall, not only had I made a working program, but I had also learned how to use the NXT programming environment, the goal of this task.

 

Comments

My first programs

Today, I downloaded the NXT software and the updates to the software to my computer. Then, I briefly watched the provided tutorials to gain a general sense of how to use the NXT programming software. Once I became familiar with the programming package, the next challenge was to develop a working program. This proved challenging, yet rewarding.

Since the ball retrieval device was already built, I decided to create a program for it. My thought was to make a program in which the ball retrieval device autonomously performed the following actions: open the device’s grippers, move forward until reaching a ball on a stand, grab the ball, close the grippers, move back, move forward, place the ball back on its stand, move back, and close the grippers. All in all, I wound up making three different programs. On the third try, I finally had a working program; however, it was far from perfect. As such, I began fine tuning the properties of the sensors.

The first problem I had to address was that the motors where moving too fast. To combat this problem, I lowered the speed of each motor from 75% to 50%. The next problem I faced was a result of a design flaw in the car itself. The part of the car used to grip the ball was very flimsy and, therefore, the ball would not always remain in the grippers. As such, I added some support to make the gripping device more rigid. The next challenge I faced dealt with the stand holding the ball. To my dismay, every time the car would bump into the stand, thereby activating the touch sensor on the car, it would cause the stand to change position. To try and combat this nuisance, I tried to tape the stand to the floor. However, this did not work that well. The next thing I tried to do was to put weights on either side of stand. Again this was a failure. To fix my problem I decided to change how the car operated. Instead of using the touch sensor to activate the grippers, I had the grippers close after it went three revolutions. This seemed like it would work much better. Unfortunately, just when I thought I had designed the ultimate program, the batteries died on me.

Comments

Ideas, ideas, ideas

Today I presented my car to Professor Cumaranatunge and shared a few ideas with him. My first idea for the independent study was to create a game using the ball retrieving device. This would include three major steps: 1. design an interface for controlling the robot, 2. discover how to use Bluetooth to send commands to the robot, and 3. attach a camera to the car, so as to allow the user to watch the moves the ball retrieval device was making. Overall, the goal of the game would be to use the ball retrieval device to locate a ball hidden in a room and, once found, grab the ball and navigate to another location in the room.

The second idea I presented to Professor Cumaranatunge was to build a device that could draw letters. In carrying out this idea, I would need to make 26 programs (one for each letter of the alphabet). Once the 26 programs were designed, I would need to make an interface that allows a user to select the letters in their name. Finally, I would have to design a way to send the program, once a letter was chosen, to the robot using Bluetooth.

Although we did not choose which direction we were going to follow, we came up with a plan of action for the immediate future. Professor Cumaranatunge decided it would be best for me to become familiar with the programming software that came with the Lego Mindstorms. Not only would this activity allow me to learn about different sensors, it would allow me to delve deep within the small intricacies of each of the sensors.

Comments