Sunday, August 1, 2010

Links to Victory!!

And if you do not understand PID controllers go to:

and the intructions:
http://www.hitechnic.com/models

PID Controllers are the next best thing!!

To help robotics to become less jerky and smooth just as if a human being was doing it,PID controllers must be used.How I found this out was I saw the HiTechic IRRC Car and how that they used a PID controller that they built in NXT-G and how when it moved it moved like a real car. So just to prove to myself that this would work I built the HiTechnic IRRC Car and switch the IR Receiver with the compass sensor to benefit D.R.i.V.e.And a few tweaks allowed me to make it work. I plan to change D.R.i.V.e.'s steering to something like the one on the HiTechnic IRRC Car which is using Ackerman steering. The links of how this was done,progress and documents will be posted in the next post.

Friday, July 9, 2010

Microsoft Robotics Developer Studio 2008

Hello.Lately, I been experiencing a major problem.How Do I Get Any Code Into MRDS(Visual Programming Language). If anyone has any solution please post it in the comments. It would be very appreciated if you did. Other than that MRDS has been very good and easy to use.

Wednesday, July 7, 2010

What else is there?

The Process

  • First the google maps API is downloaded as a XML
  • Then formulas converts it into excel 
  • Then a macros downloads each bearing value and distance value into txt files for each waypoint
  • NeXT Tools downloads the txt files into the brick
  • Then the file access block reads the values and puts it into a variable
What I'm doing now?
  • Using Microsoft Robotics Developer Studio 2008,there are two ways of achieving our objective without any human interference.Which is:1)Using a simulated GPS Sensor to get lat and long and navigate. Or 2)Using the same method above but this time only using MRDS.
  • So to accomplish either one,I am watching tutorials and researching to get myself familiarised with MRDS.                                                                                                      

Thursday, June 17, 2010

Mission:2/3 ... completed. Must terminate 1/3 & 3/3, then Mission Complete...

As the title says 2/3 of the Step is complete.Now I shall tell you how I made my leg move up 2/3 of the way. 1/3 of the way was I first tried the file on nxtasy known as gps_master_1_04 which kept showing error then I researched more and found a file known as GPS.rbt from thenxtstep which gave me Denmark
Finally, I thought I should try the new version of gps_master which is gps_master_3 but that is also reporting an error.So if anyone has a different solution please put it in the comments section.2/3 was logical thinking that I thought of was that it could navigate itself by being perfect by giving every thousandth decimal the compass sensor could tell the direction to that coordinate and move what ever is necessary.

Saturday, June 12, 2010

BrixCC and The Day of Walking Up the Step

The day had come to walk up the STEP!!!Please remain in a calm order, this will be over soon.This day has only 1/3 categories. To accomplish walking up the STEP without falling,the 1/3 of the step and will fall if not executed properly.I downloaded a nxc file from a post on nxtasy.org called GPS and NXT which is a file that a GPS that is paired bluetoothly to the NXT gives lat and long which is displayed on a NXT Screen.For the 2/3 of the STEP is giving these coordinates to the compass sensor and using that to transport/navigate itself. The 3/3 is getting the light sensor to detect the curb line to center itself on a lane,the Ultrasonic Sensor to detect objects and stop or horn and to get the touch sensors working as bumpers and the Acceleration sensor to detect incline and adjust speed.

Sunday, May 23, 2010

The Next Step!!

Time for the Next Step has arrived which is to make D.R.i.V.e. actually drive itself, and I using BrixCC to program dynamically. Since I am using BrixCC(NXC), I am able to use my sensor multiplexer, the Compass Sensor and the Acceleration Sensor. I am currently going through learning the basics of BrixCC. I have changed the position of the light sensor to the side of the car so it follows the yellow or white line of the curb to center it in a lane. I also plan to make D.R.i.V.e make a sound while reversing to alert the car behind.

Wednesday, April 21, 2010

Major Make-Over

There has been a major makeover happening to D.R.i.V.e a very corner has been strengthened and improved.  The gear ratio for the rear motors has changed to 1:1 instead of 1:3. I know it sounds weird but the small gear had to wait a while before getting the getting the speed wanted  therefore programming would not be accurate. The bumpers have been joined to the chassis but still can be activated. To make a full proof steering system, I made the motor lying down and built a swivel around it. I have finished the round about,u turn and 3 Point Turn programming and are perfect.

Tuesday, April 20, 2010

Error!!Error!!Problem located!!

I have just come across many errors such as that D.R.i.V.e was to heavy to move so to solve that, I turned the motors around and worked perfectly. Soon after, another problem occured which was that the bevel gear steering the sviwel kept tripping as in moving awway form the other gear there for not turning the sviwel. I have still not have found the solution to this problem. So if you have the answer please leave a comment. I just first have to say that i have so far 7 followers but I have not received any comments or reactions so please put some. 

P.C.o.P.P.(Pseudo Code of Programming Planning)


I am trying out a type of planning known as pseudo-code which is in a form of a dialogue between my robot and I but except I am doing all the talking. If you have any doubts maybe the following pseudo code will clerify things.



  • D.R.i.V.e., follow the route given by Google Maps by compiling your navigation blocks.

  • D.R.i.V.e., use your compass sensor to collabrate with Google Maps to make shure you are following the route.

  • D.R.i.V.e., use your accelarator sensor to check for inclines and adjust speed accordingly.

  • D.R.i.V.e., use your ultrasonic sensor to stop the car a something 2 cm in front of it.

  • D.R.i.V.e., use your touch sensors so that if bumped or pressed, stop and wait for further instructions.

  • D.R.i.V.e., diplay a green light when moving ordinarily and red when bumped or stopped.

 

Saturday, April 17, 2010

The Master of Gravity

To solve my problem of gravity, I purchased a HiTechic set which includes a Magnetic Compass Sensor, a Acceleration Sensor, a Sensor Multiplexer(i.e. a sensor hub for NXT), etc. The acceleration sensor is to solve my problem when it comes to a incline. While the magnetic compass sensor will synchronize with Google Maps to make sure D.R.i.V.e. is driving properly. The sensor multiplexer is because I have used all my sensor ports.

Thursday, April 15, 2010

Turning D.R.i.V.e from a Perodua to a Ferrari


To increase D.R.i.V.e's speed I created a very small gear box(if you would like to call it that) I first used a 40 teeth gear with a 8 teeth gear which didn't even make the car move wen it was on the ground.I then tried to use a 40 teeth gear with a 24 teeth gear which made it go slower then when there wasn't any gears so I finally used a combination of a 36 teeth gear and a 20 teeth gear which was x2 the speed.

Tuesday, April 13, 2010

Driving D.R.i.V.e

I have reconsidered the way that D.R.i.V.e steers himself. Before this D.R.i.V.e.'s steering was using the two back motors one turning clockwise and the other turning anti-clockwise therefore turning it while the front motor pulls the car forward. Now I have altered D.R.i.V.e's steering to more like the modern car's steering to make the wheels  swivel therefore making it more ordinary.Using the base of a Race Car Program I created a swivel.

Saturday, April 10, 2010

Forces of Gravity

It has come to my mind that the speed will change if there was a slope and I do not know every slope in the world to program. According to the formula Speed=Distance/Time, I need to know the distance that is needed to travel divided by how long it takes. Please send any suggestions on how I can figure this out in the comments section. The same concept applies when coming down a slope so that it does not crash into something.

Wednesday, April 7, 2010

Back to D.R.i.V.e and Mindstorm


After finishing the Blender part of this project, all my attention is back on to the robotics and the GPS interface. In conjunction with the programming of this robot, my plan is to first use nxt-g to create my blocks and then opening then in code and using BricxCC to send this information that is told where and when to be by Google Maps according to the route given. Some of the my blocks are Forward, Backward, Left, Right, a 3-Point Turn,U-turn and Round About at 3, 6, 9, 12.The process is:
  1. Get Directions ->
  2. Save Directions in .txt file ->
  3. Read Directions->
  4. Create Variables ->
  5. Write the Instructions ->
  6. Compile program file ->
  7. Send it to Brick ->
  8. Run the program file

Sunday, April 4, 2010

Modeling D.R.i.V.e For Blender

For the 3-D project, I decided to model my lego robot in blender. So to make things easier I went online to find a software that could create my model using lego pieces and then exporting that to Blender. I then found LDraw and LeoCad which could do exactly that. But these software didn't have some NXT parts (The Electric Components)There is a website that specializes in Lego called PhiloHome that has unofficial parts of the NXT for LDraw.

After downloading,I extracted the folder into the Parts folder of the software and then started constructing my car. After finishing contructing, I then started colouring my model. I coloured my model according to the original NXT set. I then saved it and reopened it in LeoCad which I then exported to a .3ds which is a 3D Studio Max format.







I imported the .3ds file to Blender and because the motors, sensors and brick where not coloured, I had to take matters into my own hands and manually coloured them, I then animated the wheel movement.



Friday, April 2, 2010

A Whole New World!

To add on to my boring city I told you about in my blog post Mission:Failure, I have added many different objects and concepts to make my boring city into a more interesting one. One of these interesting concepts is grass .I have added grass to my city to fill in all the gaps which are not covered by buildings so that it dowesn't just lies empty. I have buit  a curb all around the sides of the city's roads  to make my roads look more realistic and to prevent the car from looking  like it is of the road.

To add to that, I have also added a sky to create or fill in the empty space above the city and to make the city look more colorful. I have textured the buildings to color the buildings instead of having gray buildings. I have also changed my buildings by adding roofs and the cross for churches. I have created a car park to park my Lego car and other cars to add extra objects and not let grass take all the fame.Finally I followed the Google maps contours to make my city with those contours.

Friday, March 26, 2010

First Attempt : Operation Failure

After building all of that, when I looked at my kingdom, the buildings looked too simple for my taste so I went to each building in Google Maps through Street View and copied the detail to my file by texturing it, making windows and making roofs.When I first tried to use game, a lot of things were very hard such as grass and snow is not allowed in the game engine and the car keeps falling into the road.I decided then to animate it so then the car follows a invisible line which is a path going to every corner of the village but sticking to the roads.

Saturday, March 20, 2010

Navigation In The Virtual Kingdom Of Oundle

To visualize the concept of D.R.i.V.e., I have created a 3-D version of a village in England called Oundle in a software called Blender which is meant for 3-D modelling, animating and creating games. To illustrate this, I created a car and put a camera at the postion of the passager.I created this village by using google maps as a guide and took a blueprint of a car from The-Blueprints. I built the roads first followed by the car and then the building and finally the extras such as fields, snow and animating the grass moving and the snow falling.

Monday, March 15, 2010

Wednesday, March 10, 2010

Designing My GPS Interface

I have created a GPS interface using a software called iWeb that is a picture of a GPS screen that I took from google images and deleted the centre picture and cleared all the copyright words and symbols using Adobe Photoshop.

Then I put this picture in iWeb and put a html snippet of Google maps behind it.


Then I added my own copyright symbols to the screen by puttin D.R.i.V.e. on the top and my name just bellow the HTML snippet. The HTML Snippet is a link to a map created by me using the My Maps option on Google Maps by creating destinations on my map and then letting the user choose a destination and then type in a start point which will then send the car instructions to drive the robotic car (D.R.i.V.e.).

Not As Easy As It Looks

I have been looking through some programming examples and what is shown to you ,looks easy. But when I tried out using NXT-G and BrixCC... well you could just say that it is not as easy as it looks.So to help improve my programming skills, I went through books such as NXT-G Programming and Power Programming by John C. Hansen(creator of NXC(Not eXactly C)).In each chapter something new was introduced to me such as an easier way to program or advanced programming.

Tuesday, March 9, 2010

Challenges That Need Solutions

When I built Mark 1, there were only three problems. Firstly the wheels were falling out and they were not aligned.

So to solve that I used many axle bushings to prevent my wheels from sliding along the axle.

For the alignment, I used my line of sight and math to align the wheels.

But there is still the final problem which is that the clearance under the brick (i.e. the distance from the bottom of the car to the floor) was only about a cm.So to increase the clearance, I flipped the brick around so that the buttons will be at the bottom and there is more clearance.


BEFORE                                                                                                   AFTER

                     

Monday, March 8, 2010

My Baby Has A Name!

I have finally come up with a name to replace my other boring name Mark 1.The name of my robot is a three word abbreviation.The name of my car was created according to the purpose and concept of the robot.The robot's name is....D.R.i.V.e. which stands for Driverless Robotic Vehicle.

Putting In the Eyes, Ears and Nose (Sensors)

Putting the sensors was quite difficult because there weren't many place which were able to connect sensors to. The sensors used for my bot are a Ultrasonic Sensor,a Light Sensor and two Touch sensors.The ultrasonic sensor is used to display a low ptich for something in the distance and a high pitch for something closer.






The touch sensors are used as bumpers for the front and back and finally the light sensor is for displaying green until touch sensors are bumped which will then turn red.










Once the sensors where attached, I went back to my book to find out how to program the sensors to do what I just said.To program the ultrasonic sensor a lot of data plugs and variables where as for the bumpers where using a wait block and the light was using a lamp block.

Sunday, March 7, 2010

Constructing Vehicle Mark 1

I created a very simple yet strong chassis shaped like an ordinary car and then attached two motors at the back for driving and steering.To steer, one motor will turn clockwise while the other will turn anti-clockwise therefore turning the vehicle.

Another motor was used to smoothen the turns. This motor gives the vehicle forward motion while the rear motors provide steering.

I then attached a spoiler and strengthened the structure because the middle was very weak and was breaking apart.

Thursday, March 4, 2010

Research, Research, Research

To configure a Global Positioning System (GPS) with my NXT, I went online to research how I could do this and with which software.

Then I found a software called BrixCC which runs on NXC(Not eXactly C) which I believe can do the trick. I also went to my class leader in a weekly CR8 class which I go to on Saturday mornings to ask him on how I could build and program this robot.We came up with a solution to use BrixCC to send instructions to the robot and using NXT-G to create my blocks for directions.

Then opening that file with wordpad and collecting that code and sending it to the NXT. I then went to visit my teacher in another weekly class every Thursday evening to ask about designing. One of the suggestions  made was to do a brain fart which is to dump out all that is in your mind on a piece of paper. Another idea was to use a wireless camera to show how it will look like from a passenger point of view.

Monday, March 1, 2010

Organising My Time With A Project Plan

To organize my time-line and tasks, I decided to use a software called Numbers to do exactly that but none of the Numbers templates installed had what  I wanted so I went and looked for a template that could suit this purpose.

Numbers is an application like Excel for Mac.

[screenshot of the plan]

I found a very good one that had a Calender, a Gantt Chart and a Project Milestones Table. I got straight to work and created timelines for my tasks and to dos, keep up to date with my status of work and checked what else was needed to be done.

Friday, February 26, 2010

My Adventure Mindmap

I have created a mind map for my concept to list out all the tasks for my project. Because I didn't have a mind mapping software, I went online and downloaded a software called FreeMind. But after I saved my first draft of my mind  map, I was unable to open the file for some reason unknown to me.

So I downloaded another software called Concept Draw Office and I redid it. I found in my first section (Robotics) many to dos such as building a chassis, attaching motors to the chassis, then attaching sensors to the chassis and run through a test run to see if the motors and sensors are working correctly.

In my second section (Planning), I found four more to dos which are creating a mind map, updating this blog, taking notes during this journey and writing out the to dos in a numbers template.

[insert your mindmap]

Finally, for my third and final part (Blender) the last four to dos are making a virtual car, building a city and animating both of them.

Monday, February 22, 2010

The Beginning of My Adventure

Hi, I'm Jian. I've been a fan of Lego Mindstorm™ since I got my first set in October 2009. I would like to build a project to showcase a concept that I have been developing in my mind.

Global Positioning Systems (GPS) and Mapping Software like Google Maps are becoming easily available. Most cars these days come GPS navigation as standard in the car. The GPS system tells the driver how to navigate his/her vehicle from point A to B. It seems to me that the next leap will be for the GPS to give instructions on navigation to a Robotic car.

To demonstrate how this could be done, I have chosen to develop this project using Mindstorm, Blender and Google Maps. Over the next few months, I am going to plan and design my concept, build a virtual model and a prototype. I hope that my posts on my journey will be interesting to read.