I am a big fan of IR Sensors, like the DistNX from Mindsensors: [LINK]. It is less prone to erroneous readings, in my experience. Take a look at this really highly detailed picture of pure scientific awesomeness (made with Paint).

Attachment:

IRscanProfile.jpg [ 41.09 KiB | Viewed 11224 times ]

You can detected the object by looking for a big, sudden dip in the distances measured. straight ahead of you. You do expect some decrease in distance as your angle approaches zero but if it is much higher, then perhaps it is worth investigating

I am a big fan of IR Sensors, like the DistNX from Mindsensors: [LINK]. It is less prone to erroneous readings, in my experience. Take a look at this really highly detailed picture of pure scientific awesomeness (made with Paint).

Attachment:

IRscanProfile.jpg

You can detected the object by looking for a big, sudden dip in the distances measured. straight ahead of you. You do expect some decrease in distance as your angle approaches zero but if it is much higher, then perhaps it is worth investigating

= Xander

nice, but my lecture just want me used the only set given

buy the way is there any other solution that i can used more sensor on nxt

it only can mount 4 right?

do i need another NXT?

my method is i want use condition if both sensor detect same high it meant there no object in front. if have then it try to grab it

You can use the Ultrasound sensor instead, if you'd like. You an only use four sensors, that is correct.

= Xander

thank you very much for help and tips

Sun Apr 28, 2013 11:29 am

Azhari

Rookie

Joined: Thu Mar 14, 2013 10:32 pmPosts: 25Location: Malaysia

Re: Heuristic algorithm

Question---------1.When i'm running in visual it run smoothly but when i compile and downloaded to robotRanger the sonar can't detect obstacle or wall in front and sometime after hit the wall then it detect.Why?

2. From front view , left tyres move forward and right tyres move backward.in the end i have to do this

motor[rightMotor] = speed; // set mtr_S1_C1_1 is run at a power level equal to 'speed'motor[leftMotor] = -speed; // set mtr_S1_C1_2 is run at a power level equal to 'speed'

just to make sure that is the coding were correct or the developer intentionally do the error or my mistake.

Tue Jul 16, 2013 2:33 am

Ernest3.14

Professor

Joined: Sat May 18, 2013 1:24 pmPosts: 271Location: Olympia, WA

Re: Heuristic algorithm

To reverse the motors, go into the Motor/Sensor config (double click the #pragma config lines at the top of your code) and check the box next to "Reversed" for the motors which are running backwards (note: this will not reverse encoders, I think).

To see what is going on with the sensor, go to Robot->NXT Brick->Test I2C Sensors Utility to see what is your sensor is returning. I'm speculating here, but you might need to add a `Wait(10);` in your code somewhere.

Could you please post your code here for us to see? Surround your code with [code] //your code here [/code] so it looks nicer.

To reverse the motors, go into the Motor/Sensor config (double click the #pragma config lines at the top of your code) and check the box next to "Reversed" for the motors which are running backwards (note: this will not reverse encoders, I think).

To see what is going on with the sensor, go to Robot->NXT Brick->Test I2C Sensors Utility to see what is your sensor is returning. I'm speculating here, but you might need to add a `Wait(10);` in your code somewhere.

Could you please post your code here for us to see? Surround your code with

Who is online

Users browsing this forum: No registered users and 2 guests

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum