Student Lounge

Sharing technical and real-life examples of how students can use MATLAB and Simulink in their everyday projects #studentsuccess

Designing Robots to Play Rugby by Team KJSCE Robocon

For today’s post, Maitreyee Mordekar would like to introduce you to Team KJSCE Robocon from K. J. Somaiya College of Engineering, Mumbai, India. The team has scored an All-India Rank 8 in National-DD Robocon 2020 along with obtaining the highest scores in Stage 1 and Stage 2 of the competition. The team will share their experience of using MATLAB and Simulink for designing their robots to play Rugby game. The stage is all yours!

Physical body simulations are a crucial part of the design for any robot builder. It gives the designer an idea about the feasibility of the concept and helps in thorough analysis in different situations. We, at MATLAB IP Team (including Anish Pawar, Dhruv Joshi, Hritik Jaiswal, Kamal Rohra and Viraj Thakkar) of Team KJSCE Robocon 2020, used Simulink and Simscape to create simulations of the various mechanisms for the National DD-Robocon 2020 robotics Competition.

The task was to develop robots to play rugby 7, which involves kicking and transporting a rugby ball. The contest is to play a rugby 7’s game using two robots (a Throwing Robot and a Kicking Robot). The seven members team in the arena consisted of the two robots and five obstacles as five defending players. The goal is to enable the Throwing Robot (TR) and Kicking Robot (KR) robots to collaborate and kick a ball over a crossbar common for both teams. Check this video to understand the competition problem statement.

In this blog, we will talk about:

  • How did we model the Rugby ball?
  • The problem statement, the design proposal and validation for the Kicking Robot and the Throwing Robot
  • Design of the Holonomic Drive
  • How did we prepare ourselves to design the robots?

How did we model the Rugby Ball?

Since the problem revolved around a rugby ball, the first place where we started was to model a Rugby ball. When we started with the work, the feature of modeling an ellipsoidal solid wasn’t present in Simscape; which is added as a feature now. What took us about a week to model, could probably be done with just a simple block now!

Our initial idea to create a rugby ball from several small spheres (can be imagined as multiple spheres inside the rugby ball). However, since it would require multiple contacts, the computational power that would have been needed, would have been a lot higher. Hence, we devised a new method to generate custom contact surfaces; we used a combination of spheres to model an ellipsoid

  • Each contact sphere had a fixed displacement from the center of the rugby ball
  • We determined the radius of the sphere from the radius of curvature of the rugby ball.

This is how, we needed a few contacts as compared to creating thousands of small point-sized spheres contact force, making it computationally lighter and, faster.

This approximate model gave us an accurate result helping us accurately simulate the collision between ball and ground.

Modeling the Throwing Robot

The Problem:

What is the optimum pressure range for a projectile range of 5-6 meters of the rugby ball using our proposed design idea? Was it possible to get the desired range using our idea?

Our Proposed Design:

To achieve this, the translational motion of the piston is provided to the rotational arm with the help of a gear sprocket. The sprocket, which rotates the arm, giving the rugby ball a projectile motion.

The Solution:

First things first, we designed our proposed physical design using Simscape and Simscape Multibody. We then had to find the exact pressure that would be needed to throw the ball. And, hence had to work on a little bit of theory and apply it to our Simscape model.

We needed to understand the relationship between the torque applied on the sprocket to move the arm controlled by the input pressure. We used the physics equation,

$Pressure \left (P  \right ) = \frac{F}{A} \; and \; Torque \left ( \tau  \right ) = r\times F$

Including the frictional force of the piston,

Force = (pressure provided by piston * area of the piston) – frictional force of the piston

$F_{s} = (P*A) – F_{f}f$


Torque applied to the sprocket = radius of sprocket * force applied on sprocket

$ \tau_{sprocket} =  r * F_{s}$

We provided this calculated torque to the revolute joint that lies in the same frame as the sprocket, eventually causing the circular motion.

By providing various inputs with the pressure range between 4-6 bar in steps of 0.2 bar, we got the trajectory of the rugby ball. We chose 11.25 degrees as the orientation to the vertical degrees since for a given torque, we practically observed that the maximum range at this angle.

Whenever the height of the rugby ball is zero (denoted by blue line), the ball touches the floor. And we find the corresponding horizontal distance (denoted by the yellow line) from the place it was launched. And after doing the simulations we obtained the desired projectile range for a pressure range of 4 to 4.4 bar.

Designing the Kicking Robot

The Problem:

What is the optimal pressure to be applied to the joint to ensure that the rugby ball gets over the crossbar (located at a height of 1.47 meters from the floor at a distance of 10 meters from the location of the kicking robot)?

Our Proposed Design:

The rugby is placed on a tee making an angle of 10 degrees with the vertical. The tilt is to account for any minor tilt that may be present while placing the ball. A motor rotates the output shaft through 330 degrees in the anti-clockwise direction, which in turn rotates the kicking section and kicking surface. The kicking surface hits the rugby ball, giving it the required momentum for the desired projectile motion.

The Solution:

The contact model for the kicking mechanism was similar to the model used in the throwing mechanism with a few minor tweaks. Only lower half of the ball was modelled with contact forces for contact with the tee on 4 surfaces (2 spherical and 2 disc shaped; the entire contact surface of the ball was modelled for simulating contact between the ground and the ball as well as between the kicking surface and the ball.

Like you may have understood by now, we were simulating the mechanical impulse between the kicking surface and the ball. Thus, we needed the details of contact stiffness as the ball deforms slightly due to the impulse. We determined this experimentally using a pencil, a ruler, a wooden plank and a loadcell.  We calculated the average stiffness to be 73497.3 N/m

Like the throwing mechanism, we connected a transform sensor between the ball and the tee to get the x, y and z displacements of the ball. We then validated that at 10 meters from the robot (yellow line), the height (blue line) was greater than 1.47 meters, which meant that it was a score!

We tried the results that we obtained from simulations on the real robots too and as expected the results were coherent with the simulations. The actual experimental model gave optimum results for applied torque range of 5.0 – 5.6 Nm , which were determined from our simulation results (5.2 – 5.4 Nm torque range).

Working on the Holonomic Drive

For the next part, we wanted to find the best possible path for the Kicking Robot robot along with catching the rugby ball passed by the Throwing Robot. This was to ensure that the robot can place the ball in a Try Spot to ensure that it takes the least time to traverse.

Finding the Optimal Paths

We worked on developing the entire arena using Simscape Multibody. We then imported our Kicking Robot using the Brick Solid and Rigid Transform blocks.  Along with that, we imported the chassis and the wheels via .STEP files.

We first worked on understanding what would be the optimal path by applying the force at the Center of gravity. We worked with various paths for the robot to reach TRY SPOTs 1 through 5. Working through simulations and analyzing the time, we found that diagonal paths work well for the TRY 2 and 3 whereas parabolic paths for TRY 4 and 5. We derived the equations for TRY SPOTs  4 and 5 theoretically by using the original and desired location traversed by the center of the robot. These turned out to be

$Y= = 2.5 + \sqrt{3.854\ast \left ( x – 0.575 \right ) }$


$Y= = 2.5 + \sqrt{5.2\ast \left ( x – 0.575 \right ) }$

respectively. And, we provided these inputs to our input drive for the robot.

Like mentioned previously, we had just worked on getting the paths for our robots by providing the coordinates at the center of gravity of the robot, which to a large extent isn’t the exact representation of the robot’s movement in the arena.

Holonomic Drive with Wheel Rotation

The major challenge here was to design the mechanism of the omni wheel. We imported the .STEP files of the omni wheel and used the spatial contact force feature available in Simscape Multibody. Our omni wheel comprised of a plastic center frame and rubberized rollers. While designing the simulations, we had to accurately determine the damping of the two materials using manual optimization (we took damping of Chrome Metal as a reference).

We used PID control logic in Simulink to maneuver the robot through the arena. We used two PIDs were used in a cascade to control the bot. The outer PID was used to reach a set target point based on the reading from the transform sensor. The output of this PID was given to the inner PID which gave velocity to the revolute joint of the wheels based on the readings from the transform sensor thus accurately simulating the servos used in the actual bot.

However, due to timeline we were able to achieve just straight-line paths. This is something we will improve and achieve in the coming years.

How did we prepare ourselves to design the robots?

The proposed models were successfully simulated using the MathWorks tools and it helped us to finalize our robot design without rigorous physical testing. This was a huge help to save time and manpower considering we did not have immediate access to the hardware in these unprecedented times.

Our journey to build our robot began by starting with the Onramps which are a great way to start. Once we felt that we had a grasp on the basics, we progressed to checking videos from MATLAB and Simulink Robotics Arena from the student tutorials and videos page. The videos that especially helped us were the videos on Simulating Throwing Robot Mechanisms; it was a great point for us to get started to build the models according to our requirement. This helped us to ramp up on the basics so that we could proceed with applying the basics to build our Throwing Robot and a Kicking Robot to play Rugby with the opponent team.

We are thankful to MathWorks for providing us a robust simulation platform for physical modelling.

We hope you enjoyed our blog, if you have any questions or comments, please feel free to reach out to us at! You can also check out our video, model files and our journey!


  • print


To leave a comment, please click here to sign in to your MathWorks Account or create a new one.