Beispiel #1
0
    def __init__(self):

        # Debugging purposes
        self.print_velocities = rospy.get_param('print_velocities')

        # Where and when should you use this?
        self.stop_robot = False

        # Create the needed objects
        self.sonar_aggregation = SonarDataAggregator()
        self.laser_aggregation = LaserDataAggregator()
        self.navigation = Navigation()

        self.linear_velocity = 0
        self.angular_velocity = 0

        self.previous_turn_dir = None

        # Check if the robot moves with target or just wanders
        self.move_with_target = rospy.get_param("calculate_target")

        # The timer produces events for sending the speeds every 110 ms
        rospy.Timer(rospy.Duration(0.11), self.publishSpeeds)
        self.velocity_publisher = rospy.Publisher(
            rospy.get_param('speeds_pub_topic'), Twist, queue_size=10)

        # Obstacle Avoidance state
        self.obstacle_avoidance__active = False
        self.obstacle_avoidance__remaining_steps = 20
    def __init__(self):
        
      # Debugging purposes
      self.print_velocities = rospy.get_param('print_velocities')

      # Where and when should you use this?
      self.stop_robot = False

      # Create the needed objects
      self.sonar_aggregation = SonarDataAggregator()
      self.laser_aggregation = LaserDataAggregator()
      self.navigation  = Navigation()

      self.linear_velocity  = 0
      self.angular_velocity = 0

      # Check if the robot moves with target or just wanders
      self.move_with_target = rospy.get_param("calculate_target")

      # The timer produces events for sending the speeds every 110 ms
      rospy.Timer(rospy.Duration(0.11), self.publishSpeeds)
      self.velocity_publisher = rospy.Publisher(\
              rospy.get_param('speeds_pub_topic'), Twist,\
              queue_size = 10)

      # Read the velocities architecture
      self.velocity_arch = rospy.get_param("velocities_architecture")
      print "The selected velocities architecture is " + self.velocity_arch
    def __init__(self):

        self.print_velocities = rospy.get_param('print_velocities')     # For Printing Velocity Calculated
        self.debug = rospy.get_param('debug')   # For Debugging
        self.move_with_target = rospy.get_param("calculate_target")     # Robot moves with target or just wanders
        self.initial_turn = rospy.get_param('initial_turn')     # Perform a 360 turn when starting

        # Where and when should you use this?
        self.stop_robot = False
        self.sonar_on = False

        # Create the needed Objects
        self.laser_aggregation = LaserDataAggregator()
        self.navigation = Navigation()
        if self.sonar_on:
            self.sonar_aggregation = SonarDataAggregator()  # Enable this if Robot has Sonar!

        # Speed Parameters for Turtlebot
        self.linear_velocity = 0
        self.angular_velocity = 0
        self.low_turn_limit = 4.2
        self.max_linear_velocity = rospy.get_param('max_linear_speed')
        self.max_angular_velocity = rospy.get_param('max_angular_speed')

        # The Timer Produces Events for Sending Speeds Every 110 ms
        rospy.Timer(rospy.Duration(0.11), self.publishSpeeds)

        # The Turtlebot Speed Publisher Topic
        self.velocity_publisher = rospy.Publisher(rospy.get_param('turtlebot_speeds_topic'),
                                                  Twist, queue_size = 10)
 def __init__(self, selection_method):
     self.goals_position = []
     self.goals_value = []
     self.omega = 0.0
     self.radius = 0
     self.method = selection_method
     self.previous_target = []
     self.brush = Brushfires()
     self.topo = Topology()
     self.path_planning = PathPlanning()
     self.previous_target.append(50)
     self.previous_target.append(50)
     self.node2_index_x = 0
     self.node2_index_y = 0
     self.sonar = SonarDataAggregator()
     self.timeout_happened = 0