Module-5 ME71Notes
Module-5 ME71Notes
ME VII Semester
2021 Scheme
Module-5
Robot programming
Dr. Shanthala K.
Assistant Professor,
Department of Mechanical Engineering
RVITM, Bengaluru – 560076
Email: shanthalak.rvitm@rvei.edu.in
RV Institute of Technology & Management®
Sy.No.171/5, Kothanur,8th Phase, JP Nagar, Bengaluru-560076
Module-5
Robot programming
Robot programming involves creating and implementing algorithms that enable robots to
perform specific tasks either autonomously or semi-autonomously. This process includes
defining the sequence of operations, movements, and actions required for the robot to achieve
its goals.
The complexity of programming can vary significantly based on the robot type, its application,
and the operating environment. Techniques in robot programming range from basic scripting
to advanced methods involving machine learning and artificial intelligence. The primary
objective is to ensure the robot operates efficiently, accurately, and safely, particularly in
dynamic or unpredictable conditions.
Over time, robot programming has advanced from simple teach-by-showing techniques to
sophisticated task-level programming. Modern methods often employ specialized robot
programming languages or extend general-purpose languages with robot-specific libraries.
Task-level programming seeks to simplify the process by allowing users to specify high-level
goals, with the system handling detailed actions and planning, though it continues to be a
developing area of research.
Teach by showing is one of the earliest methods of programming robots. This approach
involves manually guiding the robot to a desired position and recording the robot’s position
data. The process includes:
• Teaching Phase: The user moves the robot to target positions manually or with a teach
pendant, which is a handheld device used to control the robot's joints or Cartesian
degrees of freedom.
• Recording Positions: During this phase, the robot’s positions are recorded in memory.
RV Institute of Technology & Management®
Sy.No.171/5, Kothanur,8th Phase, JP Nagar, Bengaluru-560076
• Playback: The recorded positions are played back to repeat the same movements.
Teach pendants often come with features like alphanumeric displays and allow for basic logic
operations, making them somewhat similar to hand-held terminals. For example, the GMF
S380 used in automobile-body spot-welding applications is programmed using a teach pendant
interface.
With the advent of powerful computers, programming robots began to shift towards using
explicit robot programming languages (RPLs). These languages are designed to address the
specific needs of robot control and are categorized into three main types:
• Specialized Manipulation Languages: These are entirely new languages created for
robot control but may lack general programming features. For example, VAL (used by
Unimation, Inc.) and its successors V-Il and V+ were designed specifically for
manipulating robots. Similarly, AL developed at Stanford University included features
for force control and parallelism.
• Robot Libraries for Existing Computer Languages: These languages are built by
adding robot-specific libraries to popular general-purpose languages. Examples include
AR-BASIC (a library for BASIC) and JARS (based on Pascal, developed by NASA).
• Robot Libraries for New General-Purpose Languages: These involve creating a new
general-purpose language and then adding robot-specific libraries. Examples include
RAPID (by ABB Robotics), AML (by IBM), and KAREL (by GMF Robotics).
• High-Level Instructions: Users provide commands like "grasp the bolt" without
specifying the exact steps for the robot to achieve the goal.
• Automatic Planning: The system autonomously plans paths, avoids obstacles, and
chooses grasp points.
• Automatic Execution: The robot performs the task based on the high-level
instructions, with detailed actions handled by the system itself.
Task-level programming is distinct from explicit robot programming languages due to its focus
on high-level task goals rather than low-level control. Although true task-level programming
is still a developing area, it represents a significant step towards simplifying robot
programming and enhancing flexibility.
A robot programming language must meet several key requirements to effectively control
robotic systems and enable them to perform complex tasks. These requirements ensure that
the language is both practical for developers and efficient for robotic applications.
k. Community and Ecosystem Support : A strong community and ecosystem are vital
for the continued development and support of a programming language. This includes
access to libraries, frameworks, documentation, and forums where developers can share
knowledge and collaborate on projects.
Robot programming languages, while essential for enabling the precise control and operation
of robotic systems, come with several challenges and limitations. These issues can affect the
efficiency, flexibility, and ease of use of robot programming, impacting the development and
deployment of robotic applications.
a. Complexity and Steep Learning Curve: Robot programming languages often require
a deep understanding of both programming concepts and the robot's hardware. The
complexity of these languages can create a steep learning curve, making it difficult for
beginners or those without a strong technical background to effectively program robots.
This complexity can also lead to longer development times and increased costs.
b. Lack of Standardization: The field of robotics lacks a universally accepted standard
for robot programming languages. Different manufacturers often use proprietary
languages or frameworks, leading to compatibility issues when integrating robots from
different vendors or when upgrading systems. This fragmentation can hinder
collaboration, increase costs, and limit the reusability of code across different
platforms.
c. Difficulty in Debugging and Error Handling : Debugging robotic programs can be
particularly challenging due to the real-time nature of robotic operations and the
interaction with complex physical environments. Errors in robot programming can lead
to unpredictable behavior, potentially causing damage to equipment or posing safety
risks. Robust debugging tools and error-handling mechanisms are often lacking in many
robot programming environments, complicating the development process.
d. Real-Time Constraints : Robots often need to process data and respond to events in
real-time, which places significant demands on the programming language. Ensuring
that the language can handle real-time processing without delays or latency is crucial,
especially in applications where timing is critical, such as autonomous vehicles or
RV Institute of Technology & Management®
Sy.No.171/5, Kothanur,8th Phase, JP Nagar, Bengaluru-560076
j. Usability and User Interface Issues: Many robot programming environments are not
user-friendly, with interfaces that are difficult to navigate or poorly designed for the
needs of programmers. This can slow down the development process, increase the
likelihood of errors, and create frustration for users. Improving the usability of these
environments is crucial for making robot programming more accessible and efficient.
a. Path Planning and Optimization: One of the primary subtasks in robot programming
is path planning, where the robot's movements are mapped out to complete a task
efficiently. In OLP systems, automating path planning involves using algorithms that
automatically calculate the optimal path for the robot to follow, considering factors
such as speed, collision avoidance, and energy efficiency.
b. Collision Detection: Automating collision detection is crucial in OLP systems to
prevent the robot from coming into contact with objects or obstacles in its environment.
This is typically done through simulation software that continuously monitors the
robot's movements and provides real-time feedback on potential collisions, allowing
for automatic adjustments.
c. Task Sequencing: Task sequencing involves determining the order in which the robot
should perform various actions. Automating this process in OLP systems ensures that
RV Institute of Technology & Management®
Sy.No.171/5, Kothanur,8th Phase, JP Nagar, Bengaluru-560076
tasks are executed in the most logical and efficient sequence, reducing the likelihood of
errors or unnecessary movements.
d. Tool and Workpiece Management: OLP systems can automate the management of
tools and workpieces, including selecting the appropriate tools for specific tasks,
positioning them correctly, and switching between them as needed. This automation
reduces manual intervention and streamlines the production process.
e. Error Handling and Recovery: Automating error handling in OLP systems involves
creating predefined responses to potential errors, such as mechanical failures or
unexpected obstacles. This ensures that the robot can either correct the error
autonomously or alert operators to take appropriate action, minimizing downtime.
f. Data Collection and Analysis: Finally, automating data collection and analysis in OLP
systems allows for continuous monitoring of the robot's performance. This data can be
used to make further improvements to the programming, optimize operations, and
predict maintenance needs.
Robot programming involves writing instructions that tell a robot what to do. These
instructions are written in a programming language that the robot's control system can
understand. The goal is to automate tasks that might be repetitive, precise, or even dangerous
for humans.
• Kinematics: Refers to the movement of the robot's joints and links. Understanding
kinematics helps in determining how the robot moves from one position to another.
• Control Systems: These are the brains of the robot. They process the program and send
signals to the robot's motors and actuators to execute tasks.
• Sensors and Actuators: Sensors provide feedback about the environment (e.g.,
distance to objects), and actuators (like motors) move the robot's parts.
RV Institute of Technology & Management®
Sy.No.171/5, Kothanur,8th Phase, JP Nagar, Bengaluru-560076
• Flexibility: The language should allow the robot to perform various tasks.
• Ease of Use: It should be easy for programmers to write and modify instructions.
• Real-Time Processing: The language should support real-time control, where the
robot can respond immediately to changes in its environment.
Scenario
Imagine a robot on an assembly line. Its job is to pick up a part from one spot and place it in
another. This is a common task in factories where robots help in assembling products.
Program Overview
✓ Command: move_to_pick_position()
RV Institute of Technology & Management®
Sy.No.171/5, Kothanur,8th Phase, JP Nagar, Bengaluru-560076
✓ This command tells the robot to move its arm to the location where the part is
ready to be picked up.
✓ Real-World Example: Like moving your hand over to pick up a book from a
table.
2. Activate Gripper
✓ Command: activate_gripper()
✓ The gripper (the robot’s hand) closes around the part to hold it securely.
✓ Real-World Example: Imagine closing your hand around the book to pick it
up.
✓ Command: move_to_place_position()
✓ The robot, now holding the part, moves to the location where the part needs to
be placed.
✓ Real-World Example: Moving your hand with the book over to a bookshelf.
4. Release Gripper
✓ Command: release_gripper()
✓ The gripper opens, releasing the part in its new location.
✓ Real-World Example: Letting go of the book so it rests on the shelf.
✓ Command: return_to_home_position()
✓ The robot moves back to its starting position, ready to repeat the task.
✓ Real-World Example: Moving your hand back to your side after placing the
book.
• Commands: These are specific instructions given to the robot. Each command tells the
robot to perform a specific action, like moving to a location or gripping an object.
• Functions: In programming, a command might be part of a larger function that groups
several actions together. For example, a function called pick_and_place() might include
all the steps needed to move an object from one spot to another.
Description: A robot arm is programmed to pick up parts from one location and place
them in another. This task is commonly used in assembly operations, such as placing
components on a conveyor belt.
Program:
move_to_pick_position()
activate_gripper()
move_to_place_position()
release_gripper()
return_to_home_position()
b. Welding Task
Program:
move_to_weld_position(x, y, z)
activate_welder()
RV Institute of Technology & Management®
Sy.No.171/5, Kothanur,8th Phase, JP Nagar, Bengaluru-560076
hold_position()
deactivate_welder()
move_to_next_weld_position()
c. Painting a Surface
Program:
move_to_start_position()
start_spray()
move_along_surface_path()
adjust_spray_pattern(speed)
stop_spray()
return_to_home_position()
Description: A robot arm loads and unloads workpieces into a CNC machine. The
robot handles the positioning and removal of parts after machining.
Program:
move_to_load_position()
activate_gripper()
place_workpiece_in_CNC()
wait_for_machining_completion()
RV Institute of Technology & Management®
Sy.No.171/5, Kothanur,8th Phase, JP Nagar, Bengaluru-560076
remove_workpiece()
place_in_finished_goods_area()
e. Quality Inspection
Description: A robot equipped with a camera inspects parts for defects, such as
surface imperfections or dimensional inaccuracies, by moving the camera over
specific areas.
Program:
move_to_inspection_position()
capture_image()
analyze_image_for_defects()
mark_defective_parts()
move_to_next_inspection_point()
Description: A robot sorts different materials (e.g., metal, plastic) into designated bins
based on size or type, which is useful in recycling or sorting processes.
Program:
identify_material_type()
move_to_pick_position()
activate_gripper()
move_to_designated_bin()
release_material()
return_to_start_position()
RV Institute of Technology & Management®
Sy.No.171/5, Kothanur,8th Phase, JP Nagar, Bengaluru-560076
Description: A robot grinds or polishes surfaces to achieve the desired finish. The
program controls the force applied and the movement pattern to ensure uniformity.
Program:
move_to_start_position()
start_grinding_tool()
apply_force_to_surface()
move_along_grinding_path()
adjust_tool_speed()
stop_grinding_tool()
h. Screw Driving
Description: A robot is programmed to drive screws into pre-drilled holes. The robot
controls the torque and depth of the screw to ensure proper fastening.
Program:
move_to_screw_position()
align_screwdriver()
activate_screwdriver()
control_torque_and_depth()
move_to_next_screw_position()
RV Institute of Technology & Management®
Sy.No.171/5, Kothanur,8th Phase, JP Nagar, Bengaluru-560076
i. Robot drilling
Program:
move_to_drill_position(x, y, z)
start_drill()
control_drill_speed()
drill_to_specified_depth()
retract_drill()
move_to_next_drill_position()
j. Assembly of Parts
Application: Automated assembly of mechanical components.
Description: A robot assembles parts by fitting them together, such as aligning and
pressing bearings into a housing.
Program:
pick_part_A()
move_to_assembly_position()
align_with_part_B()
press_part_A_into_part_B()
verify_assembly()
move_to_next_assembly_point()