Home arrow Forums
914 PC Bots Forum  


edaniels
User

Platinum Boarder
Posts: 240
graphgraph
Karma: 2  
Left/Right Beak sensor angles - 2009/05/09 00:34 It's taken me a while to figure out how to measure the angles of the L/R beak sensors, because they are angled out and also angled down.

I measure the angle of the sensor relative to the beak as 54 degrees. WBR states it as 56 degrees, close enough given that I was using a paper protractor. Neither of these accounts for the downward tilt of the beak though.

What I really wanted to know is "What is the angle of the beak sensor, as PROJECTED onto the floor?" That is, projected onto the XY plane that I care about, the one that the robot moves on. The answer is 60 degrees. That is, 60 degrees from "robot front" to "sensor path projected onto the floor".

I know this is the correct number because my beak sensors now equal and often exceed the measurement precision of my base sensors, when sweeping across a wall. After trying lots of different methods for measuring this angle, the best method turned out to be using a small flashlight to literally project the sensor's path down to the floor, and measuring the angle it made that way.

It helps to find a nice round number too. 60 degrees feels right, it looks right, and it actually IS right, unlike the various numbers I tried before that.
  | | The administrator has disabled public write access.
c6jones720
User

Platinum Boarder
Posts: 350
graphgraph
Karma: 3  
Re:Left/Right Beak sensor angles - 2009/05/09 20:47 I used the old player manual, a protractor and a tape measure to worl out the angles of the drop sensor. I used matrices to work out the x,y,z coordinate of the point in space that a collision occurs relative to the exact centre of the robot (robotbase).

I used:

//########################################
//
// Drop sensor IR5
//
//########################################
//
A_EQUALS_B(IR5,RobotBase); //IR5 assumes the Robot base kinematic
A_TRANSLATE_Z(IR5,SensorHeight); //move sensor this many millimeters above ground
A_TRANSLATE_X(IR5,200); //move sensor 200mm forward of Robot Base
A_TRANSLATE_Y(IR5,-60); //move sensor 60mm right of Robot Base
ROTATE_Z_DEGREES(IR5,-56); //point sensor right 56 degrees
//all sensor readings are relative to this as an x translation
//
//########################################
//
// Drop sensor IR6
//
//########################################
//
A_EQUALS_B(IR6,RobotBase); //IR6 assumes the Robot base kinematic
A_TRANSLATE_Z(IR6,SensorHeight); //move sensor this many millimeters above ground
A_TRANSLATE_X(IR6,210); //move sensor 210 units forward of Robot Base
//all sensor readings are relative to this as an x translation
//
//########################################
//
// Drop sensor IR7 (check polarity later)
//
//########################################
//
A_EQUALS_B(IR7,RobotBase); //IR5 assumes the Robot base kinematic
A_TRANSLATE_Z(IR7,SensorHeight); //move sensor this many millimeters above ground
A_TRANSLATE_X(IR7,200); //move sensor 200mm forward of Robot Base
A_TRANSLATE_Y(IR7,60); //move sensor 60mm left of Robot Base
ROTATE_Z_DEGREES(IR7,56); //point sensor right 56 degrees
//all sensor readings are relative to this as an x translation





The above gave me believable and verifiable results.
  | | The administrator has disabled public write access.
c6jones720
User

Platinum Boarder
Posts: 350
graphgraph
Karma: 3  
Re:Left/Right Beak sensor angles - 2009/05/09 20:55 I think 60degrees downwards facing is true for the left and right sensors but I think the centre sensor faces down 50 degrees
  | | The administrator has disabled public write access.
edaniels
User

Platinum Boarder
Posts: 240
graphgraph
Karma: 2  
Re:Left/Right Beak sensor angles - 2009/05/10 22:20 I've captured the sensor geometry as follows, mostly in C++ constants:
Code:

  // ----- SENSOR GEOMETRY ----- // Assumed to be constant for all 914 PC-BOTs, but when in doubt get out your ruler. // Distance from axle to edge of forward sensor.  This radius is also applicable to the Left25 and  Right25 sensors: const int ciRobotFrontSensorRadius 210;  // in mm // Distance from axle to edge of backward sensor.  This is "KurtBot specific" // since I moved the "beak center" sensor to the rear and mounted it with duct tape: const int ciRobotBackwardSensorRadius 225;  // in mm // Distance that the robot's beak juts out in front of the base plastic frame: const int ciBeakJutFromBase 11;  // in mm // Distance that the sensors are inset from the robot's plastic frame (can vary slightly): const int ciSensorInset 5;  // in mm // Distance from robot's center of rotation to the front of the beak: const int ciRobotCenterToBeak = (ciRobotFrontSensorRadius ciSensorInset ciBeakJutFromBase); // Distance from beak sensor emitters to front of beak: const int ciBeakLeftSensorEmitterToBeak 10;  // in mm const int ciBeakRightSensorEmitterToBeak 30;  // in mm // Distance from robot centerline to beak sensor emitters: const int ciBeakLeftSensorEmitterXOffset 54;  // in mm const int ciBeakRightSensorEmitterXOffset 65;  // in mm // Distance that the beak sensor emitters are mounted, forward of robot center: const int ciBeakLeftSensorEmitterYOffset ciRobotCenterToBeak ciBeakLeftSensorEmitterToBeak; const int ciBeakRightSensorEmitterYOffset ciRobotCenterToBeak ciBeakRightSensorEmitterToBeak; // Distance from robot centerline to edge of side sensor: const int ciLeftSideSensorEmitterXOffset 42 + (int)cdWheelBaseRadius;  // in mm (measured 42 mm from wheel to sensor emitter) const int ciRightSideSensorEmitterXOffset 42 + (int)cdWheelBaseRadius;  // in mm (measured 42 mm from wheel to sensor emitter) // Distance that the left side sensor EMITTER is mounted, forward of robot center const int ciLeftSideSensorEmitterYOffset 18;  // in mm // Distance that the right side sensor EMITTER is mounted, forward of robot center const int ciRightSideSensorEmitterYOffset 38;  // in mm // 4/8/09 -- The sensors measure distance FROM THE EMITTER.  The emitter is one centimeter left of  sensor center // for all base sensors, and the detector is one centimeter to the right of sensor center. const int ciBaseSensorEmitterOffset 10;  // in mm, to the left of every base sensor's center // Distance from robot's center of rotation to the front sensor EMITTER (solve triangle problem for  hypotenuse) const double cdFrontSensorEmitterRadius sqrt(pow((double)ciBaseSensorEmitterOffset2) + pow((double)ciRobotFrontSensorRadius2));  // in mm // Angle from robot's center of rotation to each of the front sensor emitters (same triangle  problem as above) // This is a value that must be added to the sensor's angle to get the emitter's angle const double cdAngleToFrontSensorEmitter asin((double)ciBaseSensorEmitterOffset cdFrontSensorEmitterRadius);  // in radians // Distance from robot's center of rotation to the backward sensor EMITTER (solve triangle problem  for hypotenuse) const double cdBackwardSensorEmitterRadius sqrt(pow((double)ciBaseSensorEmitterOffset2) + pow((double)ciRobotBackwardSensorRadius2));  // in mm // Angle from robot's center of rotation to the backward sensor's emitter (same triangle problem as  above) // This is a value that must be added to the sensor's angle to get the emitter's angle const double cdAngleToBackwardSensorEmitter asin((double)ciBaseSensorEmitterOffset cdBackwardSensorEmitterRadius);  // in radians // Distance from robot's center of rotation to the side sensor EMITTERS (solve triangle problem for  hypotenuse) const double cdLeftSideSensorEmitterRadius sqrt(pow((double)ciLeftSideSensorEmitterXOffset2) + pow((double)ciLeftSideSensorEmitterYOffset2));   // in mm const double cdRightSideSensorEmitterRadius sqrt(pow((double)ciRightSideSensorEmitterXOffset2) + pow((double)ciRightSideSensorEmitterYOffset2));   // in mm // Angle from robot's center of rotation (facing forward) to each of the side sensors (same  triangle problem as above) const double cdAngleToLeftSideSensorEmitter asin((double)ciLeftSideSensorEmitterXOffset cdLeftSideSensorEmitterRadius);  // in radians const double cdAngleToRightSideSensorEmitter = -asin((double)ciRightSideSensorEmitterXOffset cdRightSideSensorEmitterRadius);  // in radians // Distance from robot's center of rotation to the beak sensor EMITTERS (solve triangle problem for  hypotenuse) const double cdBeakLeftSensorEmitterRadius sqrt(pow((double)ciBeakLeftSensorEmitterXOffset2) + pow((double)ciBeakLeftSensorEmitterYOffset2));   // in mm const double cdBeakRightSensorEmitterRadius sqrt(pow((double)ciBeakRightSensorEmitterXOffset2) + pow((double)ciBeakRightSensorEmitterYOffset2));   // in mm // Angle from robot's center of rotation (facing forward) to each of the beak sensors (same  triangle problem as above) const double cdAngleToBeakLeftSensorEmitter asin((double)ciBeakLeftSensorEmitterXOffset cdBeakLeftSensorEmitterRadius);  // in radians const double cdAngleToBeakRightSensorEmitter = -asin((double)ciBeakRightSensorEmitterXOffset cdBeakRightSensorEmitterRadius);  // in radians // These are the angles that the various sensors point, relative to "robot forward". // Note on the beak sensors -- the 60 degree angles given represent the beak sensor paths as // projected downward onto the robot/floor XY plane.  The beak sensors are angled 54 degrees // relative to the beak, however the beak is tilted downwards, which increases the angle relative // to "robot forward" measured on the robot/floor XY plane. const double cdSensorAngles[NUM_SENSORS] = {    -90.0 cdDegreesToRadians,   // RightSide    0.0,                            // Forward    -25.0 cdDegreesToRadians,    // Right25    25.0 cdDegreesToRadians,       // Left25    90.0 cdDegreesToRadians,       // LeftSide    -60.0 cdDegreesToRadians,    // BeakRight    180.0 cdDegreesToRadians,   // Backward    60.0 cdDegreesToRadians     // BeakLeft };

  | | The administrator has disabled public write access.
JohnO
User

Gold Boarder
Posts: 45
graphgraph
Karma: 2  
Re:Left/Right Beak sensor angles - 2009/05/15 21:14 Get yourself a 3cm square (or round) piece of black felt. Place it on the floor where you expect the beak sensor is pointed. Move it around, and at some point the sensor reading will change dramatically. This is the spot being measured by the sensor. Measuring the angle should be easy once you know where the beam is hitting the ground. Try a smaller piece of felt if you need a more accurate angle.

The middle beak sensor beam is easy to locate, the sides a bit more effort.
  | | The administrator has disabled public write access.