Esempio n. 1
0
import math
import soar.util as util
from soar.util import Pose
import soar.application

#CHANGED: commented out 2 sonar poses
##sonarPoses = [util.Pose(0.08,  0.134,    math.pi/2),
##              util.Pose(0.122, 0.118,    5*math.pi/18),
##              util.Pose(0.15x6, 0.077,    math.pi/6),
##              util.Pose(0.174, 0.0266,   math.pi/18),
##              util.Pose(0.174, -0.0266, -math.pi/18),
##              util.Pose(0.156, -0.077,  -math.pi/6),
##              util.Pose(0.122, -0.118,  -5*math.pi/18),
##              util.Pose(0.08, -0.134,   -math.pi/2)]
sonarPoses = [
    util.Pose(0.073, 0.105, 90 * math.pi / 180),
    util.Pose(0.130, 0.078, 41 * math.pi / 180),
    util.Pose(0.154, 0.030, 15 * math.pi / 180),
    util.Pose(0.154, -0.030, -15 * math.pi / 180),
    util.Pose(0.130, -0.078, -41 * math.pi / 180),
    util.Pose(0.073, -0.105, -90 * math.pi / 180)
]
"""Positions and orientations of sonar sensors with respect to the
              center of the robot."""


class AmigoSonarMonitor():
    def __init__(self, robotPoints, geom=None):
        self.windowHeight = 220
        self.windowWidth = 350
        self.robotScale = 100
Esempio n. 2
0
##              util.Pose(0.174, -0.0266, -math.pi/18),
##              util.Pose(0.156, -0.077,  -math.pi/6),
##              util.Pose(0.122, -0.118,  -5*math.pi/18),
##              util.Pose(0.08, -0.134,   -math.pi/2)]
# TODO: cleanup method of choosing amigobot and eBot
#if soar.application.toolbar.buttons['eBot'].cget('relief') == SUNKEN:

#sonarPoses = [util.Pose(0.4,  -0.12, -90*math.pi/180),
#              util.Pose(0.28,  0.12, -45*math.pi/180),
#              util.Pose(0,     0.29,   0*math.pi/180),
#              util.Pose(-0.28,0.12,   45*math.pi/180),
#              util.Pose(-0.4, -0.12,  90*math.pi/180),
#              util.Pose(0,    -0.29, 180*math.pi/180)]

sonarPoses = [
    util.Pose(-0.012, -0.04, 90 * math.pi / 180),
    util.Pose(0.012, -0.028, 45 * math.pi / 180),
    util.Pose(0.029, 0, 0 * math.pi / 180),
    util.Pose(0.012, 0.028, -45 * math.pi / 180),
    util.Pose(-0.012, 0.04, -90 * math.pi / 180),
    util.Pose(-0.029, 0, 180 * math.pi / 180)
]

#sonarPoses = [util.Pose(0.04,  -0.012, -90*math.pi/180),
#              util.Pose(0.028,  0.012, -45*math.pi/180),
#              util.Pose(0,     0.029,   0*math.pi/180),
#              util.Pose(-0.028,0.012,   45*math.pi/180),
#              util.Pose(-0.04, -0.012,  90*math.pi/180),
#              util.Pose(0,    -0.029, 180*math.pi/180)]
#else:
#sonarPoses = [util.Pose(0.073,  0.105,  90*math.pi/180),
Esempio n. 3
0
import Tkinter
import form.main
import math
import soar.util as util
from soar.util import Pose

sonarPoses = [
    util.Pose(0.08, 0.134, math.pi / 2),
    util.Pose(0.122, 0.118, 5 * math.pi / 18),
    util.Pose(0.156, 0.077, math.pi / 6),
    util.Pose(0.174, 0.0266, math.pi / 18),
    util.Pose(0.174, -0.0266, -math.pi / 18),
    util.Pose(0.156, -0.077, -math.pi / 6),
    util.Pose(0.122, -0.118, -5 * math.pi / 18),
    util.Pose(0.08, -0.134, -math.pi / 2)
]
"""Positions and orientations of sonar sensors with respect to the
              center of the robot."""


class SonarMonitor():
    def __init__(self, robotPoints, geom=None):
        self.windowHeight = 220
        self.windowWidth = 350
        self.robotScale = 100
        self.robotPos = (self.windowWidth / 2.0, self.windowHeight * 5.0 / 6.0)

        def mapPoints((x, y)):
            return (x * self.robotScale + self.robotPos[0],
                    -y * self.robotScale + self.robotPos[1])