Skip to content

ali-hamidi2000/RoboticSoccerPlayGround

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

17 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation


HSL
Humanoid Soccer Robot

.:: Soccer Robot Playground ::.

HSL HSL HSL HSL HSL

Languages

Robocup Rules

According to the PDF file taken from the official RoboCup website, we have to design the competition field dynamically, that is, we should not have any problem displaying it on any screen with any resolution.


HSL

Installation

install necessary libraries for python with these command :

  • for install opencv library

    pip install opencv-python
  • for install numpy library

    pip install numpy

Land proportions according to RoboCup rules

Land ratios for KidSize Robot with Python programming language :

fieldLength = 9 * meter2Pixel
fieldWidth = 6 * meter2Pixel
goalDepth = 0.6 * meter2Pixel
goalWidth = 2.6 * meter2Pixel
goalHeight = 1.2 * meter2Pixel
goalAreaLength = 1 * meter2Pixel
goalAreaWidth = 3 * meter2Pixel
penaltyMarkDistance = 1.5 * meter2Pixel
centerCircleDiameter = 1.5 * meter2Pixel
borderStripWidth = 1 * meter2Pixel
penaltyAreaLength = 2 * meter2Pixel
penaltyAreaWidth = 5 * meter2Pixel

windowWidth = fieldWidth + 2 * borderStripWidth
windowLength = fieldLength + 2 * borderStripWidth
penaltyRadius = int(0.075 * meter2Pixel)
robotSize = int(0.27 * meter2Pixel)
radius = int(1.5 / 2 * meter2Pixel)

Land ratios for AdultSize Robot with Python programming language :

fieldLength = 14 * meter2Pixel
fieldWidth = 9 * meter2Pixel
goalDepth = 0.6 * meter2Pixel
goalWidth = 2.6 * meter2Pixel
goalHeight = 1.8 * meter2Pixel
goalAreaLength = 1 * meter2Pixel
goalAreaWidth = 4 * meter2Pixel
penaltyMarkDistance = 2.1 * meter2Pixel
centerCircleDiameter = 3 * meter2Pixel
borderStripWidth = 1 * meter2Pixel
penaltyAreaLength = 3 * meter2Pixel
penaltyAreaWidth = 6 * meter2Pixel

windowWidth = fieldWidth + 2 * borderStripWidth
windowLength = fieldLength + 2 * borderStripWidth
penaltyRadius = int(0.075 * meter2Pixel)
robotSize = int(0.27 * meter2Pixel)
radius = int(1.5 / 2 * meter2Pixel)

Create a Empty Ground

Source Code :

Ground = np.zeros((windowWidth, windowLength, 3), np.uint8)

Ground[:] = (0, 150, 0)

# Points corresponding to the quadrant of the Ground
pointA = (borderStripWidth, borderStripWidth)
pointB = (borderStripWidth + fieldLength, borderStripWidth)
pointC = (borderStripWidth + fieldLength, borderStripWidth + fieldWidth)
pointD = (borderStripWidth, borderStripWidth + fieldWidth)

cv2.line(Ground, pointA, pointD, (255, 255, 255), 2, 8, 0)
cv2.line(Ground, pointB, pointC, (255, 255, 255), 2, 8, 0)
cv2.line(Ground, pointC, pointD, (255, 255, 255), 2, 8, 0)
cv2.line(Ground, pointA, pointB, (255, 255, 255), 2, 8, 0)

#-----------------Middle Line---------------
pointMiddlelineA = (borderStripWidth + fieldLength//2, borderStripWidth)
pointMiddlelineB = (borderStripWidth + fieldLength//2, borderStripWidth + fieldWidth)
cv2.line(Ground, pointMiddlelineA, pointMiddlelineB, (255, 255, 255), 2, 8, 0)

Create a Empty Ground & Penalty Mark Distance

The coordinates of each point for this section are as follows:


HSL

Penalty Area Length & Width

The coordinates of each point for this section are as follows:


HSL

Goal Area Length & Width

The coordinates of each point for this section are as follows:


HSL

Goal Depth & Width

The coordinates of each point for this section are as follows:


HSL

Center Circle Diameter

The coordinates of each point for this section are as follows:


HSL

Final Shape

After all of that you should see something like this:


HSL

Developers πŸ‘¨πŸ»β€πŸ’»

Awrsha Parvizi
.:: Amir M. Parvizi ::.

Sheikh Ahmadi
.:: Mohammad Reza Sheikh Ahmadi ::.

System & Hardware πŸ› 


βš™οΈ Things I use to get stuff done
  • OS: Windows 11
  • Laptop: TUF Gaming
  • Code Editor: Visual Studio Code - The best editor out there.
  • To Stay Updated: Medium, Linkedin and Instagram.

  • βš›οΈ Checkout Our VSCode Configrations Here.

πŸ’™ If you like my projects, Give them ⭐ and Share it with friends!

Github Stats

About

Humanoid Soccer Robot Playground

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published