Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

3d space builder...

Status
Not open for further replies.

Marks256

New Member
I need to know what would be most efficient in building a SIMPLE 3d model of room. I can not use a video camera(at least until i learn how to interface one). It has to be done with Infrared, Ultrasonics, or some other technique you people can think of.

1) There is no maximum amount of time required to scan the room(yet), but the faster the scan, the better.

2) It doesn't have to be very accurate, but just enough to create a fairly good 3d model the more accurate, the better.


I heard that lasers can do this pretty good, but i cannot get ahold of lasers.
 
i think we may need a combination of two or more scanning methods .
for eg:- what happens when the laser scanner scan a glass window ? your 3d model would sense that as a hole . a reflectivity issue also comes along with this. a microwave scanner would do better , think
 
If you want to create a 3D model, ultrasonics won't work - they're way too broad and have significant issues with echos off of non-perpendicular surfaces.

Laser parallax distance sensors are accurate and cheap - but only give you 1 data point - which is pretty slow. Vision/laser scanning/structured light requires piles of math and is complex and computationally expensive, or requires custom hardware.

I don't know about radar, but I'd assume that it isn't much easier...
 
That is why i asked. I want to know how this would work then. Acording to my BOEBOT's tutorail, the IR object detectors detect objects like this:

**broken link removed**



But the thing is that i want to map a room, or environment sort of like this:

**broken link removed**




Any ideas?
 
3D modeling

3D modeling is a very tall order, espesaly if you dont have alot of cpu power.

My sugestion would be to use a simple camera and a laser grid. A laser grid would kinda draw a grid on the world, and then you film that world with a grid on. This grid will get distorted when it hits somthing that isnt flat. (kinda like shining a flashlight at the floor in an angle, as oposed to straight on).

What you need then is a math prosesor that can calulate the shape of the world, based on the distortion of the laser grid.

As for camera, that isnt all that differcult to get working. You could probably use any simple webcam (depending on what acuracy you need of course). A std webcam 640x480 should prolly do fine. I have it from a goo dsource that there is a standard windows API library for this kind of thing, altho i have never realy use it myself. Im guesing it is a Direct X thing (i think its called Direct Show or somthing ... try googling that)

There is an algoritmh in image analysis that detects solid lines in images (it does this by converting dots to lines, thru a transform). It should be able to see the lines from the laser grid, better then say a Soebel operator detecting edges. Ofcourse bright red laser stands out a bit so it helps when designing algorithms.

Good luck tho ... i imagine this will be alitle differcult to pull of, altho entirely possible, if you have enough cpu power("ebough" depending on the time you need it done in).


Cheers,
Ole
 
Wouldn't the boebot be mapping in 2 dimensions, since that is how it moves?

There are several software packages that claim to create 3d models from photographs. Played with a few demos years ago, but seemed like a lot of work. 3d graphics always seem to take more computer than I could afford. Still play at it occasionally, but really don't like to wait for it to render a scene.
 
ombrastein said:
My sugestion would be to use a simple camera and a laser grid

I already said that i can't use a video camera because i don't know how to interface one, and i don't want to use windows. I want to use DOS(for its' simplicity)


HarveyH42 said:
Wouldn't the boebot be mapping in 2 dimensions, since that is how it moves?

Yes, it would.


I am not worried about computer power. I have access to a whole network of computers. I am confident that soon i will be able to network, and then put all of the computers on the network to work(rendering, decoding, encoding, etc.
 
Why aren't lasers available to you? Just go down to a 5 and dime and pick up a keychain laser pointer..
 
Marks256 said:
.. and i don't want to use windows. I want to use DOS(for its' simplicity)
yes dos is definitely simple but limits the flexibility here. what about linux , there are libraries available to capture pics from usb webcams

then is there any particular need for a 3D plot , does a 2D suffice. ?
 
Let clear this up a little. Are you looking to map the path of your robot? Or do you want to make a 3-d model of a room? If just mapping where the robot can/can't travel, it would be pretty simple.
 
Sceadwain said:
Why aren't lasers available to you? Just go down to a 5 and dime and pick up a keychain laser pointer..

Well of course laser pointers are available to me. What about the precision equipment that it takes to control the laser? I.E the magnetic mirror? There is no way i can do that. :(

akg said:
yes dos is definitely simple but limits the flexibility here. what about linux , there are libraries available to capture pics from usb webcams

I have yet to find a Linux distribution that i like(i love knoppix, but it is only live on cd, at least that has been brought to my attention). Wait. Is there a distro that allows you to just use the console?

HarveyH42 said:
Let clear this up a little. Are you looking to map the path of your robot? Or do you want to make a 3-d model of a room? If just mapping where the robot can/can't travel, it would be pretty simple.

Well, i would like to do both. I would like to build the 3D model, and then from that, build the path for the robot.

See, the problem is, i dont like robots that can just think "Yes, i can" or "No, i can't", and the forget the results the next second. The reason i want the 3D model, is so i can let the robot "remember" where it was, and then the next time it is in that environment, it will recall that it has been there.
 
Then you really only need the 2d map. You would just need to make an array large enough to cover the space your robot travels. Each cell in the matrix could contain just a simple 1 or 0 for whether a space is occupied. Doesn't seem important if the path is blocked by a desk or water cooler, robot still can't go there. Each cell in the matrix could also be a counter, just because it was blocked once, doesn't mean it should be avoided forever.

Now, there are many things you could do with the 2d array. Since you have stored the distance and direction of everything that has blocked the robots path, you should be able to calculate the best path to get to a destination.

If you want to make a 3d image on your computer, you could use the measurement from your array to build a scene in a 3D graphics program. The models can be download free (usually).

In your array you could assign '0' as open space, any other value could identify the various objects encountered. So, you could define the block area that is your refrigerator ('bot' get me a beer), or the trash can (get rid of these empties before the wife gets home).

For this to work, the bot would need to start at a 'home' position, maybe battery charging station. You would need to measure distance, revolution of the wheels.

But if you really need to have a 3D veiw on a screen, of what your bot is doing, get a cheap wireless camera.
 
HarveyH42 said:
Then you really only need the 2d map. You would just need to make an array large enough to cover the space your robot travels. Each cell in the matrix could contain just a simple 1 or 0 for whether a space is occupied. Doesn't seem important if the path is blocked by a desk or water cooler, robot still can't go there. Each cell in the matrix could also be a counter, just because it was blocked once, doesn't mean it should be avoided forever.

Now, there are many things you could do with the 2d array. Since you have stored the distance and direction of everything that has blocked the robots path, you should be able to calculate the best path to get to a destination.

If you want to make a 3d image on your computer, you could use the measurement from your array to build a scene in a 3D graphics program. The models can be download free (usually).

In your array you could assign '0' as open space, any other value could identify the various objects encountered. So, you could define the block area that is your refrigerator ('bot' get me a beer), or the trash can (get rid of these empties before the wife gets home).

For this to work, the bot would need to start at a 'home' position, maybe battery charging station. You would need to measure distance, revolution of the wheels.

But if you really need to have a 3D veiw on a screen, of what your bot is doing, get a cheap wireless camera.

You have my intentions all wrong. I don't just simply want to avoid objects, i want to be able to identify the objects that it is avoiding. Then, one it figures out it's surroundings, then the A.I. could figure out where it is in the 3D grid, and then be able to know where things are relative to its' current position.

theinfamousbob said:
Couldn't you use hard drive voice coils for the mirror control?

How would i do that?



Edit: Ran spell check.... :)
 
Voice Coils: The actuator in a modern hard disk uses a device called a voice coil to move the head arms in and out over the surface of the platters, and a closed-loop feedback system called a servo system to dynamically position the heads directly over the data tracks. The voice coil works using electromagnetic attraction and repulsion. A coil is wrapped around a metal protrusion on the end of the set of head arms. This is mounted within an assembly containing a strong permanent magnet. When current is fed to the coil, an electromagnetic field is generated that causes the heads to move in one direction or the other based on attraction or repulsion relative to the permanent magnet. By controlling the current, the heads can be told to move in or out much more precisely than using a stepper motor. The name "voice coil" comes from the resemblance of this technology to that used to drive audio speakers, which are also basically electromagnets. All PC hard disk voice coil actuators are rotary, meaning that the actuator changes position by rotating on an axis.

From **broken link removed**

Since it's relative you'd have to use some kind of feedback such as a white/black bar pattern with modulated IR or something...
 
Oh, yeah. I know what the voice coil is now. I just never knew that that is what it was called. But doesn't the mirror rotate up/down AND left/right?

How would YOU set it up?
 
All Linux distributions can be setup to run from console only - just don't start up/install X11/Xorg, and all you get is a command line. Heck, if you monkey with Knoppix's boot parameters, you can start it up in "single user mode". I'm not exactly sure why you'd want to do that but if you really want to...

In any case, two RC servos with mirrors attached and a laser based distance measuring device is all you would need to scan the thing around. Or just mount the laser distance sensor to the servo directly, or build yourself some sort of gimbal mechanism.
 
HarveyH42 said:
Sorry, guess I don't understand the difference between 2D and 3D space...

Is that sarcasm i sense? Ok, this is what i want:

**broken link removed**


This is what i DON'T want:

**broken link removed**
 
Exactly what I was trying to tell you. You can add the third dimension purely with software.
Have you taken a look at what a commercial 3d laser scanner can/cannot do, price, software. How much work you need to do on the model after the scan? Even at very low resolution, it'll be a considerable investment of time and money.

I had similar ideas a few years ago, but found it well beyond my means, but maybe someday. I make pewter figurines (sometimes), but modeling and making molds is a major hassle. Thought it would be cool to laser scan or even download the models and use a CNC Mill to carve out the mold or produce a model I can make a mold from, using silicon rubber. Figured there was money to be made, if you could make figurines of people, pets, kids in just a few days, instead of months.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top