#Robotics Hints for creating a successful OnStage Performance Dancing Robot

David Meego - Click for blog homepageToday’s article is a welcome addition to David’s Robotics Portal. It is a “brain dump” of all the hints, tricks and techniques I can think of that will help you create a successful dancing robot for the Robocup Junior Australia Onstage Performance challenge.

If you are planning to compete in this challenge, the information in this article will help you get the best performance and the most points you can.

As always, this information is my opinion as a mentor and is based on my experiences working with teams at All Saints’ College in Perth. I have not judged the competition but have mentored a number of teams that have won WA State Championships and Australian National Championships over the years.

Read the Rules

Probably the most important of all the hints in this article: Read and understand the rules and score sheets. Check off that your robot(s) meet each requirement on the score sheet to ensure the highest scores.

Journal and Technical Description Paper

Keep a journal. Not a diary, but a technical journal describing the issues you have come across and how you solved them. Include photos, screenshots and maybe even backups of program code.

Document what changes were made and why and which worked, and which didn’t. Only make one change at a time and test straight away so you can know if that change improves the robot or not.

Having the Journal will help you create an interesting Technical Description Paper full of information that the judges want to see. The Judges want to know that this is your work and how you got to the final result.

Interviews

During the interviews, make sure you highlight anything technically challenging or clever you did that differentiates you from your competitors. Sell your performance and robot(s).

Do not miss getting interviewed as this will throw away a large proportion of your final score. Don’t laugh, it does happen!

Music

I would recommend choosing music that is well known (to all ages) with a strong beat and a chorus that the audience can sing or clap along to. Encourage the audience to get involved.

Music should have method to start your robot(s) on time. Beeps or know when to press a button after then start of song.

Make sure music lyrics don’t include any banned content (such as violence, sexual, or inappropriate language).

If combining more than one song, try to make a smooth transition at the appropriate time. Beat mix (keeping the same beat going) if possible. Having songs with a similar BPM (Beats Per Minute) helps with mixing.

Dancing and Props

Dancing along with the robot and having props can help create a more interesting performance, but make sure you understand how many points they are worth and remember that the robot is worth the most points.

Robot Costumes

If you put a costume on the robot, make sure it will not cause the robot to jam or fail.

Make sure the costume can be easily taken off and on or can be opened and closed. This is so you can make fixes or battery replacements easier, but also so you can show the workings of the robot to the judges during interviews.

Starting

It is recommended to download the program to the brick/controller and start the program from the brick/controller rather than for a laptop or tablet.

Compiling and downloading takes time that should not be part of your performance if you have to restart. Having the program loaded on the brick/controller avoids this.

Don’t start the routine immediately on program start, instead start the routine with button or touch sensor press so you can start it in time with the music.

When button pressed, in your program store start time variable or reset a timer clock.

Timing

Once the routine has started use a timer to keep the timing of each move in sync with the music.

If the timer clock cannot be reset, then use current time – start time to get the time since start of the routine.

Don’t use commands to pause or wait for x seconds. Instead use commands to wait until x seconds since the start is reached. That way you can match the time signatures in the music exactly.

Never use equals (=) for checking timing, always use less than and equal (<=) or greater than and equal (>=). This avoids the risk of missing a point in time because time will only be exactly equal to a value for 1ms.

Motor Control

Calibrate motors that have a range of motion. On starting the program, run a calibration for each motor. Move in one direction using low power until rotation sensor stops changing. Reset rotation sensor. Move in opposite direction until rotation sensor stops changing. Store the value of rotation sensor as a maximum value. This gives a range from zero to a maximum value.

Describe motions using percentage. 0-100%, where 50% is middle position. So, if you want to move to the middle position, your code can move the motor until the rotation sensor >= or <= 0.50 * maximum value.

Never use equals (=) for checking rotations, always use less than and equal (<=) or greater than and equal (>=). This avoids the risk of missing a point in the motion because the rotation will only be exactly equal to a value for 1 degree.

To move a motor to a specific rotation position: Read current rotation sensor to see which direction to move in. Start motors at desired speed. Loop until target rotation position reached OR time limit for motion reached. Stop motors on exiting loop.

Using the additional time limit ensures robot does not get stuck if it cannot reach target position for any reason. This prevents the program locking up and freezing when a motor position cannot be reached for any reason.

Stop motors without braking for smoother motions or with braking if sharp finishing motions are desired (such as Popping and Locking).

If you want a motor to hold its position after a motion then use stop with braking.

Threads

You can use multiple starts or threads to perform multiple motor motions on a single brick at the same time.

Using threads does divide the processing power of the brick for each thread so avoid using too many.

Sensors

Use light sensors to detect the edge of the performance area and stop movement if the robot will exit the area.

Use a gyroscope (gyro) sensor to help control the robot’s orientation within the performance area.

Use a touch sensor to start the routine with the music after the program has been started.

Use an ultrasonic or infrared sensor if you want to be able to interact with your robot by waving at it.

Planned Interaction

There are points available for planned interactions, such as waving at the robot to make it take some action.

If you have planned interactions with the robot, let the judges know what to expect, to avoid being penalized for an unplanned interaction/correction.

Movement

Use Mecanum wheels or Omni wheels (3 at 120 degrees or 4 at 90 degrees) create a holonomic or Killough platform to control motion of robot’s base. This will allow any movement direction and rotation. See the article below for more information:

Movement of entire robot should have light sensor(s) to prevent robot moving out of performance area. Stop motion when black edge detected.

Use a gyro sensor to control rotational position or orientation within the performance area. Make sure robot is flat on ground when starting up brick/controller to avoid gyro drift. Reset gyro value when starting routine.

When moving in a specific direction use gyro to adjust direction to compensate for wheel slippage. When rotating rotate until gyro value reached (use >= or <= depending on direction of rotation). Use modulus/remainder value of gyro reading divided by 360 degrees to get direction robot is facing regardless of if it has rotated more than one rotation.

Add rotate back to correct direction code at end of each motion to restore to desired robot orientation. Should not be needed if gyro being used when moving but keeps robot facing correct direction relative to the judges.

Use trigonometry to calculate motor speeds to allow motion any direction (360 degrees), rather than just simple 8 directions.

For example: SpeedX = Speed * cos(Direction), SpeedY = Speed * sin(Direction)

Note: Check if the cos() and sin() functions need to be passed degrees or radians and convert as needed.

Multiple Controllers

If using multiple bricks. Join touch sensors together to start routines together.

Better still, use Bluetooth communication. select a master brick to start the routine. Send messages to the other bricks to start the routines together. Using Bluetooth communication is worth points.

Take it to the next level and send Bluetooth messages to other slave bricks when each dance move is needed. Slave bricks should loop waiting for Bluetooth message, then start desired dance move when message is received.

I hope all this information is helpful to you. I will update this article as more ideas come to mind.

Remember to have fun.

David

12-Sep-2023: Added note on degrees vs radians for trigonometry functions and note about using stop with braking to get a motor to hold its position.

This article was originally posted on http://www.winthropdc.com/blog.

Please post feedback or comments

This site uses Akismet to reduce spam. Learn how your comment data is processed.