go away spammer

Author Topic: Stampy (Sharp IR Rangefinder) algorithm only searches right and ignores left  (Read 2067 times)

0 Members and 1 Guest are viewing this topic.

Offline logicguyTopic starter

  • Jr. Member
  • **
  • Posts: 8
  • Helpful? 0
I used the Sharp IR unmodified source code to upload the program to my robot, but when I calibrate an object, the sensor is only turning right and ignoring the object when I move it to left side of the robot.

I know that I must center my servo before screwing the sensor onto the servo, but I think that I did this step correctly. The sensor is capable of moving to the left and the right side of my robot perfectly when I use my hands to test it out.

However, when I turn my robot on, it thinks that the left side of the sensor is its center and is not capable of moving any further.

Can anybody help me solve this problem ?
I can post videos or pictures if you need more info.

I also saw the video about the stampy algorithm and admin is capable of moving the sensor left and right using his camera (his calibrated object)

Thank you in advance.

Offline logicguyTopic starter

  • Jr. Member
  • **
  • Posts: 8
  • Helpful? 0
Those are the global variables of the SoR source code:

Code: [Select]
//global variables
int sharp_IR_reading=0;

int scan_thresh=0;//threshold value of scanning sensor

int scan_angle=30;//position of scanner, in units of servo command
int max_scan_angle=56;//maximum position scanner can rotate to (57)
//30 far right, 50 straight, 56 far left (until it jams)

I think that one of the variables should control the maximum angle of rotation for the servo.

Should I change the scan_angle=30 to scan_angle=56 ? I'm not sure.

Offline Conscripted

  • Robot Overlord
  • ****
  • Posts: 291
  • Helpful? 10
This sounds similar to an issue that was discussed on another post. http://www.societyofrobots.com/robotforum/index.php?topic=9869.msg75509#msg75509. Let us know if that helps.
Good luck
Conscripted

 


Get Your Ad Here