# Desc: Device definitions # Author: Kallahar - kallahar@kallahar.com # Date: August 2005 # units: x/y are the location on the grid # : fov and heading are degrees # : distances are in meters # The fixed IR sensors define bot_ir_fixed ranger ( # "ranger" is a generic distance-sensor type scount 3 # number of sensors we'll have # to calculate these x/y positions I drew it out on graph paper and then tweaked them a bit. # define the pose of each transducer [xpos ypos heading] spose[0] [ 0.30 -0.150 320 ] # left : positioned a little to the left of the center spose[1] [ 0.30 0.000 0 ] # center : center of the front bumper spose[2] [ 0.30 0.150 45 ] # right : a little right of the center # define the field of view of each transducer [range_min range_max view_angle] sview[0] [0.2 1.5 10] # 20cm-150cm, 10 degree field of view (from the datasheet for the sensors we plan on using) sview[1] [0.2 1.5 10] sview[2] [0.2 1.5 10] # define the size of each transducer [xsize ysize] in meters ssize[0] [0.2 0.1] # these are pretty much dummy fields since sensor size is so small. ssize[1] [0.2 0.1] ssize[2] [0.2 0.1] ) # the position of the bot define bot position ( # actual size size [0.50 0.35] # calculated from the graph paper drawing # draw a nose on the robot so we can see which way it points gui_nose 1 # small dot on that bumper gui_boundary 0 mass 15.0 # estimated mass in KG # this polygon approximates the shape of a pioneer polygons 1 # I used the graph paper drawing to find these coords, better ways exist. polygon[0].points 21 polygon[0].point[0] [ 0.000 0.000 ] polygon[0].point[1] [ 0.125 0.000 ] polygon[0].point[2] [ 0.125 0.100 ] polygon[0].point[3] [ 0.150 0.100 ] polygon[0].point[4] [ 0.150 0.050 ] polygon[0].point[5] [ 0.350 0.050 ] polygon[0].point[6] [ 0.350 0.100 ] polygon[0].point[7] [ 0.375 0.100 ] polygon[0].point[8] [ 0.375 0.000 ] polygon[0].point[9] [ 0.500 0.000 ] # end of top polygon[0].point[10] [ 0.500 0.350 ] # bottom right polygon[0].point[11] [ 0.375 0.350 ] polygon[0].point[12] [ 0.375 0.250 ] polygon[0].point[13] [ 0.350 0.250 ] polygon[0].point[14] [ 0.350 0.300 ] polygon[0].point[15] [ 0.150 0.300 ] polygon[0].point[16] [ 0.150 0.250 ] polygon[0].point[17] [ 0.125 0.250 ] polygon[0].point[18] [ 0.125 0.350 ] polygon[0].point[19] [ 0.000 0.350 ] polygon[0].point[20] [ 0.000 0.000 ] # looped polygon[0].filled 1 # differential steering model drive "diff" # unfortunately there doesn't seem to be a car style steering yet, so to make it easy I left it as differential # use the sonar array defined above bot_ir_fixed() # since we put our sensors in a function, call that function to declare them. )