Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Simulating Sensors

Author
Message
tmd13
15
Years of Service
User Offline
Joined: 16th Sep 2009
Location:
Posted: 11th Nov 2009 18:42
How can I simulate sensor in DarkGDK. Like obstacle detection, thermal sensors, cameras.

I would like to know how can I simulate them and implement them in DarkGDK.

Thanks in advance
luke810
18
Years of Service
User Offline
Joined: 4th Sep 2006
Location: United States
Posted: 11th Nov 2009 19:21
It depends on what exactly you're doing, you are going to have to be more specific. If you want random sets of data all you have to do is use a random number generator...

tmd13
15
Years of Service
User Offline
Joined: 16th Sep 2009
Location:
Posted: 11th Nov 2009 19:26
Well right now I am working on robotics applications, and if i have a car and I want to add a obstacle detection sensor to avoid hitting anything from walls to others car. So I want to know how to simulate them.

The same thing with thermal sensors to detect when a person is approaching the vehicle and be able to recognize it.


Thanks in advance
Mireben
16
Years of Service
User Offline
Joined: 5th Aug 2008
Location:
Posted: 11th Nov 2009 21:31
I guess you need raycasting collision detection. Or, what if you define an invisible cone object for the detection area of the sensor and then check if anything is colliding with the cone?
tmd13
15
Years of Service
User Offline
Joined: 16th Sep 2009
Location:
Posted: 12th Nov 2009 01:37
But I am thinking about something more realistic. Where I can get data from it.


Thanks in advance
Mireben
16
Years of Service
User Offline
Joined: 5th Aug 2008
Location:
Posted: 12th Nov 2009 08:09
I supposed that after you notice that something collided with the object that represents the detection area, then you can use the detected object number to retrieve more information about that object. Either data stored in the Dark GDK object itself (like size), or you can store additional information in the form of memory records and retrieve the appropriate record based on the object number. Then it would tell you if the object is a wall or a human character, its temperature, etc. Maybe I misunderstood the question? What kind of data would you need about the detected object?
tmd13
15
Years of Service
User Offline
Joined: 16th Sep 2009
Location:
Posted: 12th Nov 2009 16:17
The thing is that I do not want to get information just because is there but because there is some way to measure it.

For example if I I am using a LIDAR that is a sensor with capabilities to detect an object and also measure the dimensions of it. If I am going to simulate that one I do not want just because I created it once it detects it, use the information I already know to use it. What I want is that the sensor somehow measures and basically act the same way as a real one in all sense.

For example if I create a Ultrasonic sensor to measure distance and be able to detect obstacles I want to be able to measure the speed of the ultrasonic signal I am sending and things like that.


I hope you can understand what I am saying.


Thanks in advance
bloodmage2
15
Years of Service
User Offline
Joined: 14th Jun 2009
Location:
Posted: 12th Nov 2009 21:37
you could write a function that mimics what the sensor would do. for example, if you have a ultrasonic sensor that returns the distance to an object by (forgive me if my physics are wrong) sending out sound and waiting for it to come back, you could create primitive (cone, box, cylinder etc.), hide it, send it forward, when it collides, send it back, and test the time it takes. is this what you are getting at?

-to the optimist, the glass is half full. to the pessimist, it is half empty, to the engineer, it is twice as big as it needs to be.
tmd13
15
Years of Service
User Offline
Joined: 16th Sep 2009
Location:
Posted: 12th Nov 2009 22:03
Thanks bloodmage2, I already though about that idea but my problem comes when I am trying to mimic other type of sensors.

How can I hid it or make it transparent the cone, box or cylinder, thats another problem I am having. How to hide it??


Thanks
Mireben
16
Years of Service
User Offline
Joined: 5th Aug 2008
Location:
Posted: 13th Nov 2009 20:17
You can make an object invisible with dbHideObject.

I don't know how much it is possible to simulate real behaviour of sensors, since the real world simply does not exist in the computer. What you can simulate is the delay (for example, how long time it takes for the ultrasound signal to come back from a certain distance) and some degree of uncertainty. Let's say you know that the size of the detected object is 10.5 meters but the sensor should not be able to tell exactly, so you can introduce a random percentage of variation that increases with distance. Or, maybe the sensor cannot measure objects larger than 5 meters (larger than the detection beam), in that case you just display "more than 5". Or, you can simulate less reliable detection (faded picture on the sonar screen) when you know that the object is composed of certain materials (wood, metal...) Another example with thermal sensor: if it detects "body heat", you can make the detection less reliable when the temperature of the outside world is near the temperature of the object to be detected. None of this is real, of course, but putting in a lot of these details, you can make it good enough to be believable. The important point is what is "good enough" for your purpose.
tmd13
15
Years of Service
User Offline
Joined: 16th Sep 2009
Location:
Posted: 13th Nov 2009 23:12
I have considered that. Thanks for the advise Mireben

For the thermal sensor thats really a good approach.

Thanks Mireben again for the help.
pcRaider
17
Years of Service
User Offline
Joined: 30th May 2007
Location:
Posted: 14th Nov 2009 11:07
You give back distance with an optical sensor.
dbIntersectObject

You return information of a color from a camera.
You return an edge by performing image processing.
You move a robot with a physics engine.
tmd13
15
Years of Service
User Offline
Joined: 16th Sep 2009
Location:
Posted: 14th Nov 2009 16:32
How can I return information of a color from a camera pcRaider.

Thats a good approach for a color camera.
pcRaider
17
Years of Service
User Offline
Joined: 30th May 2007
Location:
Posted: 14th Nov 2009 18:39
a color camera.
Process


dbSetCameraToImage
dbPasteImage
dbGetImage
dbMakeMemblockFromImage
---image processing---

Login to post a reply

Server time is: 2024-11-20 09:34:31
Your offset time is: 2024-11-20 09:34:31