From be8eab240fd3c765f8198bcac37d2a2c84e94790 Mon Sep 17 00:00:00 2001 From: 24thomast Date: Sat, 31 Dec 2022 20:10:15 +0800 Subject: [PATCH 1/3] Reset - End of the Year Challenge Final Submission --- .DS_Store | Bin 0 -> 6148 bytes .../rcj_soccer_ball/rcj_soccer_ball.py | 2 +- .../referee/consts.py | 4 +- .../referee/progress_checker.py | 2 +- .../rcj_soccer_team_blue/rcj_soccer_robot.py | 40 +- controllers/rcj_soccer_team_blue/robot1.py | 46 +- controllers/rcj_soccer_team_blue/robot2.py | 49 +- controllers/rcj_soccer_team_blue/robot3.py | 46 +- .../rcj_soccer_robot.py | 46 +- controllers/rcj_soccer_team_yellow/robot1.py | 46 +- controllers/rcj_soccer_team_yellow/robot2.py | 46 +- controllers/rcj_soccer_team_yellow/robot3.py | 46 +- docs/docs/how_to_robot.md | 50 +- run-in-docker.sh | 0 worlds/.soccer1.wbproj | 9 + worlds/.soccer2.wbproj | 9 + worlds/.soccer3.wbproj | 9 + worlds/.soccer4.wbproj | 9 + worlds/.soccer5.wbproj | 8 + worlds/.soccer6.wbproj | 9 + worlds/soccer.wbt | 1492 ++++++++++++----- worlds/soccer/Robot Shape.mtl | 9 + worlds/soccer/Robot Shape.obj | 193 +++ 23 files changed, 1675 insertions(+), 495 deletions(-) create mode 100644 .DS_Store mode change 100755 => 100644 run-in-docker.sh create mode 100644 worlds/.soccer1.wbproj create mode 100644 worlds/.soccer2.wbproj create mode 100644 worlds/.soccer3.wbproj create mode 100644 worlds/.soccer4.wbproj create mode 100644 worlds/.soccer5.wbproj create mode 100644 worlds/.soccer6.wbproj create mode 100644 worlds/soccer/Robot Shape.mtl create mode 100644 worlds/soccer/Robot Shape.obj diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..5008ddfcf53c02e82d7eee2e57c38e5672ef89f6 GIT binary patch literal 6148 zcmeH~Jr2S!425mzP>H1@V-^m;4Wg<&0T*E43hX&L&p$$qDprKhvt+--jT7}7np#A3 zem<@ulZcFPQ@L2!n>{z**++&mCkOWA81W14cNZlEfg7;MkzE(HCqgga^y>{tEnwC%0;vJ&^%eQ zLs35+`xjp>T0 bool: """ s = sum(self.samples) - # We we haven't tracked at least as many samples as the number of + # We haven't tracked at least as many samples as the number of # steps, our default position is "benefit of doubt": we assume enough # progress has been made. if self.iterator < self.steps: diff --git a/controllers/rcj_soccer_team_blue/rcj_soccer_robot.py b/controllers/rcj_soccer_team_blue/rcj_soccer_robot.py index 741b1ee9..389a7f6a 100644 --- a/controllers/rcj_soccer_team_blue/rcj_soccer_robot.py +++ b/controllers/rcj_soccer_team_blue/rcj_soccer_robot.py @@ -1,7 +1,7 @@ import math import struct -TIME_STEP = 32 +TIME_STEP = 8 ROBOT_NAMES = ["B1", "B2", "B3", "Y1", "Y2", "Y3"] N_ROBOTS = len(ROBOT_NAMES) @@ -38,14 +38,26 @@ def __init__(self, robot): self.sonar_back = self.robot.getDevice("distancesensor back") self.sonar_back.enable(TIME_STEP) - self.left_motor = self.robot.getDevice("left wheel motor") - self.right_motor = self.robot.getDevice("right wheel motor") - - self.left_motor.setPosition(float("+inf")) - self.right_motor.setPosition(float("+inf")) - - self.left_motor.setVelocity(0.0) - self.right_motor.setVelocity(0.0) + self.front_left_motor = self.robot.getDevice("front left motor") + self.front_right_motor = self.robot.getDevice("front right motor") + self.rear_left_motor = self.robot.getDevice("rear left motor") + self.rear_right_motor = self.robot.getDevice("rear right motor") + self.dribbler_motor = self.robot.getDevice("dribbler motor") + self.kicker_motor = self.robot.getDevice("kicker motor") + + self.front_left_motor.setPosition(float("+inf")) + self.front_right_motor.setPosition(float("+inf")) + self.rear_left_motor.setPosition(float("+inf")) + self.rear_right_motor.setPosition(float("+inf")) + self.dribbler_motor.setPosition(float("+inf")) + self.kicker_motor.setPosition(0) + + self.front_left_motor.setVelocity(0.0) + self.front_right_motor.setVelocity(0.0) + self.rear_left_motor.setVelocity(0.0) + self.rear_right_motor.setVelocity(0.0) + self.dribbler_motor.setVelocity(0.0) + self.kicker_motor.setVelocity(5.0) def parse_supervisor_msg(self, packet: str) -> dict: """Parse message received from supervisor @@ -139,6 +151,7 @@ def get_new_ball_data(self) -> dict: } """ _ = self.ball_receiver.getData() + data = { "direction": self.ball_receiver.getEmitterDirection(), "strength": self.ball_receiver.getSignalStrength(), @@ -191,5 +204,14 @@ def get_sonar_values(self) -> dict: "back": self.sonar_back.getValue(), } + + def kick_ball(self, state, velocity=20): + if state == 1: + self.kicker_motor.setVelocity(velocity) + self.kicker_motor.setPosition(0.042) + elif state == 0: + self.kicker_motor.setVelocity(velocity) + self.kicker_motor.setPosition(0) + def run(self): raise NotImplementedError diff --git a/controllers/rcj_soccer_team_blue/robot1.py b/controllers/rcj_soccer_team_blue/robot1.py index 8368686d..a6950ac9 100644 --- a/controllers/rcj_soccer_team_blue/robot1.py +++ b/controllers/rcj_soccer_team_blue/robot1.py @@ -7,10 +7,11 @@ import utils from rcj_soccer_robot import RCJSoccerRobot, TIME_STEP - class MyRobot1(RCJSoccerRobot): def run(self): + kick_time = 0 while self.robot.step(TIME_STEP) != -1: + kick_time += TIME_STEP # Time in milliseconds if self.is_new_data(): data = self.get_new_data() # noqa: F841 @@ -22,8 +23,10 @@ def run(self): ball_data = self.get_new_ball_data() else: # If the robot does not see the ball, stop motors - self.left_motor.setVelocity(0) - self.right_motor.setVelocity(0) + self.front_left_motor.setVelocity(0.0) + self.front_right_motor.setVelocity(0.0) + self.rear_left_motor.setVelocity(0.0) + self.rear_right_motor.setVelocity(0.0) continue # Get data from compass @@ -38,18 +41,37 @@ def run(self): # Compute the speed for motors direction = utils.get_direction(ball_data["direction"]) - # If the robot has the ball right in front of it, go forward, - # rotate otherwise + """ + Wheel motors (max velocity: 40, +: counterclockwise, -: clockwise) + Dribbler motor (max velocity: 50, +: hold, -: release) + Kicker motor (max velocity: 20, state 1: out, state 0: in, call kickBall function) + """ + + # If the robot has the ball right in front of it, go forward, rotate otherwise + # Set the speed to motors if direction == 0: - left_speed = 7 - right_speed = 7 + move_speed = 40 + self.front_left_motor.setVelocity(move_speed) + self.rear_left_motor.setVelocity(move_speed) + self.front_right_motor.setVelocity(-move_speed) + self.rear_right_motor.setVelocity(-move_speed) else: - left_speed = direction * 4 - right_speed = direction * -4 + turn_speed = -direction * 20 + self.front_left_motor.setVelocity(turn_speed) + self.rear_left_motor.setVelocity(turn_speed) + self.front_right_motor.setVelocity(turn_speed) + self.rear_right_motor.setVelocity(turn_speed) - # Set the speed to motors - self.left_motor.setVelocity(left_speed) - self.right_motor.setVelocity(right_speed) + # Dribble the ball at a velocity of 50 + self.dribbler_motor.setVelocity(50) + + # Kick the ball for 0.5 seconds every 5 seconds + if 5000 < kick_time < 5500: + self.kick_ball(1, 20) + elif kick_time > 5500: + kick_time = 0 + else: + self.kick_ball(0, 20) # Send message to team robots self.send_data_to_team(self.player_id) diff --git a/controllers/rcj_soccer_team_blue/robot2.py b/controllers/rcj_soccer_team_blue/robot2.py index 28371fd5..6edc0b6b 100644 --- a/controllers/rcj_soccer_team_blue/robot2.py +++ b/controllers/rcj_soccer_team_blue/robot2.py @@ -7,10 +7,11 @@ import utils from rcj_soccer_robot import RCJSoccerRobot, TIME_STEP - class MyRobot2(RCJSoccerRobot): def run(self): + kick_time = 0 while self.robot.step(TIME_STEP) != -1: + kick_time += TIME_STEP # Time in milliseconds if self.is_new_data(): data = self.get_new_data() # noqa: F841 @@ -22,8 +23,10 @@ def run(self): ball_data = self.get_new_ball_data() else: # If the robot does not see the ball, stop motors - self.left_motor.setVelocity(0) - self.right_motor.setVelocity(0) + self.front_left_motor.setVelocity(0.0) + self.front_right_motor.setVelocity(0.0) + self.rear_left_motor.setVelocity(0.0) + self.rear_right_motor.setVelocity(0.0) continue # Get data from compass @@ -32,21 +35,43 @@ def run(self): # Get GPS coordinates of the robot robot_pos = self.get_gps_coordinates() # noqa: F841 + # Get data from sonars + sonar_values = self.get_sonar_values() # noqa: F841 + # Compute the speed for motors direction = utils.get_direction(ball_data["direction"]) - # If the robot has the ball right in front of it, go forward, - # rotate otherwise + """ + Wheel motors (max velocity: 40, +: counterclockwise, -: clockwise) + Dribbler motor (max velocity: 50, +: hold, -: release) + Kicker motor (max velocity: 20, state 1: out, state 0: in, call kickBall function) + """ + + # If the robot has the ball right in front of it, go forward, rotate otherwise + # Set the speed to motors if direction == 0: - left_speed = 7 - right_speed = 7 + move_speed = 40 + self.front_left_motor.setVelocity(move_speed) + self.rear_left_motor.setVelocity(move_speed) + self.front_right_motor.setVelocity(-move_speed) + self.rear_right_motor.setVelocity(-move_speed) else: - left_speed = direction * 4 - right_speed = direction * -4 + turn_speed = -direction * 20 + self.front_left_motor.setVelocity(turn_speed) + self.rear_left_motor.setVelocity(turn_speed) + self.front_right_motor.setVelocity(turn_speed) + self.rear_right_motor.setVelocity(turn_speed) - # Set the speed to motors - self.left_motor.setVelocity(left_speed) - self.right_motor.setVelocity(right_speed) + # Dribble the ball at a velocity of 50 + self.dribbler_motor.setVelocity(50) + + # Kick the ball for 0.5 seconds every 5 seconds + if 5000 < kick_time < 5500: + self.kick_ball(1, 20) + elif kick_time > 5500: + kick_time = 0 + else: + self.kick_ball(0, 20) # Send message to team robots self.send_data_to_team(self.player_id) diff --git a/controllers/rcj_soccer_team_blue/robot3.py b/controllers/rcj_soccer_team_blue/robot3.py index c1680572..300a5948 100644 --- a/controllers/rcj_soccer_team_blue/robot3.py +++ b/controllers/rcj_soccer_team_blue/robot3.py @@ -7,10 +7,11 @@ import utils from rcj_soccer_robot import RCJSoccerRobot, TIME_STEP - class MyRobot3(RCJSoccerRobot): def run(self): + kick_time = 0 while self.robot.step(TIME_STEP) != -1: + kick_time += TIME_STEP # Time in milliseconds if self.is_new_data(): data = self.get_new_data() # noqa: F841 @@ -22,8 +23,10 @@ def run(self): ball_data = self.get_new_ball_data() else: # If the robot does not see the ball, stop motors - self.left_motor.setVelocity(0) - self.right_motor.setVelocity(0) + self.front_left_motor.setVelocity(0.0) + self.front_right_motor.setVelocity(0.0) + self.rear_left_motor.setVelocity(0.0) + self.rear_right_motor.setVelocity(0.0) continue # Get data from compass @@ -38,18 +41,37 @@ def run(self): # Compute the speed for motors direction = utils.get_direction(ball_data["direction"]) - # If the robot has the ball right in front of it, go forward, - # rotate otherwise + """ + Wheel motors (max velocity: 40, +: counterclockwise, -: clockwise) + Dribbler motor (max velocity: 50, +: hold, -: release) + Kicker motor (max velocity: 20, state 1: out, state 0: in, call kickBall function) + """ + + # If the robot has the ball right in front of it, go forward, rotate otherwise + # Set the speed to motors if direction == 0: - left_speed = 7 - right_speed = 7 + move_speed = 40 + self.front_left_motor.setVelocity(move_speed) + self.rear_left_motor.setVelocity(move_speed) + self.front_right_motor.setVelocity(-move_speed) + self.rear_right_motor.setVelocity(-move_speed) else: - left_speed = direction * 4 - right_speed = direction * -4 + turn_speed = -direction * 20 + self.front_left_motor.setVelocity(turn_speed) + self.rear_left_motor.setVelocity(turn_speed) + self.front_right_motor.setVelocity(turn_speed) + self.rear_right_motor.setVelocity(turn_speed) - # Set the speed to motors - self.left_motor.setVelocity(left_speed) - self.right_motor.setVelocity(right_speed) + # Dribble the ball at a velocity of 50 + self.dribbler_motor.setVelocity(50) + + # Kick the ball for 0.5 seconds every 5 seconds + if 5000 < kick_time < 5500: + self.kick_ball(1, 20) + elif kick_time > 5500: + kick_time = 0 + else: + self.kick_ball(0, 20) # Send message to team robots self.send_data_to_team(self.player_id) diff --git a/controllers/rcj_soccer_team_yellow/rcj_soccer_robot.py b/controllers/rcj_soccer_team_yellow/rcj_soccer_robot.py index 417ca09d..389a7f6a 100644 --- a/controllers/rcj_soccer_team_yellow/rcj_soccer_robot.py +++ b/controllers/rcj_soccer_team_yellow/rcj_soccer_robot.py @@ -1,7 +1,7 @@ import math import struct -TIME_STEP = 32 +TIME_STEP = 8 ROBOT_NAMES = ["B1", "B2", "B3", "Y1", "Y2", "Y3"] N_ROBOTS = len(ROBOT_NAMES) @@ -38,14 +38,26 @@ def __init__(self, robot): self.sonar_back = self.robot.getDevice("distancesensor back") self.sonar_back.enable(TIME_STEP) - self.left_motor = self.robot.getDevice("left wheel motor") - self.right_motor = self.robot.getDevice("right wheel motor") - - self.left_motor.setPosition(float("+inf")) - self.right_motor.setPosition(float("+inf")) - - self.left_motor.setVelocity(0.0) - self.right_motor.setVelocity(0.0) + self.front_left_motor = self.robot.getDevice("front left motor") + self.front_right_motor = self.robot.getDevice("front right motor") + self.rear_left_motor = self.robot.getDevice("rear left motor") + self.rear_right_motor = self.robot.getDevice("rear right motor") + self.dribbler_motor = self.robot.getDevice("dribbler motor") + self.kicker_motor = self.robot.getDevice("kicker motor") + + self.front_left_motor.setPosition(float("+inf")) + self.front_right_motor.setPosition(float("+inf")) + self.rear_left_motor.setPosition(float("+inf")) + self.rear_right_motor.setPosition(float("+inf")) + self.dribbler_motor.setPosition(float("+inf")) + self.kicker_motor.setPosition(0) + + self.front_left_motor.setVelocity(0.0) + self.front_right_motor.setVelocity(0.0) + self.rear_left_motor.setVelocity(0.0) + self.rear_right_motor.setVelocity(0.0) + self.dribbler_motor.setVelocity(0.0) + self.kicker_motor.setVelocity(5.0) def parse_supervisor_msg(self, packet: str) -> dict: """Parse message received from supervisor @@ -72,6 +84,7 @@ def get_new_data(self) -> dict: """ packet = self.receiver.getData() self.receiver.nextPacket() + return self.parse_supervisor_msg(packet) def is_new_data(self) -> bool: @@ -138,6 +151,7 @@ def get_new_ball_data(self) -> dict: } """ _ = self.ball_receiver.getData() + data = { "direction": self.ball_receiver.getEmitterDirection(), "strength": self.ball_receiver.getSignalStrength(), @@ -170,9 +184,8 @@ def get_compass_heading(self) -> float: """ compass_values = self.compass.getValues() - # Subtract math.pi/2 (90) so that the heading 0 means that - # robot is facing opponent's goal - rad = math.atan2(compass_values[0], compass_values[1]) - (math.pi / 2) + # Add math.pi/2 (90) so that the heading 0 is facing opponent's goal + rad = math.atan2(compass_values[0], compass_values[1]) + (math.pi / 2) if rad < -math.pi: rad = rad + (2 * math.pi) @@ -191,5 +204,14 @@ def get_sonar_values(self) -> dict: "back": self.sonar_back.getValue(), } + + def kick_ball(self, state, velocity=20): + if state == 1: + self.kicker_motor.setVelocity(velocity) + self.kicker_motor.setPosition(0.042) + elif state == 0: + self.kicker_motor.setVelocity(velocity) + self.kicker_motor.setPosition(0) + def run(self): raise NotImplementedError diff --git a/controllers/rcj_soccer_team_yellow/robot1.py b/controllers/rcj_soccer_team_yellow/robot1.py index d423f472..d2f40baa 100644 --- a/controllers/rcj_soccer_team_yellow/robot1.py +++ b/controllers/rcj_soccer_team_yellow/robot1.py @@ -7,10 +7,11 @@ import utils from rcj_soccer_robot import RCJSoccerRobot, TIME_STEP - class MyRobot1(RCJSoccerRobot): def run(self): + kick_time = 0 while self.robot.step(TIME_STEP) != -1: + kick_time += TIME_STEP # Time in milliseconds if self.is_new_data(): data = self.get_new_data() # noqa: F841 @@ -22,8 +23,10 @@ def run(self): ball_data = self.get_new_ball_data() else: # If the robot does not see the ball, stop motors - self.left_motor.setVelocity(0) - self.right_motor.setVelocity(0) + self.front_left_motor.setVelocity(0.0) + self.front_right_motor.setVelocity(0.0) + self.rear_left_motor.setVelocity(0.0) + self.rear_right_motor.setVelocity(0.0) continue # Get data from compass @@ -38,18 +41,37 @@ def run(self): # Compute the speed for motors direction = utils.get_direction(ball_data["direction"]) - # If the robot has the ball right in front of it, go forward, - # rotate otherwise + """ + Wheel motors (max velocity: 40, +: counterclockwise, -: clockwise) + Dribbler motor (max velocity: 50, +: hold, -: release) + Kicker motor (max velocity: 20, state 1: out, state 0: in, call kickBall function) + """ + + # If the robot has the ball right in front of it, go forward, rotate otherwise + # Set the speed to motors if direction == 0: - left_speed = 7 - right_speed = 7 + move_speed = 40 + self.front_left_motor.setVelocity(move_speed) + self.rear_left_motor.setVelocity(move_speed) + self.front_right_motor.setVelocity(-move_speed) + self.rear_right_motor.setVelocity(-move_speed) else: - left_speed = direction * 4 - right_speed = direction * -4 + turn_speed = -direction * 20 + self.front_left_motor.setVelocity(turn_speed) + self.rear_left_motor.setVelocity(turn_speed) + self.front_right_motor.setVelocity(turn_speed) + self.rear_right_motor.setVelocity(turn_speed) - # Set the speed to motors - self.left_motor.setVelocity(left_speed) - self.right_motor.setVelocity(right_speed) + # Dribble the ball at a velocity of 50 + self.dribbler_motor.setVelocity(50) + + # Kick the ball for 0.5 seconds every 5 seconds + if 5000 < kick_time < 5500: + self.kick_ball(1, 20) + elif kick_time > 5500: + kick_time = 0 + else: + self.kick_ball(0, 20) # Send message to team robots self.send_data_to_team(self.player_id) diff --git a/controllers/rcj_soccer_team_yellow/robot2.py b/controllers/rcj_soccer_team_yellow/robot2.py index 323ecf3e..b5d507ac 100644 --- a/controllers/rcj_soccer_team_yellow/robot2.py +++ b/controllers/rcj_soccer_team_yellow/robot2.py @@ -7,10 +7,11 @@ import utils from rcj_soccer_robot import RCJSoccerRobot, TIME_STEP - class MyRobot2(RCJSoccerRobot): def run(self): + kick_time = 0 while self.robot.step(TIME_STEP) != -1: + kick_time += TIME_STEP # Time in milliseconds if self.is_new_data(): data = self.get_new_data() # noqa: F841 @@ -22,8 +23,10 @@ def run(self): ball_data = self.get_new_ball_data() else: # If the robot does not see the ball, stop motors - self.left_motor.setVelocity(0) - self.right_motor.setVelocity(0) + self.front_left_motor.setVelocity(0.0) + self.front_right_motor.setVelocity(0.0) + self.rear_left_motor.setVelocity(0.0) + self.rear_right_motor.setVelocity(0.0) continue # Get data from compass @@ -38,18 +41,37 @@ def run(self): # Compute the speed for motors direction = utils.get_direction(ball_data["direction"]) - # If the robot has the ball right in front of it, go forward, - # rotate otherwise + """ + Wheel motors (max velocity: 40, +: counterclockwise, -: clockwise) + Dribbler motor (max velocity: 50, +: hold, -: release) + Kicker motor (max velocity: 20, state 1: out, state 0: in, call kickBall function) + """ + + # If the robot has the ball right in front of it, go forward, rotate otherwise + # Set the speed to motors if direction == 0: - left_speed = 7 - right_speed = 7 + move_speed = 40 + self.front_left_motor.setVelocity(move_speed) + self.rear_left_motor.setVelocity(move_speed) + self.front_right_motor.setVelocity(-move_speed) + self.rear_right_motor.setVelocity(-move_speed) else: - left_speed = direction * 4 - right_speed = direction * -4 + turn_speed = -direction * 20 + self.front_left_motor.setVelocity(turn_speed) + self.rear_left_motor.setVelocity(turn_speed) + self.front_right_motor.setVelocity(turn_speed) + self.rear_right_motor.setVelocity(turn_speed) - # Set the speed to motors - self.left_motor.setVelocity(left_speed) - self.right_motor.setVelocity(right_speed) + # Dribble the ball at a velocity of 50 + self.dribbler_motor.setVelocity(50) + + # Kick the ball for 0.5 seconds every 5 seconds + if 5000 < kick_time < 5500: + self.kick_ball(1, 20) + elif kick_time > 5500: + kick_time = 0 + else: + self.kick_ball(0, 20) # Send message to team robots self.send_data_to_team(self.player_id) diff --git a/controllers/rcj_soccer_team_yellow/robot3.py b/controllers/rcj_soccer_team_yellow/robot3.py index 746c46ea..fc1b8d74 100644 --- a/controllers/rcj_soccer_team_yellow/robot3.py +++ b/controllers/rcj_soccer_team_yellow/robot3.py @@ -7,10 +7,11 @@ import utils from rcj_soccer_robot import RCJSoccerRobot, TIME_STEP - class MyRobot3(RCJSoccerRobot): def run(self): + kick_time = 0 while self.robot.step(TIME_STEP) != -1: + kick_time += TIME_STEP # Time in milliseconds if self.is_new_data(): data = self.get_new_data() # noqa: F841 @@ -22,8 +23,10 @@ def run(self): ball_data = self.get_new_ball_data() else: # If the robot does not see the ball, stop motors - self.left_motor.setVelocity(0) - self.right_motor.setVelocity(0) + self.front_left_motor.setVelocity(0.0) + self.front_right_motor.setVelocity(0.0) + self.rear_left_motor.setVelocity(0.0) + self.rear_right_motor.setVelocity(0.0) continue # Get data from compass @@ -38,18 +41,37 @@ def run(self): # Compute the speed for motors direction = utils.get_direction(ball_data["direction"]) - # If the robot has the ball right in front of it, go forward, - # rotate otherwise + """ + Wheel motors (max velocity: 40, +: counterclockwise, -: clockwise) + Dribbler motor (max velocity: 50, +: hold, -: release) + Kicker motor (max velocity: 20, state 1: out, state 0: in, call kickBall function) + """ + + # If the robot has the ball right in front of it, go forward, rotate otherwise + # Set the speed to motors if direction == 0: - left_speed = 7 - right_speed = 7 + move_speed = 40 + self.front_left_motor.setVelocity(move_speed) + self.rear_left_motor.setVelocity(move_speed) + self.front_right_motor.setVelocity(-move_speed) + self.rear_right_motor.setVelocity(-move_speed) else: - left_speed = direction * 4 - right_speed = direction * -4 + turn_speed = -direction * 20 + self.front_left_motor.setVelocity(turn_speed) + self.rear_left_motor.setVelocity(turn_speed) + self.front_right_motor.setVelocity(turn_speed) + self.rear_right_motor.setVelocity(turn_speed) - # Set the speed to motors - self.left_motor.setVelocity(left_speed) - self.right_motor.setVelocity(right_speed) + # Dribble the ball at a velocity of 50 + self.dribbler_motor.setVelocity(50) + + # Kick the ball for 0.5 seconds every 5 seconds + if 5000 < kick_time < 5500: + self.kick_ball(1, 20) + elif kick_time > 5500: + kick_time = 0 + else: + self.kick_ball(0, 20) # Send message to team robots self.send_data_to_team(self.player_id) diff --git a/docs/docs/how_to_robot.md b/docs/docs/how_to_robot.md index 9d63ac11..c58fc1b3 100644 --- a/docs/docs/how_to_robot.md +++ b/docs/docs/how_to_robot.md @@ -102,7 +102,7 @@ Let's put together a simple program to showcase how you can go about programming ```python import struct -TIME_STEP = 32 +TIME_STEP = 8 ROBOT_NAMES = ["B1", "B2", "B3", "Y1", "Y2", "Y3"] N_ROBOTS = len(ROBOT_NAMES) @@ -111,10 +111,16 @@ class MyRobot: def __init__(self, robot): self.robot = robot self.name = self.robot.getName() + self.team = self.name[0] + self.player_id = int(self.name[1]) self.receiver = self.robot.getDevice("supervisor receiver") self.receiver.enable(TIME_STEP) + self.team_emitter = self.robot.getDevice("team emitter") + self.team_receiver = self.robot.getDevice("team receiver") + self.team_receiver.enable(TIME_STEP) + self.ball_receiver = self.robot.getDevice("ball receiver") self.ball_receiver.enable(TIME_STEP) @@ -133,14 +139,26 @@ class MyRobot: self.sonar_back = self.robot.getDevice("distancesensor back") self.sonar_back.enable(TIME_STEP) - self.left_motor = self.robot.getDevice("left wheel motor") - self.right_motor = self.robot.getDevice("right wheel motor") - - self.left_motor.setPosition(float('+inf')) - self.right_motor.setPosition(float('+inf')) - - self.left_motor.setVelocity(0.0) - self.right_motor.setVelocity(0.0) + self.front_left_motor = self.robot.getDevice("front left motor") + self.front_right_motor = self.robot.getDevice("front right motor") + self.rear_left_motor = self.robot.getDevice("rear left motor") + self.rear_right_motor = self.robot.getDevice("rear right motor") + self.dribbler_motor = self.robot.getDevice("dribbler motor") + self.kicker_motor = self.robot.getDevice("kicker motor") + + self.front_left_motor.setPosition(float("+inf")) + self.front_right_motor.setPosition(float("+inf")) + self.rear_left_motor.setPosition(float("+inf")) + self.rear_right_motor.setPosition(float("+inf")) + self.dribbler_motor.setPosition(float("+inf")) + self.kicker_motor.setPosition(0) + + self.front_left_motor.setVelocity(0.0) + self.front_right_motor.setVelocity(0.0) + self.rear_left_motor.setVelocity(0.0) + self.rear_right_motor.setVelocity(0.0) + self.dribbler_motor.setVelocity(0.0) + self.kicker_motor.setVelocity(5.0) def get_new_data(self): packet = self.receiver.getData() @@ -172,8 +190,10 @@ class MyRobot: if self.is_new_ball_data(): ball_data = self.get_new_ball_data() - self.left_motor.setVelocity(1) - self.right_motor.setVelocity(-1) + self.front_left_motor.setVelocity(10) + self.rear_left_motor.setVelocity(10) + self.front_right_motor.setVelocity(-10) + self.rear_right_motor.setVelocity(-10) ``` Let's explain the code in detail: @@ -186,7 +206,7 @@ This library is a [built-in Python library](https://docs.python.org/3/library/st which is required to unpack the data sent by the supervisor. ```python -TIME_STEP = 32 +TIME_STEP = 8 ROBOT_NAMES = ["B1", "B2", "B3", "Y1", "Y2", "Y3"] N_ROBOTS = len(ROBOT_NAMES) ``` @@ -262,8 +282,10 @@ sonar_values = self.get_sonar_values() if self.is_new_ball_data(): ball_data = self.get_new_ball_data() -self.left_motor.setVelocity(1) -self.right_motor.setVelocity(-1) +self.front_left_motor.setVelocity(10) +self.rear_left_motor.setVelocity(10) +self.front_right_motor.setVelocity(-10) +self.rear_right_motor.setVelocity(-10) ``` And finally, after reading the new data received from supervisor as well as data diff --git a/run-in-docker.sh b/run-in-docker.sh old mode 100755 new mode 100644 diff --git a/worlds/.soccer1.wbproj b/worlds/.soccer1.wbproj new file mode 100644 index 00000000..1bb64aa7 --- /dev/null +++ b/worlds/.soccer1.wbproj @@ -0,0 +1,9 @@ +Webots Project File version R2023a +perspectives: 000000ff00000000fd00000002000000010000011c00000549fc0200000001fb0000001400540065007800740045006400690074006f0072000000001a000005490000004200ffffff0000000300000a000000014afc0100000001fb0000001a0043006f006e0073006f006c00650041006c006c0041006c006c010000000000000a000000006900ffffff00000a00000003fd00000001000000020000000100000008fc00000000 +simulationViewPerspectives: 000000ff0000000100000002000001d8000008260100000002010000000100 +sceneTreePerspectives: 000000ff000000010000000300000022000000c0000000fa0100000002010000000200 +maximizedDockId: -1 +centralWidgetVisible: 1 +orthographicViewHeight: 1 +textFiles: -1 +consoles: Console:All:All diff --git a/worlds/.soccer2.wbproj b/worlds/.soccer2.wbproj new file mode 100644 index 00000000..e227b67e --- /dev/null +++ b/worlds/.soccer2.wbproj @@ -0,0 +1,9 @@ +Webots Project File version R2023a +perspectives: 000000ff00000000fd00000002000000010000011c00000549fc0200000001fb0000001400540065007800740045006400690074006f0072000000001a000005490000004200ffffff0000000300000a000000014afc0100000001fb0000001a0043006f006e0073006f006c00650041006c006c0041006c006c010000000000000a000000006900ffffff00000a000000040500000001000000020000000100000008fc00000000 +simulationViewPerspectives: 000000ff0000000100000002000001d8000008260100000002010000000100 +sceneTreePerspectives: 000000ff000000010000000300000022000000c0000000fa0100000002010000000200 +maximizedDockId: -1 +centralWidgetVisible: 1 +orthographicViewHeight: 1 +textFiles: -1 +consoles: Console:All:All diff --git a/worlds/.soccer3.wbproj b/worlds/.soccer3.wbproj new file mode 100644 index 00000000..1bb64aa7 --- /dev/null +++ b/worlds/.soccer3.wbproj @@ -0,0 +1,9 @@ +Webots Project File version R2023a +perspectives: 000000ff00000000fd00000002000000010000011c00000549fc0200000001fb0000001400540065007800740045006400690074006f0072000000001a000005490000004200ffffff0000000300000a000000014afc0100000001fb0000001a0043006f006e0073006f006c00650041006c006c0041006c006c010000000000000a000000006900ffffff00000a00000003fd00000001000000020000000100000008fc00000000 +simulationViewPerspectives: 000000ff0000000100000002000001d8000008260100000002010000000100 +sceneTreePerspectives: 000000ff000000010000000300000022000000c0000000fa0100000002010000000200 +maximizedDockId: -1 +centralWidgetVisible: 1 +orthographicViewHeight: 1 +textFiles: -1 +consoles: Console:All:All diff --git a/worlds/.soccer4.wbproj b/worlds/.soccer4.wbproj new file mode 100644 index 00000000..1bb64aa7 --- /dev/null +++ b/worlds/.soccer4.wbproj @@ -0,0 +1,9 @@ +Webots Project File version R2023a +perspectives: 000000ff00000000fd00000002000000010000011c00000549fc0200000001fb0000001400540065007800740045006400690074006f0072000000001a000005490000004200ffffff0000000300000a000000014afc0100000001fb0000001a0043006f006e0073006f006c00650041006c006c0041006c006c010000000000000a000000006900ffffff00000a00000003fd00000001000000020000000100000008fc00000000 +simulationViewPerspectives: 000000ff0000000100000002000001d8000008260100000002010000000100 +sceneTreePerspectives: 000000ff000000010000000300000022000000c0000000fa0100000002010000000200 +maximizedDockId: -1 +centralWidgetVisible: 1 +orthographicViewHeight: 1 +textFiles: -1 +consoles: Console:All:All diff --git a/worlds/.soccer5.wbproj b/worlds/.soccer5.wbproj new file mode 100644 index 00000000..f1fa97ac --- /dev/null +++ b/worlds/.soccer5.wbproj @@ -0,0 +1,8 @@ +Webots Project File version R2023a +perspectives: 000000ff00000000fd00000002000000010000011c00000549fc0200000001fb0000001400540065007800740045006400690074006f0072000000001a000005490000004200ffffff0000000300000a000000014afc0100000001fb0000001a0043006f006e0073006f006c00650041006c006c0041006c006c010000000000000a00000000000000000000000a000000054900000001000000020000000100000008fc00000000 +simulationViewPerspectives: 000000ff0000000100000002000001d8000008260100000002010000000100 +sceneTreePerspectives: 000000ff000000010000000300000022000000c0000000fa0100000002010000000200 +maximizedDockId: -1 +centralWidgetVisible: 1 +orthographicViewHeight: 1 +textFiles: -1 diff --git a/worlds/.soccer6.wbproj b/worlds/.soccer6.wbproj new file mode 100644 index 00000000..dc2bb18d --- /dev/null +++ b/worlds/.soccer6.wbproj @@ -0,0 +1,9 @@ +Webots Project File version R2023a +perspectives: 000000ff00000000fd00000002000000010000011c00000549fc0200000001fb0000001400540065007800740045006400690074006f0072000000001a000005490000004200ffffff0000000300000a000000014afc0100000001fb0000001a0043006f006e0073006f006c00650041006c006c0041006c006c010000000000000a000000006900ffffff00000a00000003d300000001000000020000000100000008fc00000000 +simulationViewPerspectives: 000000ff0000000100000002000001d8000008260100000002010000000100 +sceneTreePerspectives: 000000ff000000010000000300000022000000c0000000fa0100000002010000000200 +maximizedDockId: -1 +centralWidgetVisible: 1 +orthographicViewHeight: 1 +textFiles: -1 +consoles: Console:All:All diff --git a/worlds/soccer.wbt b/worlds/soccer.wbt index 335807cf..a3cb7f1f 100644 --- a/worlds/soccer.wbt +++ b/worlds/soccer.wbt @@ -1,14 +1,48 @@ -#VRML_SIM R2022a utf8 +#VRML_SIM R2022b utf8 + +EXTERNPROTO "https://raw.githubusercontent.com/cyberbotics/webots/R2023a/projects/objects/backgrounds/protos/TexturedBackground.proto" +EXTERNPROTO "https://raw.githubusercontent.com/cyberbotics/webots/R2023a/projects/objects/backgrounds/protos/TexturedBackgroundLight.proto" + WorldInfo { info [ "A simple RCJ Soccer game simulated using Webots." ] title "RCJ Soccer Sim" - optimalThreadCount 8 + basicTimeStep 8 + contactProperties [ + ContactProperties { + material1 "ball" + material2 "field" + coulombFriction [ + 1.2 + ] + } + ContactProperties { + material1 "dribbler" + material2 "ball" + coulombFriction [ + -1 + ] + bounce 0 + bounceVelocity 0 + } + ContactProperties { + material1 "field" + material2 "wheel" + coulombFriction [ + 5000 + ] + bounce 0 + bounceVelocity 0 + forceDependentSlip [ + 1 + ] + } + ] } Viewpoint { - orientation -0.3718171524084895 -0.11726675761807528 0.920869433053669 3.706903255785043 - position 1.7483931840718845 1.2701664687979481 1.965968373123659 + orientation -0.7128296450606456 0.0002838054276776868 0.701337163265425 3.1410384086685252 + position -0.089841 7.54142e-05 4.4 } TexturedBackground { } @@ -248,6 +282,7 @@ DEF SOCCER_FIELD Solid { } ] name "soccer field" + contactMaterial "field" boundingObject Group { children [ USE GROUND @@ -388,8 +423,7 @@ DEF SOCCER_FIELD Solid { locked TRUE } DEF BALL Robot { - translation -0.00878554 0.0770576 0.0208079 - rotation 0.7071067811865474 0.7071067811865475 0 -2.62318 + rotation 0.9050378357439983 -0.4251093124058043 -0.013732748366004924 1.6867606192599456 children [ DEF FOOTBALL_SHAPE Shape { appearance PBRAppearance { @@ -407,7 +441,7 @@ DEF BALL Robot { } } geometry Sphere { - radius 0.021 + radius 0.015 subdivision 3 } } @@ -424,6 +458,7 @@ DEF BALL Robot { ] name "soccer ball" model "soccer ball" + contactMaterial "ball" boundingObject USE FOOTBALL_SHAPE physics Physics { density -1 @@ -437,29 +472,29 @@ DEF BALL Robot { synchronization FALSE } DEF B1 Robot { - translation 0.369438 0.409009 0.0374016 - rotation 1.0823634158639528e-06 1.0483773613787562e-06 -0.9999999999988647 1.6026953071807208 + translation 0.26853922009622855 0.3701902491133142 0.0380918 + rotation 0 0 -1 1.5699999999999998 children [ - HingeJoint { + DEF FRONT_LEFT_WHEEL HingeJoint { jointParameters HingeJointParameters { - position -7.771629997904354e-09 - axis 0 1 0 - anchor 0 -0.045 -0.0176 + axis 0.7854 0.7854 0 + anchor 0.0304039 0.0304039 -0.032 } device [ RotationalMotor { - name "left wheel motor" + name "front left motor" + maxVelocity 40 } PositionSensor { - name "left wheel sensor" + name "front left sensor" } ] endPoint Solid { - translation 0 -0.045 -0.0176 - rotation -3.337240149329015e-15 -6.254334002834076e-15 1 1.5707999999999998 + translation 0.030695605419343613 0.030763094468236597 -0.03209706454636311 + rotation -0.2848211437594383 0.6958154303567996 0.6593313301709143 3.7007073125004357 children [ - Transform { - rotation -0.5771969549958951 0.5776567755050862 -0.5771969549958951 2.0939354039397986 + DEF FRONT_LEFT_TRANSFORM Transform { + rotation 0 1 0 1.570796327 children [ DEF WHEEL_SHAPE Shape { appearance PBRAppearance { @@ -467,80 +502,187 @@ DEF B1 Robot { metalness 0 } geometry Cylinder { - height 0.01 - radius 0.02 + height 0.006 + radius 0.0065 } } ] } ] - name "right wheel" - boundingObject Transform { - rotation -0.5771969549958951 0.5776567755050862 -0.5771969549958951 2.0939354039397986 - children [ - USE WHEEL_SHAPE - ] - } + name "front left wheel" + contactMaterial "wheel" + boundingObject USE FRONT_LEFT_TRANSFORM physics DEF WHEEL_PHYSICS Physics { - density -1 - mass 0.005 } } } - HingeJoint { + DEF REAR_LEFT_WHEEL HingeJoint { + jointParameters HingeJointParameters { + axis -0.7854 0.7854 0 + anchor -0.0304039 0.0304039 -0.032 + } + device [ + RotationalMotor { + name "rear left motor" + maxVelocity 40 + } + PositionSensor { + name "rear left sensor" + } + ] + endPoint Solid { + translation -0.030672489460413233 0.030772320041536072 -0.032101226672410846 + rotation -0.918917721027516 0.38243791014011075 -0.09659951795563224 2.7397990222179445 + children [ + DEF REAR_LEFT_TRANSFORM Transform { + rotation 0 1 0 1.570796327 + children [ + USE WHEEL_SHAPE + ] + } + ] + name "rear left wheel" + contactMaterial "wheel" + boundingObject USE REAR_LEFT_TRANSFORM + physics USE WHEEL_PHYSICS + } + } + DEF REAR_RIGHT_WHEEL HingeJoint { + jointParameters HingeJointParameters { + axis -0.7854 -0.7854 0 + anchor -0.0304039 -0.0304039 -0.032 + } + device [ + RotationalMotor { + name "rear right motor" + maxVelocity 40 + } + PositionSensor { + name "rear right sensor" + } + ] + endPoint Solid { + translation -0.03063832259125643 -0.030795288196791226 -0.03229858299402377 + rotation 0.8618727329541556 0.34999226341757 0.3669888387103635 1.626784342800779 + children [ + DEF REAR_RIGHT_TRANSFORM Transform { + rotation 0 1 0 1.570796327 + children [ + USE WHEEL_SHAPE + ] + } + ] + name "rear right wheel" + contactMaterial "wheel" + boundingObject USE REAR_RIGHT_TRANSFORM + physics USE WHEEL_PHYSICS + } + } + DEF FRONT_RIGHT_WHEEL HingeJoint { + jointParameters HingeJointParameters { + axis 0.7854 -0.7854 0 + anchor 0.0304039 -0.0304039 -0.032 + } + device [ + RotationalMotor { + name "front right motor" + maxVelocity 40 + } + PositionSensor { + name "front right sensor" + } + ] + endPoint Solid { + translation 0.030611575570730996 -0.030854408575283092 -0.032009976637865534 + rotation -0.02222349777668641 -0.067090710396049 -0.9974993497366919 3.9566620384683953 + children [ + DEF FRONT_RIGHT_TRANSFORM Transform { + rotation 0 1 0 1.570796327 + children [ + USE WHEEL_SHAPE + ] + } + ] + name "front right wheel" + contactMaterial "wheel" + boundingObject USE FRONT_RIGHT_TRANSFORM + physics USE WHEEL_PHYSICS + } + } + DEF DRIBBLER HingeJoint { jointParameters HingeJointParameters { - position -7.74663356251063e-09 axis 0 1 0 - anchor 0 0.045 -0.0176 + anchor 0.026 0 -0.008 + suspensionAxis 0 0 1 } device [ RotationalMotor { - name "right wheel motor" + name "dribbler motor" + maxVelocity 50 } PositionSensor { - name "right wheel sensor" + name "dribbler sensor" } ] endPoint Solid { - translation 0 0.045 -0.0176 - rotation -6.410229215105164e-15 -3.362702725970239e-15 1 1.5707996938995745 + translation 0.025998987101440007 9.862989322484341e-08 -0.008000329819090136 + rotation -0.7042699741531993 -0.7042842498385091 -0.08937280870410572 3.318905912611113 children [ - Transform { - rotation -0.5771969549958951 0.5776567755050862 -0.5771969549958951 2.0939354039397986 + DEF DRIBBLER_TRANSFORM Transform { + rotation 0 1 0 1.570796327 children [ Shape { - appearance PBRAppearance { - roughness 1 - metalness 0 - } geometry Cylinder { - height 0.01 - radius 0.02 + height 0.045 + radius 0.004 } } ] } ] - name "left wheel" - boundingObject Transform { - rotation -0.5771969549958951 0.5776567755050862 -0.5771969549958951 2.0939354039397986 - children [ - Shape { - appearance PBRAppearance { - roughness 1 - metalness 0 - } - geometry Cylinder { - height 0.01 - radius 0.02 - } + name "dribbler" + contactMaterial "dribbler" + boundingObject USE DRIBBLER_TRANSFORM + physics Physics { + density -1 + mass 0.12 + } + } + } + DEF KICKER SliderJoint { + jointParameters JointParameters { + position 5.551113363043895e-17 + axis 1 0 0 + } + device [ + LinearMotor { + name "kicker motor" + maxVelocity 20 + minPosition -1.3233159677521457e-06 + maxPosition 0.042 + maxForce 10000 + } + PositionSensor { + name "kicker sensor" + } + ] + endPoint Solid { + translation -0.020000060538676423 -0.0004198255103439186 -0.024047867877849537 + rotation -1.1828817079662869e-06 0.9999999999985412 1.2321992147801632e-06 1.5708019984105517 + children [ + DEF KICKER_SHAPE Shape { + geometry Box { + size 0.015 0.03 0.03 } - ] + } + ] + boundingObject USE KICKER_SHAPE + physics Physics { + density 70000 } - physics USE WHEEL_PHYSICS } } - DEF BLUE_ROBOT_SHAPE Shape { + DEF ROBOT_SHAPE Shape { appearance PBRAppearance { baseColorMap ImageTexture { url [ @@ -550,8 +692,10 @@ DEF B1 Robot { roughness 1 metalness 0 } - geometry Box { - size 0.075 0.075 0.075 + geometry Mesh { + url [ + "soccer/Robot Shape.obj" + ] } } Solid { @@ -690,38 +834,42 @@ DEF B1 Robot { } ] name "B1" - boundingObject USE BLUE_ROBOT_SHAPE + boundingObject USE ROBOT_SHAPE physics DEF ROBOT_PHYSICS Physics { - density -1 - mass 0.2 + density 17000 + centerOfMass [ + 0 0 -0.1 + ] + damping Damping { + } } controller "rcj_soccer_team_blue" synchronization FALSE } DEF B2 Robot { - translation -0.227682 0.452902 0.0373044 - rotation -1.60589e-06 -5.64273e-07 1 -1.4683653071795861 + translation -0.2814879492703363 0.2568677785860409 0.0380918 + rotation 0 0 -1 1.5699999999999998 children [ - HingeJoint { + DEF FRONT_LEFT_WHEEL HingeJoint { jointParameters HingeJointParameters { - position -7.771629997904354e-09 - axis 0 1 0 - anchor 0 -0.045 -0.0176 + axis 0.7854 0.7854 0 + anchor 0.0304039 0.0304039 -0.032 } device [ RotationalMotor { - name "left wheel motor" + name "front left motor" + maxVelocity 40 } PositionSensor { - name "left wheel sensor" + name "front left sensor" } ] endPoint Solid { - translation 0 -0.045 -0.0176 - rotation -3.337240149329015e-15 -6.254334002834076e-15 1 1.5707999999999998 + translation 0.030695605419343613 0.030763094468236597 -0.03209706454636311 + rotation -0.2848211437594383 0.6958154303567996 0.6593313301709143 3.7007073125004357 children [ - Transform { - rotation -0.5771969549958951 0.5776567755050862 -0.5771969549958951 2.0939354039397986 + DEF FRONT_LEFT_TRANSFORM Transform { + rotation 0 1 0 1.570796327 children [ DEF WHEEL_SHAPE Shape { appearance PBRAppearance { @@ -729,80 +877,186 @@ DEF B2 Robot { metalness 0 } geometry Cylinder { - height 0.01 - radius 0.02 + height 0.006 + radius 0.0065 } } ] } ] - name "right wheel" - boundingObject Transform { - rotation -0.5771969549958951 0.5776567755050862 -0.5771969549958951 2.0939354039397986 - children [ - USE WHEEL_SHAPE - ] - } + name "front left wheel" + contactMaterial "wheel" + boundingObject USE FRONT_LEFT_TRANSFORM physics DEF WHEEL_PHYSICS Physics { - density -1 - mass 0.005 } } } - HingeJoint { + DEF REAR_LEFT_WHEEL HingeJoint { + jointParameters HingeJointParameters { + axis -0.7854 0.7854 0 + anchor -0.0304039 0.0304039 -0.032 + } + device [ + RotationalMotor { + name "rear left motor" + maxVelocity 40 + } + PositionSensor { + name "rear left sensor" + } + ] + endPoint Solid { + translation -0.030672489460413233 0.030772320041536017 -0.032101226672410846 + rotation -0.918917721027516 0.38243791014011075 -0.09659951795563224 2.7397990222179445 + children [ + DEF REAR_LEFT_TRANSFORM Transform { + rotation 0 1 0 1.570796327 + children [ + USE WHEEL_SHAPE + ] + } + ] + name "rear left wheel" + contactMaterial "wheel" + boundingObject USE REAR_LEFT_TRANSFORM + physics USE WHEEL_PHYSICS + } + } + DEF REAR_RIGHT_WHEEL HingeJoint { + jointParameters HingeJointParameters { + axis -0.7854 -0.7854 0 + anchor -0.0304039 -0.0304039 -0.032 + } + device [ + RotationalMotor { + name "rear right motor" + maxVelocity 40 + } + PositionSensor { + name "rear right sensor" + } + ] + endPoint Solid { + translation -0.030638322591256206 -0.03079528819679128 -0.03229858299402377 + rotation 0.8618727329541556 0.34999226341757 0.3669888387103635 1.626784342800779 + children [ + DEF REAR_RIGHT_TRANSFORM Transform { + rotation 0 1 0 1.570796327 + children [ + USE WHEEL_SHAPE + ] + } + ] + name "rear right wheel" + contactMaterial "wheel" + boundingObject USE REAR_RIGHT_TRANSFORM + physics USE WHEEL_PHYSICS + } + } + DEF FRONT_RIGHT_WHEEL HingeJoint { + jointParameters HingeJointParameters { + axis 0.7854 -0.7854 0 + anchor 0.0304039 -0.0304039 -0.032 + } + device [ + RotationalMotor { + name "front right motor" + maxVelocity 40 + } + PositionSensor { + name "front right sensor" + } + ] + endPoint Solid { + translation 0.030611575570730996 -0.030854408575283092 -0.032009976637865534 + rotation -0.02222349777668641 -0.067090710396049 -0.9974993497366919 3.9566620384683953 + children [ + DEF FRONT_RIGHT_TRANSFORM Transform { + rotation 0 1 0 1.570796327 + children [ + USE WHEEL_SHAPE + ] + } + ] + name "front right wheel" + contactMaterial "wheel" + boundingObject USE FRONT_RIGHT_TRANSFORM + physics USE WHEEL_PHYSICS + } + } + DEF DRIBBLER HingeJoint { jointParameters HingeJointParameters { - position -7.74663356251063e-09 axis 0 1 0 - anchor 0 0.045 -0.0176 + anchor 0.026 0 -0.008 + suspensionAxis 0 0 1 } device [ RotationalMotor { - name "right wheel motor" + name "dribbler motor" + maxVelocity 50 } PositionSensor { - name "right wheel sensor" + name "dribbler sensor" } ] endPoint Solid { - translation 0 0.045 -0.0176 - rotation -6.410229215105164e-15 -3.362702725970239e-15 1 1.5707996938995745 + translation 0.025998987101440007 9.862989322484341e-08 -0.008000329819090136 + rotation -0.7042699741531993 -0.7042842498385091 -0.08937280870410572 3.318905912611113 children [ - Transform { - rotation -0.5771969549958951 0.5776567755050862 -0.5771969549958951 2.0939354039397986 + DEF DRIBBLER_TRANSFORM Transform { + rotation 0 1 0 1.570796327 children [ Shape { - appearance PBRAppearance { - roughness 1 - metalness 0 - } geometry Cylinder { - height 0.01 - radius 0.02 + height 0.045 + radius 0.004 } } ] } ] - name "left wheel" - boundingObject Transform { - rotation -0.5771969549958951 0.5776567755050862 -0.5771969549958951 2.0939354039397986 - children [ - Shape { - appearance PBRAppearance { - roughness 1 - metalness 0 - } - geometry Cylinder { - height 0.01 - radius 0.02 - } + name "dribbler" + contactMaterial "dribbler" + boundingObject USE DRIBBLER_TRANSFORM + physics Physics { + density -1 + mass 0.12 + } + } + } + DEF KICKER SliderJoint { + jointParameters JointParameters { + axis 1 0 0 + } + device [ + LinearMotor { + name "kicker motor" + maxVelocity 20 + minPosition -1.3233159677521457e-06 + maxPosition 0.042 + maxForce 10000 + } + PositionSensor { + name "kicker sensor" + } + ] + endPoint Solid { + translation -0.020000060538676367 -0.0004198255103440296 -0.024047867877849537 + rotation -1.1828817079662869e-06 0.9999999999985412 1.2321992147801632e-06 1.5708019984105517 + children [ + DEF KICKER_SHAPE Shape { + geometry Box { + size 0.015 0.03 0.03 } - ] + } + ] + boundingObject USE KICKER_SHAPE + physics Physics { + density 70000 } - physics USE WHEEL_PHYSICS } } - DEF BLUE_ROBOT_SHAPE Shape { + DEF ROBOT_SHAPE Shape { appearance PBRAppearance { baseColorMap ImageTexture { url [ @@ -812,8 +1066,10 @@ DEF B2 Robot { roughness 1 metalness 0 } - geometry Box { - size 0.075 0.075 0.075 + geometry Mesh { + url [ + "soccer/Robot Shape.obj" + ] } } Solid { @@ -952,35 +1208,42 @@ DEF B2 Robot { } ] name "B2" - boundingObject USE BLUE_ROBOT_SHAPE - physics USE ROBOT_PHYSICS + boundingObject USE ROBOT_SHAPE + physics DEF ROBOT_PHYSICS Physics { + density 17000 + centerOfMass [ + 0 0 -0.1 + ] + damping Damping { + } + } controller "rcj_soccer_team_blue" synchronization FALSE } DEF B3 Robot { - translation 0.0646362 0.431265 0.0373044 - rotation -1.24817e-06 1.20797e-06 -1 1.53191 + translation -0.05456994904755506 0.27837303278241243 0.0380918 + rotation 0 0 -1 1.5699999999999998 children [ - HingeJoint { + DEF FRONT_LEFT_WHEEL HingeJoint { jointParameters HingeJointParameters { - position -7.771629997904354e-09 - axis 0 1 0 - anchor 0 -0.045 -0.0176 + axis 0.7854 0.7854 0 + anchor 0.0304039 0.0304039 -0.032 } device [ RotationalMotor { - name "left wheel motor" + name "front left motor" + maxVelocity 40 } PositionSensor { - name "left wheel sensor" + name "front left sensor" } ] endPoint Solid { - translation 0 -0.045 -0.0176 - rotation -3.337240149329015e-15 -6.254334002834076e-15 1 1.5707999999999998 + translation 0.030695605419343613 0.030763094468236597 -0.03209706454636311 + rotation -0.2848211437594383 0.6958154303567996 0.6593313301709143 3.7007073125004357 children [ - Transform { - rotation -0.5771969549958951 0.5776567755050862 -0.5771969549958951 2.0939354039397986 + DEF FRONT_LEFT_TRANSFORM Transform { + rotation 0 1 0 1.570796327 children [ DEF WHEEL_SHAPE Shape { appearance PBRAppearance { @@ -988,80 +1251,187 @@ DEF B3 Robot { metalness 0 } geometry Cylinder { - height 0.01 - radius 0.02 + height 0.006 + radius 0.0065 } } ] } ] - name "right wheel" - boundingObject Transform { - rotation -0.5771969549958951 0.5776567755050862 -0.5771969549958951 2.0939354039397986 - children [ - USE WHEEL_SHAPE - ] - } + name "front left wheel" + contactMaterial "wheel" + boundingObject USE FRONT_LEFT_TRANSFORM physics DEF WHEEL_PHYSICS Physics { - density -1 - mass 0.005 } } } - HingeJoint { + DEF REAR_LEFT_WHEEL HingeJoint { + jointParameters HingeJointParameters { + axis -0.7854 0.7854 0 + anchor -0.0304039 0.0304039 -0.032 + } + device [ + RotationalMotor { + name "rear left motor" + maxVelocity 40 + } + PositionSensor { + name "rear left sensor" + } + ] + endPoint Solid { + translation -0.030672489460413233 0.03077232004153604 -0.032101226672410846 + rotation -0.918917721027516 0.38243791014011075 -0.09659951795563224 2.7397990222179445 + children [ + DEF REAR_LEFT_TRANSFORM Transform { + rotation 0 1 0 1.570796327 + children [ + USE WHEEL_SHAPE + ] + } + ] + name "rear left wheel" + contactMaterial "wheel" + boundingObject USE REAR_LEFT_TRANSFORM + physics USE WHEEL_PHYSICS + } + } + DEF REAR_RIGHT_WHEEL HingeJoint { + jointParameters HingeJointParameters { + axis -0.7854 -0.7854 0 + anchor -0.0304039 -0.0304039 -0.032 + } + device [ + RotationalMotor { + name "rear right motor" + maxVelocity 40 + } + PositionSensor { + name "rear right sensor" + } + ] + endPoint Solid { + translation -0.030638322591256262 -0.03079528819679131 -0.03229858299402377 + rotation 0.8618727329541556 0.34999226341757 0.3669888387103635 1.626784342800779 + children [ + DEF REAR_RIGHT_TRANSFORM Transform { + rotation 0 1 0 1.570796327 + children [ + USE WHEEL_SHAPE + ] + } + ] + name "rear right wheel" + contactMaterial "wheel" + boundingObject USE REAR_RIGHT_TRANSFORM + physics USE WHEEL_PHYSICS + } + } + DEF FRONT_RIGHT_WHEEL HingeJoint { + jointParameters HingeJointParameters { + axis 0.7854 -0.7854 0 + anchor 0.0304039 -0.0304039 -0.032 + } + device [ + RotationalMotor { + name "front right motor" + maxVelocity 40 + } + PositionSensor { + name "front right sensor" + } + ] + endPoint Solid { + translation 0.030611575570730996 -0.030854408575283092 -0.032009976637865534 + rotation -0.02222349777668641 -0.067090710396049 -0.9974993497366919 3.9566620384683953 + children [ + DEF FRONT_RIGHT_TRANSFORM Transform { + rotation 0 1 0 1.570796327 + children [ + USE WHEEL_SHAPE + ] + } + ] + name "front right wheel" + contactMaterial "wheel" + boundingObject USE FRONT_RIGHT_TRANSFORM + physics USE WHEEL_PHYSICS + } + } + DEF DRIBBLER HingeJoint { jointParameters HingeJointParameters { - position -7.74663356251063e-09 axis 0 1 0 - anchor 0 0.045 -0.0176 + anchor 0.026 0 -0.008 + suspensionAxis 0 0 1 } device [ RotationalMotor { - name "right wheel motor" + name "dribbler motor" + maxVelocity 50 } PositionSensor { - name "right wheel sensor" + name "dribbler sensor" } ] endPoint Solid { - translation 0 0.045 -0.0176 - rotation -6.410229215105164e-15 -3.362702725970239e-15 1 1.5707996938995745 + translation 0.025998987101440007 9.862989322484341e-08 -0.008000329819090136 + rotation -0.7042699741531993 -0.7042842498385091 -0.08937280870410572 3.318905912611113 children [ - Transform { - rotation -0.5771969549958951 0.5776567755050862 -0.5771969549958951 2.0939354039397986 + DEF DRIBBLER_TRANSFORM Transform { + rotation 0 1 0 1.570796327 children [ Shape { - appearance PBRAppearance { - roughness 1 - metalness 0 - } geometry Cylinder { - height 0.01 - radius 0.02 + height 0.045 + radius 0.004 } } ] } ] - name "left wheel" - boundingObject Transform { - rotation -0.5771969549958951 0.5776567755050862 -0.5771969549958951 2.0939354039397986 - children [ - Shape { - appearance PBRAppearance { - roughness 1 - metalness 0 - } - geometry Cylinder { - height 0.01 - radius 0.02 - } + name "dribbler" + contactMaterial "dribbler" + boundingObject USE DRIBBLER_TRANSFORM + physics Physics { + density -1 + mass 0.12 + } + } + } + DEF KICKER SliderJoint { + jointParameters JointParameters { + position 8.32712331861948e-17 + axis 1 0 0 + } + device [ + LinearMotor { + name "kicker motor" + maxVelocity 20 + minPosition -1.3233159677521457e-06 + maxPosition 0.042 + maxForce 10000 + } + PositionSensor { + name "kicker sensor" + } + ] + endPoint Solid { + translation -0.020000060538676367 -0.00041982551034394633 -0.024047867877849537 + rotation -1.1828817079662869e-06 0.9999999999985412 1.2321992147801632e-06 1.5708019984105517 + children [ + DEF KICKER_SHAPE Shape { + geometry Box { + size 0.015 0.03 0.03 } - ] + } + ] + boundingObject USE KICKER_SHAPE + physics Physics { + density 70000 } - physics USE WHEEL_PHYSICS } } - DEF BLUE_ROBOT_SHAPE Shape { + DEF ROBOT_SHAPE Shape { appearance PBRAppearance { baseColorMap ImageTexture { url [ @@ -1071,8 +1441,10 @@ DEF B3 Robot { roughness 1 metalness 0 } - geometry Box { - size 0.075 0.075 0.075 + geometry Mesh { + url [ + "soccer/Robot Shape.obj" + ] } } Solid { @@ -1211,35 +1583,42 @@ DEF B3 Robot { } ] name "B3" - boundingObject USE BLUE_ROBOT_SHAPE - physics USE ROBOT_PHYSICS + boundingObject USE ROBOT_SHAPE + physics DEF ROBOT_PHYSICS Physics { + density 17000 + centerOfMass [ + 0 0 -0.1 + ] + damping Damping { + } + } controller "rcj_soccer_team_blue" synchronization FALSE } DEF Y1 Robot { - translation -0.274383 -0.359359 0.0373044 - rotation -4.81452e-07 1.47473e-06 1 1.57 + translation -0.3284781312985175 -0.2747857590960715 0.0380918 + rotation 0 0 1 1.5699999999999998 children [ - HingeJoint { + DEF FRONT_LEFT_WHEEL HingeJoint { jointParameters HingeJointParameters { - position 8.806153362894452e-12 - axis 0 1 0 - anchor 0 -0.045 -0.0176 + axis 0.7854 0.7854 0 + anchor 0.0304039 0.0304039 -0.032 } device [ RotationalMotor { - name "left wheel motor" + name "front left motor" + maxVelocity 40 } PositionSensor { - name "left wheel sensor" + name "front left sensor" } ] endPoint Solid { - translation 0 -0.045 -0.0176 - rotation -3.9627690133025035e-11 3.9627544572658754e-11 -1 1.5708 + translation 0.030695605419343613 0.030763094468236597 -0.03209706454636311 + rotation -0.2848211437594383 0.6958154303567996 0.6593313301709143 3.7007073125004357 children [ - Transform { - rotation -0.5771969549958951 0.5776567755050862 -0.5771969549958951 2.0939354039397986 + DEF FRONT_LEFT_TRANSFORM Transform { + rotation 0 1 0 1.570796327 children [ DEF WHEEL_SHAPE Shape { appearance PBRAppearance { @@ -1247,80 +1626,186 @@ DEF Y1 Robot { metalness 0 } geometry Cylinder { - height 0.01 - radius 0.02 + height 0.006 + radius 0.0065 } } ] } ] - name "right wheel" - boundingObject Transform { - rotation -0.5771969549958951 0.5776567755050862 -0.5771969549958951 2.0939354039397986 - children [ - USE WHEEL_SHAPE - ] - } + name "front left wheel" + contactMaterial "wheel" + boundingObject USE FRONT_LEFT_TRANSFORM physics DEF WHEEL_PHYSICS Physics { - density -1 - mass 0.005 } } } - HingeJoint { + DEF REAR_LEFT_WHEEL HingeJoint { + jointParameters HingeJointParameters { + axis -0.7854 0.7854 0 + anchor -0.0304039 0.0304039 -0.032 + } + device [ + RotationalMotor { + name "rear left motor" + maxVelocity 40 + } + PositionSensor { + name "rear left sensor" + } + ] + endPoint Solid { + translation -0.030672489460413344 0.03077232004153596 -0.032101226672410846 + rotation 0.9189177210275162 -0.3824379101401104 0.0965995179556321 -2.7397990222179436 + children [ + DEF REAR_LEFT_TRANSFORM Transform { + rotation 0 1 0 1.570796327 + children [ + USE WHEEL_SHAPE + ] + } + ] + name "rear left wheel" + contactMaterial "wheel" + boundingObject USE REAR_LEFT_TRANSFORM + physics USE WHEEL_PHYSICS + } + } + DEF REAR_RIGHT_WHEEL HingeJoint { + jointParameters HingeJointParameters { + axis -0.7854 -0.7854 0 + anchor -0.0304039 -0.0304039 -0.032 + } + device [ + RotationalMotor { + name "rear right motor" + maxVelocity 40 + } + PositionSensor { + name "rear right sensor" + } + ] + endPoint Solid { + translation -0.030638322591256317 -0.030795288196791504 -0.03229858299402377 + rotation 0.8618727329541551 0.34999226341757034 0.36698883871036403 1.6267843428007798 + children [ + DEF REAR_RIGHT_TRANSFORM Transform { + rotation 0 1 0 1.570796327 + children [ + USE WHEEL_SHAPE + ] + } + ] + name "rear right wheel" + contactMaterial "wheel" + boundingObject USE REAR_RIGHT_TRANSFORM + physics USE WHEEL_PHYSICS + } + } + DEF FRONT_RIGHT_WHEEL HingeJoint { + jointParameters HingeJointParameters { + axis 0.7854 -0.7854 0 + anchor 0.0304039 -0.0304039 -0.032 + } + device [ + RotationalMotor { + name "front right motor" + maxVelocity 40 + } + PositionSensor { + name "front right sensor" + } + ] + endPoint Solid { + translation 0.030611575570730996 -0.030854408575283092 -0.032009976637865534 + rotation -0.02222349777668641 -0.067090710396049 -0.9974993497366919 3.9566620384683953 + children [ + DEF FRONT_RIGHT_TRANSFORM Transform { + rotation 0 1 0 1.570796327 + children [ + USE WHEEL_SHAPE + ] + } + ] + name "front right wheel" + contactMaterial "wheel" + boundingObject USE FRONT_RIGHT_TRANSFORM + physics USE WHEEL_PHYSICS + } + } + DEF DRIBBLER HingeJoint { jointParameters HingeJointParameters { - position 8.614402906181159e-12 axis 0 1 0 - anchor 0 0.045 -0.0176 + anchor 0.026 0 -0.008 + suspensionAxis 0 0 1 } device [ RotationalMotor { - name "right wheel motor" + name "dribbler motor" + maxVelocity 50 } PositionSensor { - name "right wheel sensor" + name "dribbler sensor" } ] endPoint Solid { - translation 0 0.045 -0.0176 - rotation -3.876481307781522e-11 3.876467068696751e-11 -1 1.5708 + translation 0.025998987101440007 9.862989322484341e-08 -0.008000329819090136 + rotation -0.7042699741531993 -0.7042842498385091 -0.08937280870410572 3.318905912611113 children [ - Transform { - rotation -0.5771969549958951 0.5776567755050862 -0.5771969549958951 2.0939354039397986 + DEF DRIBBLER_TRANSFORM Transform { + rotation 0 1 0 1.570796327 children [ Shape { - appearance PBRAppearance { - roughness 1 - metalness 0 - } geometry Cylinder { - height 0.01 - radius 0.02 + height 0.045 + radius 0.004 } } ] } ] - name "left wheel" - boundingObject Transform { - rotation -0.5771969549958951 0.5776567755050862 -0.5771969549958951 2.0939354039397986 - children [ - Shape { - appearance PBRAppearance { - roughness 1 - metalness 0 - } - geometry Cylinder { - height 0.01 - radius 0.02 - } + name "dribbler" + contactMaterial "dribbler" + boundingObject USE DRIBBLER_TRANSFORM + physics Physics { + density -1 + mass 0.12 + } + } + } + DEF KICKER SliderJoint { + jointParameters JointParameters { + axis 1 0 0 + } + device [ + LinearMotor { + name "kicker motor" + maxVelocity 20 + minPosition -1.3233159677521457e-06 + maxPosition 0.042 + maxForce 10000 + } + PositionSensor { + name "kicker sensor" + } + ] + endPoint Solid { + translation -0.020000060538676367 -0.0004198255103440296 -0.024047867877849537 + rotation -1.182881708358809e-06 0.9999999999985413 1.2321992158007204e-06 1.5708019984105515 + children [ + DEF KICKER_SHAPE Shape { + geometry Box { + size 0.015 0.03 0.03 } - ] + } + ] + boundingObject USE KICKER_SHAPE + physics Physics { + density 70000 } - physics USE WHEEL_PHYSICS } } - DEF YELLOW_ROBOT_SHAPE Shape { + DEF ROBOT_SHAPE Shape { appearance PBRAppearance { baseColorMap ImageTexture { url [ @@ -1330,17 +1815,19 @@ DEF Y1 Robot { roughness 1 metalness 0 } - geometry Box { - size 0.075 0.075 0.075 + geometry Mesh { + url [ + "soccer/Robot Shape.obj" + ] } } Solid { translation 0 0.0385 0.02 - rotation 0 0 1 1.5708 + rotation 0 0 1 1.5707903061004251 children [ Shape { appearance PBRAppearance { - baseColor 1 1 0 + baseColor 0 0 1 roughness 1 metalness 0 } @@ -1365,7 +1852,7 @@ DEF Y1 Robot { children [ Shape { appearance PBRAppearance { - baseColor 1 1 0 + baseColor 0 0 1 roughness 1 metalness 0 } @@ -1389,7 +1876,7 @@ DEF Y1 Robot { children [ Shape { appearance PBRAppearance { - baseColor 1 1 0 + baseColor 0 0 1 roughness 1 metalness 0 } @@ -1414,7 +1901,7 @@ DEF Y1 Robot { children [ Shape { appearance PBRAppearance { - baseColor 1 1 0 + baseColor 0 0 1 roughness 1 metalness 0 } @@ -1442,9 +1929,9 @@ DEF Y1 Robot { } Receiver { name "team receiver" - channel 3 + channel 2 allowedChannels [ - 3 + 2 ] } Receiver { @@ -1458,10 +1945,10 @@ DEF Y1 Robot { Emitter { name "team emitter" range 10 - channel 3 + channel 2 baudRate 115200 allowedChannels [ - 3 + 2 ] } GPS { @@ -1470,35 +1957,42 @@ DEF Y1 Robot { } ] name "Y1" - boundingObject USE YELLOW_ROBOT_SHAPE - physics USE ROBOT_PHYSICS + boundingObject USE ROBOT_SHAPE + physics DEF ROBOT_PHYSICS Physics { + density 17000 + centerOfMass [ + 0 0 -0.1 + ] + damping Damping { + } + } controller "rcj_soccer_team_yellow" synchronization FALSE } DEF Y2 Robot { - translation 0.335061 -0.346269 0.0373044 - rotation -1.56377e-06 5.12393e-07 1 1.51127 + translation 0.3519502530894836 -0.2365117727563275 0.0380918 + rotation 0 0 1 1.5699999999999998 children [ - HingeJoint { + DEF FRONT_LEFT_WHEEL HingeJoint { jointParameters HingeJointParameters { - position 8.629983611817959e-12 - axis 0 1 0 - anchor 0 -0.045 -0.0176 + axis 0.7854 0.7854 0 + anchor 0.0304039 0.0304039 -0.032 } device [ RotationalMotor { - name "left wheel motor" + name "front left motor" + maxVelocity 40 } PositionSensor { - name "left wheel sensor" + name "front left sensor" } ] endPoint Solid { - translation 0 -0.045 -0.0176 - rotation -3.020494264136286e-11 3.020483169261717e-11 -1 1.5708 + translation 0.030695605419343613 0.030763094468236597 -0.03209706454636311 + rotation -0.2848211437594383 0.6958154303567996 0.6593313301709143 3.7007073125004357 children [ - Transform { - rotation -0.5771969549958951 0.5776567755050862 -0.5771969549958951 2.0939354039397986 + DEF FRONT_LEFT_TRANSFORM Transform { + rotation 0 1 0 1.570796327 children [ DEF WHEEL_SHAPE Shape { appearance PBRAppearance { @@ -1506,80 +2000,186 @@ DEF Y2 Robot { metalness 0 } geometry Cylinder { - height 0.01 - radius 0.02 + height 0.006 + radius 0.0065 } } ] } ] - name "right wheel" - boundingObject Transform { - rotation -0.5771969549958951 0.5776567755050862 -0.5771969549958951 2.0939354039397986 - children [ - USE WHEEL_SHAPE - ] - } + name "front left wheel" + contactMaterial "wheel" + boundingObject USE FRONT_LEFT_TRANSFORM physics DEF WHEEL_PHYSICS Physics { - density -1 - mass 0.005 } } } - HingeJoint { + DEF REAR_LEFT_WHEEL HingeJoint { + jointParameters HingeJointParameters { + axis -0.7854 0.7854 0 + anchor -0.0304039 0.0304039 -0.032 + } + device [ + RotationalMotor { + name "rear left motor" + maxVelocity 40 + } + PositionSensor { + name "rear left sensor" + } + ] + endPoint Solid { + translation -0.030672489460413233 0.030772320041536017 -0.032101226672410846 + rotation 0.9189177210275162 -0.3824379101401104 0.0965995179556321 -2.7397990222179436 + children [ + DEF REAR_LEFT_TRANSFORM Transform { + rotation 0 1 0 1.570796327 + children [ + USE WHEEL_SHAPE + ] + } + ] + name "rear left wheel" + contactMaterial "wheel" + boundingObject USE REAR_LEFT_TRANSFORM + physics USE WHEEL_PHYSICS + } + } + DEF REAR_RIGHT_WHEEL HingeJoint { + jointParameters HingeJointParameters { + axis -0.7854 -0.7854 0 + anchor -0.0304039 -0.0304039 -0.032 + } + device [ + RotationalMotor { + name "rear right motor" + maxVelocity 40 + } + PositionSensor { + name "rear right sensor" + } + ] + endPoint Solid { + translation -0.030638322591256262 -0.030795288196791448 -0.03229858299402377 + rotation 0.8618727329541551 0.34999226341757034 0.36698883871036403 1.6267843428007798 + children [ + DEF REAR_RIGHT_TRANSFORM Transform { + rotation 0 1 0 1.570796327 + children [ + USE WHEEL_SHAPE + ] + } + ] + name "rear right wheel" + contactMaterial "wheel" + boundingObject USE REAR_RIGHT_TRANSFORM + physics USE WHEEL_PHYSICS + } + } + DEF FRONT_RIGHT_WHEEL HingeJoint { + jointParameters HingeJointParameters { + axis 0.7854 -0.7854 0 + anchor 0.0304039 -0.0304039 -0.032 + } + device [ + RotationalMotor { + name "front right motor" + maxVelocity 40 + } + PositionSensor { + name "front right sensor" + } + ] + endPoint Solid { + translation 0.030611575570730996 -0.030854408575283092 -0.032009976637865534 + rotation -0.02222349777668641 -0.067090710396049 -0.9974993497366919 3.9566620384683953 + children [ + DEF FRONT_RIGHT_TRANSFORM Transform { + rotation 0 1 0 1.570796327 + children [ + USE WHEEL_SHAPE + ] + } + ] + name "front right wheel" + contactMaterial "wheel" + boundingObject USE FRONT_RIGHT_TRANSFORM + physics USE WHEEL_PHYSICS + } + } + DEF DRIBBLER HingeJoint { jointParameters HingeJointParameters { - position 8.730131650988922e-12 axis 0 1 0 - anchor 0 0.045 -0.0176 + anchor 0.026 0 -0.008 + suspensionAxis 0 0 1 } device [ RotationalMotor { - name "right wheel motor" + name "dribbler motor" + maxVelocity 50 } PositionSensor { - name "right wheel sensor" + name "dribbler sensor" } ] endPoint Solid { - translation 0 0.045 -0.0176 - rotation -3.055546077846123e-11 3.055534854219291e-11 -1 1.5708 + translation 0.025998987101440007 9.862989322484341e-08 -0.008000329819090136 + rotation -0.7042699741531993 -0.7042842498385091 -0.08937280870410572 3.318905912611113 children [ - Transform { - rotation -0.5771969549958951 0.5776567755050862 -0.5771969549958951 2.0939354039397986 + DEF DRIBBLER_TRANSFORM Transform { + rotation 0 1 0 1.570796327 children [ Shape { - appearance PBRAppearance { - roughness 1 - metalness 0 - } geometry Cylinder { - height 0.01 - radius 0.02 + height 0.045 + radius 0.004 } } ] } ] - name "left wheel" - boundingObject Transform { - rotation -0.5771969549958951 0.5776567755050862 -0.5771969549958951 2.0939354039397986 - children [ - Shape { - appearance PBRAppearance { - roughness 1 - metalness 0 - } - geometry Cylinder { - height 0.01 - radius 0.02 - } + name "dribbler" + contactMaterial "dribbler" + boundingObject USE DRIBBLER_TRANSFORM + physics Physics { + density -1 + mass 0.12 + } + } + } + DEF KICKER SliderJoint { + jointParameters JointParameters { + axis 1 0 0 + } + device [ + LinearMotor { + name "kicker motor" + maxVelocity 20 + minPosition -1.3233159677521457e-06 + maxPosition 0.042 + maxForce 10000 + } + PositionSensor { + name "kicker sensor" + } + ] + endPoint Solid { + translation -0.0200000605386762 -0.0004198255103440296 -0.024047867877849537 + rotation -1.182881708358809e-06 0.9999999999985413 1.2321992158007204e-06 1.5708019984105515 + children [ + DEF KICKER_SHAPE Shape { + geometry Box { + size 0.015 0.03 0.03 } - ] + } + ] + boundingObject USE KICKER_SHAPE + physics Physics { + density 70000 } - physics USE WHEEL_PHYSICS } } - DEF YELLOW_ROBOT_SHAPE Shape { + DEF ROBOT_SHAPE Shape { appearance PBRAppearance { baseColorMap ImageTexture { url [ @@ -1589,17 +2189,19 @@ DEF Y2 Robot { roughness 1 metalness 0 } - geometry Box { - size 0.075 0.075 0.075 + geometry Mesh { + url [ + "soccer/Robot Shape.obj" + ] } } Solid { translation 0 0.0385 0.02 - rotation 0 0 1 1.5708 + rotation 0 0 1 1.5707903061004251 children [ Shape { appearance PBRAppearance { - baseColor 1 1 0 + baseColor 0 0 1 roughness 1 metalness 0 } @@ -1624,7 +2226,7 @@ DEF Y2 Robot { children [ Shape { appearance PBRAppearance { - baseColor 1 1 0 + baseColor 0 0 1 roughness 1 metalness 0 } @@ -1648,7 +2250,7 @@ DEF Y2 Robot { children [ Shape { appearance PBRAppearance { - baseColor 1 1 0 + baseColor 0 0 1 roughness 1 metalness 0 } @@ -1673,7 +2275,7 @@ DEF Y2 Robot { children [ Shape { appearance PBRAppearance { - baseColor 1 1 0 + baseColor 0 0 1 roughness 1 metalness 0 } @@ -1701,9 +2303,9 @@ DEF Y2 Robot { } Receiver { name "team receiver" - channel 3 + channel 2 allowedChannels [ - 3 + 2 ] } Receiver { @@ -1717,10 +2319,10 @@ DEF Y2 Robot { Emitter { name "team emitter" range 10 - channel 3 + channel 2 baudRate 115200 allowedChannels [ - 3 + 2 ] } GPS { @@ -1729,35 +2331,42 @@ DEF Y2 Robot { } ] name "Y2" - boundingObject USE YELLOW_ROBOT_SHAPE - physics USE ROBOT_PHYSICS + boundingObject USE ROBOT_SHAPE + physics DEF ROBOT_PHYSICS Physics { + density 17000 + centerOfMass [ + 0 0 -0.1 + ] + damping Damping { + } + } controller "rcj_soccer_team_yellow" synchronization FALSE } DEF Y3 Robot { - translation -0.0123017 -0.368377 0.0373044 - rotation 1.19416e-06 1.20388e-06 1 1.58029 + translation 0 -0.1 0.0380918 + rotation 0 0 1 1.5699999999999998 children [ - HingeJoint { + DEF FRONT_LEFT_WHEEL HingeJoint { jointParameters HingeJointParameters { - position -6.5218941358580196e-12 - axis 0 1 0 - anchor 0 -0.045 -0.0176 + axis 0.7854 0.7854 0 + anchor 0.0304039 0.0304039 -0.032 } device [ RotationalMotor { - name "left wheel motor" + name "front left motor" + maxVelocity 40 } PositionSensor { - name "left wheel sensor" + name "front left sensor" } ] endPoint Solid { - translation 0 -0.045 -0.0176 - rotation 2.2826629475503072e-11 -2.2826545628765183e-11 -1 1.5708 + translation 0.030695605419343613 0.030763094468236597 -0.03209706454636311 + rotation -0.2848211437594383 0.6958154303567996 0.6593313301709143 3.7007073125004357 children [ - Transform { - rotation -0.5771969549958951 0.5776567755050862 -0.5771969549958951 2.0939354039397986 + DEF FRONT_LEFT_TRANSFORM Transform { + rotation 0 1 0 1.570796327 children [ DEF WHEEL_SHAPE Shape { appearance PBRAppearance { @@ -1765,80 +2374,187 @@ DEF Y3 Robot { metalness 0 } geometry Cylinder { - height 0.01 - radius 0.02 + height 0.006 + radius 0.0065 } } ] } ] - name "right wheel" - boundingObject Transform { - rotation -0.5771969549958951 0.5776567755050862 -0.5771969549958951 2.0939354039397986 - children [ - USE WHEEL_SHAPE - ] - } + name "front left wheel" + contactMaterial "wheel" + boundingObject USE FRONT_LEFT_TRANSFORM physics DEF WHEEL_PHYSICS Physics { - density -1 - mass 0.005 } } } - HingeJoint { + DEF REAR_LEFT_WHEEL HingeJoint { + jointParameters HingeJointParameters { + axis -0.7854 0.7854 0 + anchor -0.0304039 0.0304039 -0.032 + } + device [ + RotationalMotor { + name "rear left motor" + maxVelocity 40 + } + PositionSensor { + name "rear left sensor" + } + ] + endPoint Solid { + translation -0.030672489460413233 0.030772320041535982 -0.032101226672410846 + rotation 0.9189177210275162 -0.3824379101401104 0.0965995179556321 -2.7397990222179436 + children [ + DEF REAR_LEFT_TRANSFORM Transform { + rotation 0 1 0 1.570796327 + children [ + USE WHEEL_SHAPE + ] + } + ] + name "rear left wheel" + contactMaterial "wheel" + boundingObject USE REAR_LEFT_TRANSFORM + physics USE WHEEL_PHYSICS + } + } + DEF REAR_RIGHT_WHEEL HingeJoint { + jointParameters HingeJointParameters { + axis -0.7854 -0.7854 0 + anchor -0.0304039 -0.0304039 -0.032 + } + device [ + RotationalMotor { + name "rear right motor" + maxVelocity 40 + } + PositionSensor { + name "rear right sensor" + } + ] + endPoint Solid { + translation -0.030638322591256317 -0.030795288196791355 -0.03229858299402377 + rotation 0.8618727329541551 0.34999226341757034 0.36698883871036403 1.6267843428007798 + children [ + DEF REAR_RIGHT_TRANSFORM Transform { + rotation 0 1 0 1.570796327 + children [ + USE WHEEL_SHAPE + ] + } + ] + name "rear right wheel" + contactMaterial "wheel" + boundingObject USE REAR_RIGHT_TRANSFORM + physics USE WHEEL_PHYSICS + } + } + DEF FRONT_RIGHT_WHEEL HingeJoint { + jointParameters HingeJointParameters { + axis 0.7854 -0.7854 0 + anchor 0.0304039 -0.0304039 -0.032 + } + device [ + RotationalMotor { + name "front right motor" + maxVelocity 40 + } + PositionSensor { + name "front right sensor" + } + ] + endPoint Solid { + translation 0.030611575570730996 -0.030854408575283092 -0.032009976637865534 + rotation -0.02222349777668641 -0.067090710396049 -0.9974993497366919 3.9566620384683953 + children [ + DEF FRONT_RIGHT_TRANSFORM Transform { + rotation 0 1 0 1.570796327 + children [ + USE WHEEL_SHAPE + ] + } + ] + name "front right wheel" + contactMaterial "wheel" + boundingObject USE FRONT_RIGHT_TRANSFORM + physics USE WHEEL_PHYSICS + } + } + DEF DRIBBLER HingeJoint { jointParameters HingeJointParameters { - position -6.5139005300807185e-12 axis 0 1 0 - anchor 0 0.045 -0.0176 + anchor 0.026 0 -0.008 + suspensionAxis 0 0 1 } device [ RotationalMotor { - name "right wheel motor" + name "dribbler motor" + maxVelocity 50 } PositionSensor { - name "right wheel sensor" + name "dribbler sensor" } ] endPoint Solid { - translation 0 0.045 -0.0176 - rotation 2.2798651855282515e-11 -2.2798568111311978e-11 -1 1.5708 + translation 0.025998987101440007 9.862989322484341e-08 -0.008000329819090136 + rotation -0.7042699741531993 -0.7042842498385091 -0.08937280870410572 3.318905912611113 children [ - Transform { - rotation -0.5771969549958951 0.5776567755050862 -0.5771969549958951 2.0939354039397986 + DEF DRIBBLER_TRANSFORM Transform { + rotation 0 1 0 1.570796327 children [ Shape { - appearance PBRAppearance { - roughness 1 - metalness 0 - } geometry Cylinder { - height 0.01 - radius 0.02 + height 0.045 + radius 0.004 } } ] } ] - name "left wheel" - boundingObject Transform { - rotation -0.5771969549958951 0.5776567755050862 -0.5771969549958951 2.0939354039397986 - children [ - Shape { - appearance PBRAppearance { - roughness 1 - metalness 0 - } - geometry Cylinder { - height 0.01 - radius 0.02 - } + name "dribbler" + contactMaterial "dribbler" + boundingObject USE DRIBBLER_TRANSFORM + physics Physics { + density -1 + mass 0.12 + } + } + } + DEF KICKER SliderJoint { + jointParameters JointParameters { + position -1.388140960003884e-17 + axis 1 0 0 + } + device [ + LinearMotor { + name "kicker motor" + maxVelocity 20 + minPosition -1.3233159677521457e-06 + maxPosition 0.042 + maxForce 10000 + } + PositionSensor { + name "kicker sensor" + } + ] + endPoint Solid { + translation -0.020000060538676354 -0.0004198255103439872 -0.024047867877849537 + rotation -1.182881708358809e-06 0.9999999999985413 1.2321992158007204e-06 1.5708019984105515 + children [ + DEF KICKER_SHAPE Shape { + geometry Box { + size 0.015 0.03 0.03 } - ] + } + ] + boundingObject USE KICKER_SHAPE + physics Physics { + density 70000 } - physics USE WHEEL_PHYSICS } } - DEF YELLOW_ROBOT_SHAPE Shape { + DEF ROBOT_SHAPE Shape { appearance PBRAppearance { baseColorMap ImageTexture { url [ @@ -1848,17 +2564,19 @@ DEF Y3 Robot { roughness 1 metalness 0 } - geometry Box { - size 0.075 0.075 0.075 + geometry Mesh { + url [ + "soccer/Robot Shape.obj" + ] } } Solid { translation 0 0.0385 0.02 - rotation 0 0 1 1.5708 + rotation 0 0 1 1.5707903061004251 children [ Shape { appearance PBRAppearance { - baseColor 1 1 0 + baseColor 0 0 1 roughness 1 metalness 0 } @@ -1883,7 +2601,7 @@ DEF Y3 Robot { children [ Shape { appearance PBRAppearance { - baseColor 1 1 0 + baseColor 0 0 1 roughness 1 metalness 0 } @@ -1907,7 +2625,7 @@ DEF Y3 Robot { children [ Shape { appearance PBRAppearance { - baseColor 1 1 0 + baseColor 0 0 1 roughness 1 metalness 0 } @@ -1932,7 +2650,7 @@ DEF Y3 Robot { children [ Shape { appearance PBRAppearance { - baseColor 1 1 0 + baseColor 0 0 1 roughness 1 metalness 0 } @@ -1960,9 +2678,9 @@ DEF Y3 Robot { } Receiver { name "team receiver" - channel 3 + channel 2 allowedChannels [ - 3 + 2 ] } Receiver { @@ -1976,10 +2694,10 @@ DEF Y3 Robot { Emitter { name "team emitter" range 10 - channel 3 + channel 2 baudRate 115200 allowedChannels [ - 3 + 2 ] } GPS { @@ -1988,8 +2706,15 @@ DEF Y3 Robot { } ] name "Y3" - boundingObject USE YELLOW_ROBOT_SHAPE - physics USE ROBOT_PHYSICS + boundingObject USE ROBOT_SHAPE + physics DEF ROBOT_PHYSICS Physics { + density 17000 + centerOfMass [ + 0 0 -0.1 + ] + damping Damping { + } + } controller "rcj_soccer_team_yellow" synchronization FALSE } @@ -2006,5 +2731,4 @@ Robot { ] controller "rcj_soccer_referee_supervisor" supervisor TRUE - synchronization TRUE } diff --git a/worlds/soccer/Robot Shape.mtl b/worlds/soccer/Robot Shape.mtl new file mode 100644 index 00000000..0556e143 --- /dev/null +++ b/worlds/soccer/Robot Shape.mtl @@ -0,0 +1,9 @@ +# WaveFront *.mtl file (generated by Autodesk ATF) + +newmtl 191,191,191 +Ka 0.749020 0.749020 0.749020 +Kd 0.749020 0.749020 0.749020 +Ks 0.000000 0.000000 0.000000 +Ns 300.000000 +d 1.000000 + diff --git a/worlds/soccer/Robot Shape.obj b/worlds/soccer/Robot Shape.obj new file mode 100644 index 00000000..0e35474d --- /dev/null +++ b/worlds/soccer/Robot Shape.obj @@ -0,0 +1,193 @@ +# WaveFront *.obj file (generated by Autodesk ATF) + +mtllib Robot Shape.mtl + +g Solid6 + +v -0.037500 -0.037500 -0.037500 +v -0.037500 -0.037500 0.037500 +v -0.037500 0.037500 -0.037500 +v -0.037500 0.037500 0.037500 +v 0.018500 -0.020000 -0.037500 +v 0.018500 -0.020000 0.037500 +v 0.018500 0.020000 -0.037500 +v 0.018500 0.020000 0.037500 +v 0.030898 -0.020000 0.000000 +v 0.030898 -0.020000 0.037500 +v 0.030898 0.020000 0.000000 +v 0.030898 0.020000 0.037500 +v 0.037500 -0.037500 -0.037500 +v 0.037500 -0.037500 0.037500 +v 0.037500 -0.020000 -0.037500 +v 0.037500 -0.020000 0.000000 +v 0.037500 0.020000 -0.037500 +v 0.037500 0.020000 0.000000 +v 0.037500 0.037500 -0.037500 +v 0.037500 0.037500 0.037500 +vt 4.000000 -3.750000 0.000000 +vt 4.000000 3.750000 0.000000 +vt 0.000000 3.750000 0.000000 +vt 0.000000 -3.750000 0.000000 +vt 1.900000 -3.750000 0.000000 +vt 1.900000 3.750000 0.000000 +vt 0.000000 3.750000 0.000000 +vt 0.000000 0.000000 0.000000 +vt 0.660222 0.000000 0.000000 +vt 0.660222 -3.750000 0.000000 +vt 7.500000 -3.750000 0.000000 +vt 7.500000 3.750000 0.000000 +vt 0.000000 3.750000 0.000000 +vt 0.000000 -3.750000 0.000000 +vt 1.239778 0.000000 0.000000 +vt 1.900000 0.000000 0.000000 +vt 1.900000 3.750000 0.000000 +vt 0.000000 3.750000 0.000000 +vt 0.000000 -3.750000 0.000000 +vt 1.239778 -3.750000 0.000000 +vt -3.089778 -2.000000 0.000000 +vt -3.089778 2.000000 0.000000 +vt -3.750000 2.000000 0.000000 +vt -3.750000 -2.000000 0.000000 +vt 3.089778 2.000000 0.000000 +vt 3.089778 -2.000000 0.000000 +vt 1.850000 -2.000000 0.000000 +vt 1.850000 2.000000 0.000000 +vt -3.750000 3.750000 0.000000 +vt -3.750000 -3.750000 0.000000 +vt 3.750000 -3.750000 0.000000 +vt 3.750000 3.750000 0.000000 +vt 1.750000 0.000000 0.000000 +vt 1.750000 3.750000 0.000000 +vt 0.000000 3.750000 0.000000 +vt 0.000000 -3.750000 0.000000 +vt 7.500000 -3.750000 0.000000 +vt 7.500000 3.750000 0.000000 +vt 5.750000 3.750000 0.000000 +vt 5.750000 0.000000 0.000000 +vt 7.500000 -3.750000 0.000000 +vt 7.500000 3.750000 0.000000 +vt 0.000000 3.750000 0.000000 +vt 0.000000 -3.750000 0.000000 +vt 7.500000 -3.750000 0.000000 +vt 7.500000 3.750000 0.000000 +vt 0.000000 3.750000 0.000000 +vt 0.000000 -3.750000 0.000000 +vt 3.750000 -3.750000 0.000000 +vt 3.750000 3.750000 0.000000 +vt -3.750000 3.750000 0.000000 +vt -3.750000 2.000000 0.000000 +vt -1.850000 2.000000 0.000000 +vt -1.850000 -2.000000 0.000000 +vt -3.750000 -2.000000 0.000000 +vt -3.750000 -3.750000 0.000000 +vt -4.000000 0.000000 0.000000 +vt -0.000000 0.000000 0.000000 +vt -0.000000 3.750000 0.000000 +vt -4.000000 3.750000 0.000000 +vn 100.000000 0.000000 0.000000 +vn 100.000000 0.000000 0.000000 +vn 100.000000 0.000000 0.000000 +vn 100.000000 0.000000 0.000000 +vn 0.000000 -100.000000 0.000000 +vn 0.000000 -100.000000 0.000000 +vn 0.000000 -100.000000 0.000000 +vn 0.000000 -100.000000 0.000000 +vn 0.000000 -100.000000 0.000000 +vn 0.000000 -100.000000 0.000000 +vn 0.000000 -100.000000 0.000000 +vn 0.000000 -100.000000 0.000000 +vn 0.000000 -100.000000 0.000000 +vn 0.000000 -100.000000 0.000000 +vn 0.000000 100.000000 0.000000 +vn 0.000000 100.000000 0.000000 +vn 0.000000 100.000000 0.000000 +vn 0.000000 100.000000 0.000000 +vn 0.000000 100.000000 0.000000 +vn 0.000000 100.000000 0.000000 +vn 0.000000 0.000000 -100.000000 +vn 0.000000 0.000000 -100.000000 +vn 0.000000 0.000000 -100.000000 +vn 0.000000 0.000000 -100.000000 +vn 0.000000 0.000000 100.000000 +vn 0.000000 0.000000 100.000000 +vn 0.000000 0.000000 100.000000 +vn 0.000000 0.000000 100.000000 +vn 0.000000 0.000000 100.000000 +vn 0.000000 0.000000 100.000000 +vn 0.000000 0.000000 100.000000 +vn 0.000000 0.000000 100.000000 +vn 100.000000 0.000000 0.000000 +vn 100.000000 0.000000 0.000000 +vn 100.000000 0.000000 0.000000 +vn 100.000000 0.000000 0.000000 +vn 100.000000 0.000000 0.000000 +vn 100.000000 0.000000 0.000000 +vn 100.000000 0.000000 0.000000 +vn 100.000000 0.000000 0.000000 +vn 0.000000 100.000000 0.000000 +vn 0.000000 100.000000 0.000000 +vn 0.000000 100.000000 0.000000 +vn 0.000000 100.000000 0.000000 +vn -100.000000 0.000000 0.000000 +vn -100.000000 0.000000 0.000000 +vn -100.000000 0.000000 0.000000 +vn -100.000000 0.000000 0.000000 +vn 0.000000 0.000000 -100.000000 +vn 0.000000 0.000000 -100.000000 +vn 0.000000 0.000000 -100.000000 +vn 0.000000 0.000000 -100.000000 +vn 0.000000 0.000000 -100.000000 +vn 0.000000 0.000000 -100.000000 +vn 0.000000 0.000000 -100.000000 +vn 0.000000 0.000000 -100.000000 +vn -100.000000 0.000000 0.000000 +vn -100.000000 0.000000 0.000000 +vn -100.000000 0.000000 0.000000 +vn -100.000000 0.000000 0.000000 +usemtl 191,191,191 +f 5/2/2 7/3/3 6/1/1 +f 6/1/1 7/3/3 8/4/4 +f 12/10/10 8/5/5 11/9/9 +f 11/9/9 8/5/5 7/6/6 +f 11/9/9 7/6/6 17/7/7 +f 17/7/7 18/8/8 11/9/9 +f 1/12/12 13/13/13 2/11/11 +f 2/11/11 13/13/13 14/14/14 +f 16/16/16 15/17/17 9/15/15 +f 9/15/15 15/17/17 5/18/18 +f 9/15/15 5/18/18 6/19/19 +f 6/19/19 10/20/20 9/15/15 +f 11/22/22 18/23/23 9/21/21 +f 9/21/21 18/23/23 16/24/24 +f 10/26/26 14/31/31 12/25/25 +f 12/25/25 14/31/31 20/32/32 +f 12/25/25 20/32/32 8/28/28 +f 8/28/28 20/32/32 4/29/29 +f 8/28/28 4/29/29 2/30/30 +f 10/26/26 6/27/27 14/31/31 +f 14/31/31 6/27/27 2/30/30 +f 2/30/30 6/27/27 8/28/28 +f 17/34/34 19/35/35 18/33/33 +f 18/33/33 19/35/35 20/36/36 +f 18/33/33 20/36/36 14/37/37 +f 18/33/33 14/37/37 16/40/40 +f 16/40/40 14/37/37 13/38/38 +f 16/40/40 13/38/38 15/39/39 +f 19/42/42 3/43/43 20/41/41 +f 20/41/41 3/43/43 4/44/44 +f 3/46/46 1/47/47 4/45/45 +f 4/45/45 1/47/47 2/48/48 +f 3/50/50 7/53/53 1/49/49 +f 1/49/49 7/53/53 5/54/54 +f 1/49/49 5/54/54 13/56/56 +f 13/56/56 5/54/54 15/55/55 +f 3/50/50 19/51/51 7/53/53 +f 7/53/53 19/51/51 17/52/52 +f 10/57/57 12/58/58 9/60/60 +f 9/60/60 12/58/58 11/59/59 +# 20 vertices +# 60 texture params +# 60 normals +# 40 facets + +# 1 groups From aac9f3658f1c5fa813fa5eac08e41a39fa78e463 Mon Sep 17 00:00:00 2001 From: ThomasT0830 Date: Tue, 10 Jan 2023 01:14:01 +0800 Subject: [PATCH 2/3] Reset - Changed Robot Shape and Removed Unnecessary Files (January 10th) --- .DS_Store | Bin 6148 -> 0 bytes worlds/.soccer1.wbproj | 9 - worlds/.soccer2.wbproj | 9 - worlds/.soccer3.wbproj | 9 - worlds/.soccer4.wbproj | 9 - worlds/.soccer5.wbproj | 8 - worlds/.soccer6.wbproj | 9 - worlds/soccer/Robot Shape.obj | 850 +++++++++++++++++++++++++++++----- 8 files changed, 722 insertions(+), 181 deletions(-) delete mode 100644 .DS_Store delete mode 100644 worlds/.soccer1.wbproj delete mode 100644 worlds/.soccer2.wbproj delete mode 100644 worlds/.soccer3.wbproj delete mode 100644 worlds/.soccer4.wbproj delete mode 100644 worlds/.soccer5.wbproj delete mode 100644 worlds/.soccer6.wbproj diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index 5008ddfcf53c02e82d7eee2e57c38e5672ef89f6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeH~Jr2S!425mzP>H1@V-^m;4Wg<&0T*E43hX&L&p$$qDprKhvt+--jT7}7np#A3 zem<@ulZcFPQ@L2!n>{z**++&mCkOWA81W14cNZlEfg7;MkzE(HCqgga^y>{tEnwC%0;vJ&^%eQ zLs35+`xjp>T0 Date: Sun, 19 Feb 2023 11:35:59 +0800 Subject: [PATCH 3/3] February 19th: Fixed Strange Wheel Movement, Moved Ultrasonic Sensors Out, and Changed Dribbler Mass --- worlds/soccer.wbt | 312 +++++++++++++++++++++++----------------------- 1 file changed, 159 insertions(+), 153 deletions(-) diff --git a/worlds/soccer.wbt b/worlds/soccer.wbt index a3cb7f1f..0cd49e78 100644 --- a/worlds/soccer.wbt +++ b/worlds/soccer.wbt @@ -13,9 +13,6 @@ WorldInfo { ContactProperties { material1 "ball" material2 "field" - coulombFriction [ - 1.2 - ] } ContactProperties { material1 "dribbler" @@ -41,8 +38,8 @@ WorldInfo { ] } Viewpoint { - orientation -0.7128296450606456 0.0002838054276776868 0.701337163265425 3.1410384086685252 - position -0.089841 7.54142e-05 4.4 + orientation 0.7128275532730471 -0.0002870894638722765 -0.7013392879872061 3.1421565475318576 + position -0.08984100000000017 7.541420000006793e-05 4.400000000000001 } TexturedBackground { } @@ -423,7 +420,7 @@ DEF SOCCER_FIELD Solid { locked TRUE } DEF BALL Robot { - rotation 0.9050378357439983 -0.4251093124058043 -0.013732748366004924 1.6867606192599456 + rotation -0.2668107316298671 0.9277349714423769 0.26099780889874713 -2.412528199579081 children [ DEF FOOTBALL_SHAPE Shape { appearance PBRAppearance { @@ -462,7 +459,7 @@ DEF BALL Robot { boundingObject USE FOOTBALL_SHAPE physics Physics { density -1 - mass 0.05 + mass 0.08 } recognitionColors [ 1 1 1 @@ -472,12 +469,12 @@ DEF BALL Robot { synchronization FALSE } DEF B1 Robot { - translation 0.26853922009622855 0.3701902491133142 0.0380918 + translation 0.30348334291402934 0.26429752545093194 0.0380918 rotation 0 0 -1 1.5699999999999998 children [ DEF FRONT_LEFT_WHEEL HingeJoint { jointParameters HingeJointParameters { - axis 0.7854 0.7854 0 + axis 0.785398 0.785398 0 anchor 0.0304039 0.0304039 -0.032 } device [ @@ -490,8 +487,8 @@ DEF B1 Robot { } ] endPoint Solid { - translation 0.030695605419343613 0.030763094468236597 -0.03209706454636311 - rotation -0.2848211437594383 0.6958154303567996 0.6593313301709143 3.7007073125004357 + translation 0.03040390000000004 0.030403899999999984 -0.032 + rotation 0 0 1 -2.3561900000000002 children [ DEF FRONT_LEFT_TRANSFORM Transform { rotation 0 1 0 1.570796327 @@ -518,7 +515,7 @@ DEF B1 Robot { } DEF REAR_LEFT_WHEEL HingeJoint { jointParameters HingeJointParameters { - axis -0.7854 0.7854 0 + axis -0.785398 0.785398 0 anchor -0.0304039 0.0304039 -0.032 } device [ @@ -531,8 +528,8 @@ DEF B1 Robot { } ] endPoint Solid { - translation -0.030672489460413233 0.030772320041536072 -0.032101226672410846 - rotation -0.918917721027516 0.38243791014011075 -0.09659951795563224 2.7397990222179445 + translation -0.030403899999999984 0.030403899999999984 -0.032 + rotation 0 0 1 -0.785395307179586 children [ DEF REAR_LEFT_TRANSFORM Transform { rotation 0 1 0 1.570796327 @@ -549,7 +546,7 @@ DEF B1 Robot { } DEF REAR_RIGHT_WHEEL HingeJoint { jointParameters HingeJointParameters { - axis -0.7854 -0.7854 0 + axis -0.785398 -0.785398 0 anchor -0.0304039 -0.0304039 -0.032 } device [ @@ -562,8 +559,8 @@ DEF B1 Robot { } ] endPoint Solid { - translation -0.03063832259125643 -0.030795288196791226 -0.03229858299402377 - rotation 0.8618727329541556 0.34999226341757 0.3669888387103635 1.626784342800779 + translation -0.030403899999999928 -0.030403899999999984 -0.032 + rotation 0 0 1 0.7853979999999997 children [ DEF REAR_RIGHT_TRANSFORM Transform { rotation 0 1 0 1.570796327 @@ -580,7 +577,7 @@ DEF B1 Robot { } DEF FRONT_RIGHT_WHEEL HingeJoint { jointParameters HingeJointParameters { - axis 0.7854 -0.7854 0 + axis 0.785398 -0.785398 0 anchor 0.0304039 -0.0304039 -0.032 } device [ @@ -593,8 +590,8 @@ DEF B1 Robot { } ] endPoint Solid { - translation 0.030611575570730996 -0.030854408575283092 -0.032009976637865534 - rotation -0.02222349777668641 -0.067090710396049 -0.9974993497366919 3.9566620384683953 + translation 0.030403899999999984 -0.030403899999999984 -0.032 + rotation 0 0 1 2.35619 children [ DEF FRONT_RIGHT_TRANSFORM Transform { rotation 0 1 0 1.570796327 @@ -611,6 +608,7 @@ DEF B1 Robot { } DEF DRIBBLER HingeJoint { jointParameters HingeJointParameters { + position 8873.53458988807 axis 0 1 0 anchor 0.026 0 -0.008 suspensionAxis 0 0 1 @@ -625,8 +623,8 @@ DEF B1 Robot { } ] endPoint Solid { - translation 0.025998987101440007 9.862989322484341e-08 -0.008000329819090136 - rotation -0.7042699741531993 -0.7042842498385091 -0.08937280870410572 3.318905912611113 + translation 0.025990457192025113 1.7981358380048107e-07 -0.008000095794128182 + rotation -0.26043941330881704 -0.2608143585831204 0.9295951712182214 1.643491160171936 children [ DEF DRIBBLER_TRANSFORM Transform { rotation 0 1 0 1.570796327 @@ -645,20 +643,20 @@ DEF B1 Robot { boundingObject USE DRIBBLER_TRANSFORM physics Physics { density -1 - mass 0.12 + mass 1.25 } } } DEF KICKER SliderJoint { jointParameters JointParameters { - position 5.551113363043895e-17 + position -5.893445048499387e-08 axis 1 0 0 } device [ LinearMotor { name "kicker motor" maxVelocity 20 - minPosition -1.3233159677521457e-06 + minPosition -2.2419110676378706e-05 maxPosition 0.042 maxForce 10000 } @@ -667,8 +665,8 @@ DEF B1 Robot { } ] endPoint Solid { - translation -0.020000060538676423 -0.0004198255103439186 -0.024047867877849537 - rotation -1.1828817079662869e-06 0.9999999999985412 1.2321992147801632e-06 1.5708019984105517 + translation -0.020000130667441773 -0.0004198494222769633 -0.024061894469276958 + rotation -1.1810691308402516e-06 0.9999999999985407 1.2343786774001837e-06 1.5708018510118937 children [ DEF KICKER_SHAPE Shape { geometry Box { @@ -699,7 +697,7 @@ DEF B1 Robot { } } Solid { - translation 0 0.0385 0.02 + translation 0 0.043 0.02 rotation 0 0 1 1.5707903061004251 children [ Shape { @@ -724,7 +722,7 @@ DEF B1 Robot { name "left sonar" } Solid { - translation 0 -0.0385 0.02 + translation 0 -0.043 0.02 rotation 0 0 1 -1.5707996938995747 children [ Shape { @@ -749,7 +747,7 @@ DEF B1 Robot { name "right sonar" } Solid { - translation 0.0385 0 0.02 + translation 0.043 0 0.02 children [ Shape { appearance PBRAppearance { @@ -773,7 +771,7 @@ DEF B1 Robot { name "front sonar" } Solid { - translation -0.0385 0 0.02 + translation -0.043 0 0.02 rotation 0 0 1 3.141592653589793 children [ Shape { @@ -836,7 +834,7 @@ DEF B1 Robot { name "B1" boundingObject USE ROBOT_SHAPE physics DEF ROBOT_PHYSICS Physics { - density 17000 + density 20000 centerOfMass [ 0 0 -0.1 ] @@ -847,12 +845,12 @@ DEF B1 Robot { synchronization FALSE } DEF B2 Robot { - translation -0.2814879492703363 0.2568677785860409 0.0380918 + translation -0.24977097895142505 0.32718919138947045 0.0380918 rotation 0 0 -1 1.5699999999999998 children [ DEF FRONT_LEFT_WHEEL HingeJoint { jointParameters HingeJointParameters { - axis 0.7854 0.7854 0 + axis 0.785398 0.785398 0 anchor 0.0304039 0.0304039 -0.032 } device [ @@ -865,8 +863,8 @@ DEF B2 Robot { } ] endPoint Solid { - translation 0.030695605419343613 0.030763094468236597 -0.03209706454636311 - rotation -0.2848211437594383 0.6958154303567996 0.6593313301709143 3.7007073125004357 + translation 0.03040390000000004 0.030403899999999956 -0.032 + rotation 0 0 1 -2.3561900000000002 children [ DEF FRONT_LEFT_TRANSFORM Transform { rotation 0 1 0 1.570796327 @@ -893,7 +891,7 @@ DEF B2 Robot { } DEF REAR_LEFT_WHEEL HingeJoint { jointParameters HingeJointParameters { - axis -0.7854 0.7854 0 + axis -0.785398 0.785398 0 anchor -0.0304039 0.0304039 -0.032 } device [ @@ -906,8 +904,8 @@ DEF B2 Robot { } ] endPoint Solid { - translation -0.030672489460413233 0.030772320041536017 -0.032101226672410846 - rotation -0.918917721027516 0.38243791014011075 -0.09659951795563224 2.7397990222179445 + translation -0.030403899999999928 0.030403899999999984 -0.032 + rotation 0 0 1 -0.785395307179586 children [ DEF REAR_LEFT_TRANSFORM Transform { rotation 0 1 0 1.570796327 @@ -924,7 +922,7 @@ DEF B2 Robot { } DEF REAR_RIGHT_WHEEL HingeJoint { jointParameters HingeJointParameters { - axis -0.7854 -0.7854 0 + axis -0.785398 -0.785398 0 anchor -0.0304039 -0.0304039 -0.032 } device [ @@ -937,8 +935,8 @@ DEF B2 Robot { } ] endPoint Solid { - translation -0.030638322591256206 -0.03079528819679128 -0.03229858299402377 - rotation 0.8618727329541556 0.34999226341757 0.3669888387103635 1.626784342800779 + translation -0.030403899999999873 -0.030403899999999984 -0.032 + rotation 0 0 1 0.7853979999999997 children [ DEF REAR_RIGHT_TRANSFORM Transform { rotation 0 1 0 1.570796327 @@ -955,7 +953,7 @@ DEF B2 Robot { } DEF FRONT_RIGHT_WHEEL HingeJoint { jointParameters HingeJointParameters { - axis 0.7854 -0.7854 0 + axis 0.785398 -0.785398 0 anchor 0.0304039 -0.0304039 -0.032 } device [ @@ -968,8 +966,8 @@ DEF B2 Robot { } ] endPoint Solid { - translation 0.030611575570730996 -0.030854408575283092 -0.032009976637865534 - rotation -0.02222349777668641 -0.067090710396049 -0.9974993497366919 3.9566620384683953 + translation 0.03040390000000004 -0.030403899999999984 -0.032 + rotation 0 0 1 2.35619 children [ DEF FRONT_RIGHT_TRANSFORM Transform { rotation 0 1 0 1.570796327 @@ -986,6 +984,7 @@ DEF B2 Robot { } DEF DRIBBLER HingeJoint { jointParameters HingeJointParameters { + position 8873.53458988807 axis 0 1 0 anchor 0.026 0 -0.008 suspensionAxis 0 0 1 @@ -1000,8 +999,8 @@ DEF B2 Robot { } ] endPoint Solid { - translation 0.025998987101440007 9.862989322484341e-08 -0.008000329819090136 - rotation -0.7042699741531993 -0.7042842498385091 -0.08937280870410572 3.318905912611113 + translation 0.02599045719202514 1.798135837727255e-07 -0.008000095794128182 + rotation -0.26043941330881704 -0.2608143585831204 0.9295951712182214 1.643491160171936 children [ DEF DRIBBLER_TRANSFORM Transform { rotation 0 1 0 1.570796327 @@ -1020,19 +1019,20 @@ DEF B2 Robot { boundingObject USE DRIBBLER_TRANSFORM physics Physics { density -1 - mass 0.12 + mass 1.25 } } } DEF KICKER SliderJoint { jointParameters JointParameters { + position -5.893445048499387e-08 axis 1 0 0 } device [ LinearMotor { name "kicker motor" maxVelocity 20 - minPosition -1.3233159677521457e-06 + minPosition -2.2419110676378706e-05 maxPosition 0.042 maxForce 10000 } @@ -1041,8 +1041,8 @@ DEF B2 Robot { } ] endPoint Solid { - translation -0.020000060538676367 -0.0004198255103440296 -0.024047867877849537 - rotation -1.1828817079662869e-06 0.9999999999985412 1.2321992147801632e-06 1.5708019984105517 + translation -0.020000130667441718 -0.0004198494222769633 -0.024061894469276958 + rotation -1.1810691308402516e-06 0.9999999999985407 1.2343786774001837e-06 1.5708018510118937 children [ DEF KICKER_SHAPE Shape { geometry Box { @@ -1073,7 +1073,7 @@ DEF B2 Robot { } } Solid { - translation 0 0.0385 0.02 + translation 0 0.043 0.02 rotation 0 0 1 1.5707903061004251 children [ Shape { @@ -1098,7 +1098,7 @@ DEF B2 Robot { name "left sonar" } Solid { - translation 0 -0.0385 0.02 + translation 0 -0.043 0.02 rotation 0 0 1 -1.5707996938995747 children [ Shape { @@ -1123,7 +1123,7 @@ DEF B2 Robot { name "right sonar" } Solid { - translation 0.0385 0 0.02 + translation 0.043 0 0.02 children [ Shape { appearance PBRAppearance { @@ -1147,7 +1147,7 @@ DEF B2 Robot { name "front sonar" } Solid { - translation -0.0385 0 0.02 + translation -0.043 0 0.02 rotation 0 0 1 3.141592653589793 children [ Shape { @@ -1210,7 +1210,7 @@ DEF B2 Robot { name "B2" boundingObject USE ROBOT_SHAPE physics DEF ROBOT_PHYSICS Physics { - density 17000 + density 20000 centerOfMass [ 0 0 -0.1 ] @@ -1221,12 +1221,12 @@ DEF B2 Robot { synchronization FALSE } DEF B3 Robot { - translation -0.05456994904755506 0.27837303278241243 0.0380918 + translation 0.05877033369583943 0.33136063122172477 0.0380918 rotation 0 0 -1 1.5699999999999998 children [ DEF FRONT_LEFT_WHEEL HingeJoint { jointParameters HingeJointParameters { - axis 0.7854 0.7854 0 + axis 0.785398 0.785398 0 anchor 0.0304039 0.0304039 -0.032 } device [ @@ -1239,8 +1239,8 @@ DEF B3 Robot { } ] endPoint Solid { - translation 0.030695605419343613 0.030763094468236597 -0.03209706454636311 - rotation -0.2848211437594383 0.6958154303567996 0.6593313301709143 3.7007073125004357 + translation 0.03040390000000004 0.03040389999999999 -0.032 + rotation 0 0 1 -2.3561900000000002 children [ DEF FRONT_LEFT_TRANSFORM Transform { rotation 0 1 0 1.570796327 @@ -1267,7 +1267,7 @@ DEF B3 Robot { } DEF REAR_LEFT_WHEEL HingeJoint { jointParameters HingeJointParameters { - axis -0.7854 0.7854 0 + axis -0.785398 0.785398 0 anchor -0.0304039 0.0304039 -0.032 } device [ @@ -1280,8 +1280,8 @@ DEF B3 Robot { } ] endPoint Solid { - translation -0.030672489460413233 0.03077232004153604 -0.032101226672410846 - rotation -0.918917721027516 0.38243791014011075 -0.09659951795563224 2.7397990222179445 + translation -0.030403899999999984 0.030403900000000005 -0.032 + rotation 0 0 1 -0.785395307179586 children [ DEF REAR_LEFT_TRANSFORM Transform { rotation 0 1 0 1.570796327 @@ -1298,7 +1298,7 @@ DEF B3 Robot { } DEF REAR_RIGHT_WHEEL HingeJoint { jointParameters HingeJointParameters { - axis -0.7854 -0.7854 0 + axis -0.785398 -0.785398 0 anchor -0.0304039 -0.0304039 -0.032 } device [ @@ -1311,8 +1311,8 @@ DEF B3 Robot { } ] endPoint Solid { - translation -0.030638322591256262 -0.03079528819679131 -0.03229858299402377 - rotation 0.8618727329541556 0.34999226341757 0.3669888387103635 1.626784342800779 + translation -0.030403899999999928 -0.030403899999999977 -0.032 + rotation 0 0 1 0.7853979999999997 children [ DEF REAR_RIGHT_TRANSFORM Transform { rotation 0 1 0 1.570796327 @@ -1329,7 +1329,7 @@ DEF B3 Robot { } DEF FRONT_RIGHT_WHEEL HingeJoint { jointParameters HingeJointParameters { - axis 0.7854 -0.7854 0 + axis 0.785398 -0.785398 0 anchor 0.0304039 -0.0304039 -0.032 } device [ @@ -1342,8 +1342,8 @@ DEF B3 Robot { } ] endPoint Solid { - translation 0.030611575570730996 -0.030854408575283092 -0.032009976637865534 - rotation -0.02222349777668641 -0.067090710396049 -0.9974993497366919 3.9566620384683953 + translation 0.030403899999999984 -0.030403900000000005 -0.032 + rotation 0 0 1 2.35619 children [ DEF FRONT_RIGHT_TRANSFORM Transform { rotation 0 1 0 1.570796327 @@ -1360,6 +1360,7 @@ DEF B3 Robot { } DEF DRIBBLER HingeJoint { jointParameters HingeJointParameters { + position 8873.53458988807 axis 0 1 0 anchor 0.026 0 -0.008 suspensionAxis 0 0 1 @@ -1374,8 +1375,8 @@ DEF B3 Robot { } ] endPoint Solid { - translation 0.025998987101440007 9.862989322484341e-08 -0.008000329819090136 - rotation -0.7042699741531993 -0.7042842498385091 -0.08937280870410572 3.318905912611113 + translation 0.025990457192025085 1.7981358379354218e-07 -0.008000095794128182 + rotation -0.26043941330881704 -0.2608143585831204 0.9295951712182214 1.643491160171936 children [ DEF DRIBBLER_TRANSFORM Transform { rotation 0 1 0 1.570796327 @@ -1394,20 +1395,20 @@ DEF B3 Robot { boundingObject USE DRIBBLER_TRANSFORM physics Physics { density -1 - mass 0.12 + mass 1.25 } } } DEF KICKER SliderJoint { jointParameters JointParameters { - position 8.32712331861948e-17 + position -5.8934450484999394e-08 axis 1 0 0 } device [ LinearMotor { name "kicker motor" maxVelocity 20 - minPosition -1.3233159677521457e-06 + minPosition -2.2419110676378706e-05 maxPosition 0.042 maxForce 10000 } @@ -1416,8 +1417,8 @@ DEF B3 Robot { } ] endPoint Solid { - translation -0.020000060538676367 -0.00041982551034394633 -0.024047867877849537 - rotation -1.1828817079662869e-06 0.9999999999985412 1.2321992147801632e-06 1.5708019984105517 + translation -0.020000130667441773 -0.0004198494222769633 -0.024061894469276958 + rotation -1.1810691308402516e-06 0.9999999999985407 1.2343786774001837e-06 1.5708018510118937 children [ DEF KICKER_SHAPE Shape { geometry Box { @@ -1448,7 +1449,7 @@ DEF B3 Robot { } } Solid { - translation 0 0.0385 0.02 + translation 0 0.043 0.02 rotation 0 0 1 1.5707903061004251 children [ Shape { @@ -1473,7 +1474,7 @@ DEF B3 Robot { name "left sonar" } Solid { - translation 0 -0.0385 0.02 + translation 0 -0.043 0.02 rotation 0 0 1 -1.5707996938995747 children [ Shape { @@ -1498,7 +1499,7 @@ DEF B3 Robot { name "right sonar" } Solid { - translation 0.0385 0 0.02 + translation 0.043 0 0.02 children [ Shape { appearance PBRAppearance { @@ -1522,7 +1523,7 @@ DEF B3 Robot { name "front sonar" } Solid { - translation -0.0385 0 0.02 + translation -0.043 0 0.02 rotation 0 0 1 3.141592653589793 children [ Shape { @@ -1585,7 +1586,7 @@ DEF B3 Robot { name "B3" boundingObject USE ROBOT_SHAPE physics DEF ROBOT_PHYSICS Physics { - density 17000 + density 20000 centerOfMass [ 0 0 -0.1 ] @@ -1596,12 +1597,12 @@ DEF B3 Robot { synchronization FALSE } DEF Y1 Robot { - translation -0.3284781312985175 -0.2747857590960715 0.0380918 + translation -0.33289712767451507 -0.2420316680351436 0.0380918 rotation 0 0 1 1.5699999999999998 children [ DEF FRONT_LEFT_WHEEL HingeJoint { jointParameters HingeJointParameters { - axis 0.7854 0.7854 0 + axis 0.785398 0.785398 0 anchor 0.0304039 0.0304039 -0.032 } device [ @@ -1614,8 +1615,8 @@ DEF Y1 Robot { } ] endPoint Solid { - translation 0.030695605419343613 0.030763094468236597 -0.03209706454636311 - rotation -0.2848211437594383 0.6958154303567996 0.6593313301709143 3.7007073125004357 + translation 0.030403899999999984 0.030403899999999984 -0.032 + rotation 0 0 -1 2.35619 children [ DEF FRONT_LEFT_TRANSFORM Transform { rotation 0 1 0 1.570796327 @@ -1642,7 +1643,7 @@ DEF Y1 Robot { } DEF REAR_LEFT_WHEEL HingeJoint { jointParameters HingeJointParameters { - axis -0.7854 0.7854 0 + axis -0.785398 0.785398 0 anchor -0.0304039 0.0304039 -0.032 } device [ @@ -1655,8 +1656,8 @@ DEF Y1 Robot { } ] endPoint Solid { - translation -0.030672489460413344 0.03077232004153596 -0.032101226672410846 - rotation 0.9189177210275162 -0.3824379101401104 0.0965995179556321 -2.7397990222179436 + translation -0.03040390000000001 0.030403899999999984 -0.032 + rotation 0 0 -1 0.7853953071795856 children [ DEF REAR_LEFT_TRANSFORM Transform { rotation 0 1 0 1.570796327 @@ -1673,7 +1674,7 @@ DEF Y1 Robot { } DEF REAR_RIGHT_WHEEL HingeJoint { jointParameters HingeJointParameters { - axis -0.7854 -0.7854 0 + axis -0.785398 -0.785398 0 anchor -0.0304039 -0.0304039 -0.032 } device [ @@ -1686,8 +1687,8 @@ DEF Y1 Robot { } ] endPoint Solid { - translation -0.030638322591256317 -0.030795288196791504 -0.03229858299402377 - rotation 0.8618727329541551 0.34999226341757034 0.36698883871036403 1.6267843428007798 + translation -0.0304038999999999 -0.030403899999999984 -0.032 + rotation 0 0 0.9999999999999999 0.785398 children [ DEF REAR_RIGHT_TRANSFORM Transform { rotation 0 1 0 1.570796327 @@ -1704,7 +1705,7 @@ DEF Y1 Robot { } DEF FRONT_RIGHT_WHEEL HingeJoint { jointParameters HingeJointParameters { - axis 0.7854 -0.7854 0 + axis 0.785398 -0.785398 0 anchor 0.0304039 -0.0304039 -0.032 } device [ @@ -1717,8 +1718,8 @@ DEF Y1 Robot { } ] endPoint Solid { - translation 0.030611575570730996 -0.030854408575283092 -0.032009976637865534 - rotation -0.02222349777668641 -0.067090710396049 -0.9974993497366919 3.9566620384683953 + translation 0.030403899999999984 -0.030403899999999984 -0.032 + rotation 0 0 1 2.3561900000000002 children [ DEF FRONT_RIGHT_TRANSFORM Transform { rotation 0 1 0 1.570796327 @@ -1735,6 +1736,7 @@ DEF Y1 Robot { } DEF DRIBBLER HingeJoint { jointParameters HingeJointParameters { + position 8873.53458988807 axis 0 1 0 anchor 0.026 0 -0.008 suspensionAxis 0 0 1 @@ -1749,8 +1751,8 @@ DEF Y1 Robot { } ] endPoint Solid { - translation 0.025998987101440007 9.862989322484341e-08 -0.008000329819090136 - rotation -0.7042699741531993 -0.7042842498385091 -0.08937280870410572 3.318905912611113 + translation 0.02599045719202514 1.7981358380048107e-07 -0.008000095794128182 + rotation -0.260439413308817 -0.2608143585831204 0.9295951712182215 1.6434911601719364 children [ DEF DRIBBLER_TRANSFORM Transform { rotation 0 1 0 1.570796327 @@ -1769,19 +1771,20 @@ DEF Y1 Robot { boundingObject USE DRIBBLER_TRANSFORM physics Physics { density -1 - mass 0.12 + mass 1.25 } } } DEF KICKER SliderJoint { jointParameters JointParameters { + position -5.893445048499387e-08 axis 1 0 0 } device [ LinearMotor { name "kicker motor" maxVelocity 20 - minPosition -1.3233159677521457e-06 + minPosition -2.2419110676378706e-05 maxPosition 0.042 maxForce 10000 } @@ -1790,8 +1793,8 @@ DEF Y1 Robot { } ] endPoint Solid { - translation -0.020000060538676367 -0.0004198255103440296 -0.024047867877849537 - rotation -1.182881708358809e-06 0.9999999999985413 1.2321992158007204e-06 1.5708019984105515 + translation -0.0200001306674418 -0.0004198494222770188 -0.024061894469276958 + rotation -1.181069130918756e-06 0.9999999999985407 1.2343786776356968e-06 1.570801851011894 children [ DEF KICKER_SHAPE Shape { geometry Box { @@ -1822,7 +1825,7 @@ DEF Y1 Robot { } } Solid { - translation 0 0.0385 0.02 + translation 0 0.043 0.02 rotation 0 0 1 1.5707903061004251 children [ Shape { @@ -1847,7 +1850,7 @@ DEF Y1 Robot { name "left sonar" } Solid { - translation 0 -0.0385 0.02 + translation 0 -0.043 0.02 rotation 0 0 1 -1.5707996938995747 children [ Shape { @@ -1872,7 +1875,7 @@ DEF Y1 Robot { name "right sonar" } Solid { - translation 0.0385 0 0.02 + translation 0.043 0 0.02 children [ Shape { appearance PBRAppearance { @@ -1896,7 +1899,7 @@ DEF Y1 Robot { name "front sonar" } Solid { - translation -0.0385 0 0.02 + translation -0.043 0 0.02 rotation 0 0 1 3.141592653589793 children [ Shape { @@ -1959,7 +1962,7 @@ DEF Y1 Robot { name "Y1" boundingObject USE ROBOT_SHAPE physics DEF ROBOT_PHYSICS Physics { - density 17000 + density 20000 centerOfMass [ 0 0 -0.1 ] @@ -1970,12 +1973,12 @@ DEF Y1 Robot { synchronization FALSE } DEF Y2 Robot { - translation 0.3519502530894836 -0.2365117727563275 0.0380918 + translation 0.36976800254147835 -0.2886410833124659 0.0380918 rotation 0 0 1 1.5699999999999998 children [ DEF FRONT_LEFT_WHEEL HingeJoint { jointParameters HingeJointParameters { - axis 0.7854 0.7854 0 + axis 0.785398 0.785398 0 anchor 0.0304039 0.0304039 -0.032 } device [ @@ -1988,8 +1991,8 @@ DEF Y2 Robot { } ] endPoint Solid { - translation 0.030695605419343613 0.030763094468236597 -0.03209706454636311 - rotation -0.2848211437594383 0.6958154303567996 0.6593313301709143 3.7007073125004357 + translation 0.030403899999999984 0.030403899999999984 -0.032 + rotation 0 0 -1 2.35619 children [ DEF FRONT_LEFT_TRANSFORM Transform { rotation 0 1 0 1.570796327 @@ -2016,7 +2019,7 @@ DEF Y2 Robot { } DEF REAR_LEFT_WHEEL HingeJoint { jointParameters HingeJointParameters { - axis -0.7854 0.7854 0 + axis -0.785398 0.785398 0 anchor -0.0304039 0.0304039 -0.032 } device [ @@ -2029,8 +2032,8 @@ DEF Y2 Robot { } ] endPoint Solid { - translation -0.030672489460413233 0.030772320041536017 -0.032101226672410846 - rotation 0.9189177210275162 -0.3824379101401104 0.0965995179556321 -2.7397990222179436 + translation -0.030403899999999984 0.030403899999999984 -0.032 + rotation 0 0 -1 0.7853953071795856 children [ DEF REAR_LEFT_TRANSFORM Transform { rotation 0 1 0 1.570796327 @@ -2047,7 +2050,7 @@ DEF Y2 Robot { } DEF REAR_RIGHT_WHEEL HingeJoint { jointParameters HingeJointParameters { - axis -0.7854 -0.7854 0 + axis -0.785398 -0.785398 0 anchor -0.0304039 -0.0304039 -0.032 } device [ @@ -2060,8 +2063,8 @@ DEF Y2 Robot { } ] endPoint Solid { - translation -0.030638322591256262 -0.030795288196791448 -0.03229858299402377 - rotation 0.8618727329541551 0.34999226341757034 0.36698883871036403 1.6267843428007798 + translation -0.030403899999999928 -0.030403899999999984 -0.032 + rotation 0 0 0.9999999999999999 0.785398 children [ DEF REAR_RIGHT_TRANSFORM Transform { rotation 0 1 0 1.570796327 @@ -2078,7 +2081,7 @@ DEF Y2 Robot { } DEF FRONT_RIGHT_WHEEL HingeJoint { jointParameters HingeJointParameters { - axis 0.7854 -0.7854 0 + axis 0.785398 -0.785398 0 anchor 0.0304039 -0.0304039 -0.032 } device [ @@ -2091,8 +2094,8 @@ DEF Y2 Robot { } ] endPoint Solid { - translation 0.030611575570730996 -0.030854408575283092 -0.032009976637865534 - rotation -0.02222349777668641 -0.067090710396049 -0.9974993497366919 3.9566620384683953 + translation 0.030403899999999928 -0.030403899999999984 -0.032 + rotation 0 0 1 2.3561900000000002 children [ DEF FRONT_RIGHT_TRANSFORM Transform { rotation 0 1 0 1.570796327 @@ -2109,6 +2112,7 @@ DEF Y2 Robot { } DEF DRIBBLER HingeJoint { jointParameters HingeJointParameters { + position 8873.53458988807 axis 0 1 0 anchor 0.026 0 -0.008 suspensionAxis 0 0 1 @@ -2123,8 +2127,8 @@ DEF Y2 Robot { } ] endPoint Solid { - translation 0.025998987101440007 9.862989322484341e-08 -0.008000329819090136 - rotation -0.7042699741531993 -0.7042842498385091 -0.08937280870410572 3.318905912611113 + translation 0.025990457192025085 1.7981358385599222e-07 -0.008000095794128182 + rotation -0.260439413308817 -0.2608143585831204 0.9295951712182215 1.6434911601719364 children [ DEF DRIBBLER_TRANSFORM Transform { rotation 0 1 0 1.570796327 @@ -2143,19 +2147,20 @@ DEF Y2 Robot { boundingObject USE DRIBBLER_TRANSFORM physics Physics { density -1 - mass 0.12 + mass 1.25 } } } DEF KICKER SliderJoint { jointParameters JointParameters { + position -5.893445048499387e-08 axis 1 0 0 } device [ LinearMotor { name "kicker motor" maxVelocity 20 - minPosition -1.3233159677521457e-06 + minPosition -2.2419110676378706e-05 maxPosition 0.042 maxForce 10000 } @@ -2164,8 +2169,8 @@ DEF Y2 Robot { } ] endPoint Solid { - translation -0.0200000605386762 -0.0004198255103440296 -0.024047867877849537 - rotation -1.182881708358809e-06 0.9999999999985413 1.2321992158007204e-06 1.5708019984105515 + translation -0.020000130667441773 -0.0004198494222769633 -0.024061894469276958 + rotation -1.181069130918756e-06 0.9999999999985407 1.2343786776356968e-06 1.570801851011894 children [ DEF KICKER_SHAPE Shape { geometry Box { @@ -2196,7 +2201,7 @@ DEF Y2 Robot { } } Solid { - translation 0 0.0385 0.02 + translation 0 0.043 0.02 rotation 0 0 1 1.5707903061004251 children [ Shape { @@ -2221,7 +2226,7 @@ DEF Y2 Robot { name "left sonar" } Solid { - translation 0 -0.0385 0.02 + translation 0 -0.043 0.02 rotation 0 0 1 -1.5707996938995747 children [ Shape { @@ -2246,7 +2251,7 @@ DEF Y2 Robot { name "right sonar" } Solid { - translation 0.0385 0 0.02 + translation 0.043 0 0.02 children [ Shape { appearance PBRAppearance { @@ -2270,7 +2275,7 @@ DEF Y2 Robot { name "front sonar" } Solid { - translation -0.0385 0 0.02 + translation -0.043 0 0.02 rotation 0 0 1 3.141592653589793 children [ Shape { @@ -2333,7 +2338,7 @@ DEF Y2 Robot { name "Y2" boundingObject USE ROBOT_SHAPE physics DEF ROBOT_PHYSICS Physics { - density 17000 + density 20000 centerOfMass [ 0 0 -0.1 ] @@ -2349,7 +2354,7 @@ DEF Y3 Robot { children [ DEF FRONT_LEFT_WHEEL HingeJoint { jointParameters HingeJointParameters { - axis 0.7854 0.7854 0 + axis 0.785398 0.785398 0 anchor 0.0304039 0.0304039 -0.032 } device [ @@ -2362,8 +2367,8 @@ DEF Y3 Robot { } ] endPoint Solid { - translation 0.030695605419343613 0.030763094468236597 -0.03209706454636311 - rotation -0.2848211437594383 0.6958154303567996 0.6593313301709143 3.7007073125004357 + translation 0.03040390000000001 0.030403900000000005 -0.032 + rotation 0 0 -1 2.35619 children [ DEF FRONT_LEFT_TRANSFORM Transform { rotation 0 1 0 1.570796327 @@ -2390,7 +2395,7 @@ DEF Y3 Robot { } DEF REAR_LEFT_WHEEL HingeJoint { jointParameters HingeJointParameters { - axis -0.7854 0.7854 0 + axis -0.785398 0.785398 0 anchor -0.0304039 0.0304039 -0.032 } device [ @@ -2403,8 +2408,8 @@ DEF Y3 Robot { } ] endPoint Solid { - translation -0.030672489460413233 0.030772320041535982 -0.032101226672410846 - rotation 0.9189177210275162 -0.3824379101401104 0.0965995179556321 -2.7397990222179436 + translation -0.030403899999999984 0.030403899999999994 -0.032 + rotation 0 0 -1 0.7853953071795856 children [ DEF REAR_LEFT_TRANSFORM Transform { rotation 0 1 0 1.570796327 @@ -2421,7 +2426,7 @@ DEF Y3 Robot { } DEF REAR_RIGHT_WHEEL HingeJoint { jointParameters HingeJointParameters { - axis -0.7854 -0.7854 0 + axis -0.785398 -0.785398 0 anchor -0.0304039 -0.0304039 -0.032 } device [ @@ -2434,8 +2439,8 @@ DEF Y3 Robot { } ] endPoint Solid { - translation -0.030638322591256317 -0.030795288196791355 -0.03229858299402377 - rotation 0.8618727329541551 0.34999226341757034 0.36698883871036403 1.6267843428007798 + translation -0.030403899999999928 -0.030403899999999984 -0.032 + rotation 0 0 0.9999999999999999 0.785398 children [ DEF REAR_RIGHT_TRANSFORM Transform { rotation 0 1 0 1.570796327 @@ -2452,7 +2457,7 @@ DEF Y3 Robot { } DEF FRONT_RIGHT_WHEEL HingeJoint { jointParameters HingeJointParameters { - axis 0.7854 -0.7854 0 + axis 0.785398 -0.785398 0 anchor 0.0304039 -0.0304039 -0.032 } device [ @@ -2465,8 +2470,8 @@ DEF Y3 Robot { } ] endPoint Solid { - translation 0.030611575570730996 -0.030854408575283092 -0.032009976637865534 - rotation -0.02222349777668641 -0.067090710396049 -0.9974993497366919 3.9566620384683953 + translation 0.030403900000000025 -0.030403899999999994 -0.032 + rotation 0 0 1 2.3561900000000002 children [ DEF FRONT_RIGHT_TRANSFORM Transform { rotation 0 1 0 1.570796327 @@ -2483,6 +2488,7 @@ DEF Y3 Robot { } DEF DRIBBLER HingeJoint { jointParameters HingeJointParameters { + position 8873.53458988807 axis 0 1 0 anchor 0.026 0 -0.008 suspensionAxis 0 0 1 @@ -2497,8 +2503,8 @@ DEF Y3 Robot { } ] endPoint Solid { - translation 0.025998987101440007 9.862989322484341e-08 -0.008000329819090136 - rotation -0.7042699741531993 -0.7042842498385091 -0.08937280870410572 3.318905912611113 + translation 0.025990457192025113 1.7981358380625445e-07 -0.008000095794128182 + rotation -0.260439413308817 -0.2608143585831204 0.9295951712182215 1.6434911601719364 children [ DEF DRIBBLER_TRANSFORM Transform { rotation 0 1 0 1.570796327 @@ -2517,20 +2523,20 @@ DEF Y3 Robot { boundingObject USE DRIBBLER_TRANSFORM physics Physics { density -1 - mass 0.12 + mass 1.25 } } } DEF KICKER SliderJoint { jointParameters JointParameters { - position -1.388140960003884e-17 + position -5.893445048499279e-08 axis 1 0 0 } device [ LinearMotor { name "kicker motor" maxVelocity 20 - minPosition -1.3233159677521457e-06 + minPosition -2.2419110676378706e-05 maxPosition 0.042 maxForce 10000 } @@ -2539,8 +2545,8 @@ DEF Y3 Robot { } ] endPoint Solid { - translation -0.020000060538676354 -0.0004198255103439872 -0.024047867877849537 - rotation -1.182881708358809e-06 0.9999999999985413 1.2321992158007204e-06 1.5708019984105515 + translation -0.020000130667441787 -0.00041984942227696776 -0.024061894469276958 + rotation -1.181069130918756e-06 0.9999999999985407 1.2343786776356968e-06 1.570801851011894 children [ DEF KICKER_SHAPE Shape { geometry Box { @@ -2571,7 +2577,7 @@ DEF Y3 Robot { } } Solid { - translation 0 0.0385 0.02 + translation 0 0.043 0.02 rotation 0 0 1 1.5707903061004251 children [ Shape { @@ -2596,7 +2602,7 @@ DEF Y3 Robot { name "left sonar" } Solid { - translation 0 -0.0385 0.02 + translation 0 -0.043 0.02 rotation 0 0 1 -1.5707996938995747 children [ Shape { @@ -2621,7 +2627,7 @@ DEF Y3 Robot { name "right sonar" } Solid { - translation 0.0385 0 0.02 + translation 0.043 0 0.02 children [ Shape { appearance PBRAppearance { @@ -2645,7 +2651,7 @@ DEF Y3 Robot { name "front sonar" } Solid { - translation -0.0385 0 0.02 + translation -0.043 0 0.02 rotation 0 0 1 3.141592653589793 children [ Shape { @@ -2708,7 +2714,7 @@ DEF Y3 Robot { name "Y3" boundingObject USE ROBOT_SHAPE physics DEF ROBOT_PHYSICS Physics { - density 17000 + density 20000 centerOfMass [ 0 0 -0.1 ]