1. Home
  2. Insights
  3. Collaborative Robot (Cobot) Programming — Safe Human-Robot Interaction
Robotics

Collaborative Robot (Cobot) Programming — Safe Human-Robot Interaction

Complete guide to collaborative robot programming. Covers UR, FANUC, ABB cobots, teach pendants, force sensing, safety standards ISO 15066, and assembly, packaging, and welding applications.

Collaborative Robot Cobot Programming Safe Human-Robot Interaction

Collaborative robots have changed the economics of industrial automation. Traditional industrial robots required safety fencing, dedicated floor space, specialized programming skills, and months of integration work — an investment measured in hundreds of thousands of dollars that only made sense for high-volume production lines. Cobots deploy directly alongside human workers, program in hours rather than months, and cost a fraction of traditional robot cells. But this accessibility comes with unique software challenges. The programming must ensure safe human-robot interaction at every moment, leverage force sensing for process quality, and integrate with the diverse ecosystem of grippers, sensors, and peripherals that make cobots useful. Collaborative robot programming is the discipline of building applications that are simultaneously productive and safe in shared human-robot workspaces.

At ESS ENN Associates, we program cobots for manufacturing environments where humans and robots share workspace, tasks, and responsibility for product quality. This guide covers the complete cobot programming landscape: major cobot platforms and their programming environments, teach pendant and script programming methods, force sensing and contact detection, ISO 15066 safety compliance, and application-specific programming patterns for assembly, packaging, welding, and machine tending.

Major Cobot Platforms and Programming Environments

Universal Robots (UR) holds the largest market share in collaborative robotics. The UR e-Series (UR3e, UR5e, UR10e, UR16e) and the newer UR20 and UR30 models cover payloads from 3 to 30 kg. Programming is done through the Polyscope interface on the teach pendant — a 12-inch touchscreen mounted on the robot controller. Polyscope provides a graphical program tree where the operator adds waypoints (positions the robot moves to), I/O commands, conditionals, loops, and force control instructions by selecting from menus and filling in parameters. For complex logic, URScript provides a Python-like scripting language that offers full programmatic control over robot motion, I/O, force sensing, and communication protocols. The UR+ ecosystem certifies third-party peripherals (grippers, vision systems, force sensors) with plug-and-play software integration through URCaps plugins.

FANUC CRX series cobots integrate into FANUC's industrial automation ecosystem, giving manufacturers who already use FANUC CNCs and industrial robots a collaborative option with familiar programming conventions. The CRX series uses a tablet-based programming interface with drag-and-drop instruction blocks for basic applications and FANUC's KAREL and TP programming languages for advanced control. CRX cobots offer higher payload capacity than comparably sized UR models and benefit from FANUC's extensive peripheral ecosystem including iRVision integrated vision and force sensing options.

ABB GoFa and SWIFTI cobots push the performance envelope with higher speeds and longer reach than most competitors. ABB's Wizard Easy Programming provides a block-based graphical programming environment accessible to non-programmers. The RAPID programming language offers full industrial robot programming capability for complex applications. ABB's RobotStudio provides offline programming and simulation, enabling program development and validation before deploying to the physical robot. For applications requiring tight integration with ABB PLCs and drives, the ABB ecosystem offers seamless connectivity.

ROS 2 integration enables advanced programming beyond what vendor-specific environments provide. Universal Robots provides official ROS 2 drivers, and community drivers exist for most major cobot brands. ROS 2 integration enables MoveIt 2 motion planning for collision-aware path generation, integration with perception systems for vision-guided manipulation, multi-robot coordination, and custom control strategies. This approach is particularly valuable for research applications, complex multi-step assembly, and situations where the cobot must integrate with non-standard sensors or other robotic systems.

Programming Methods: From Teach Pendant to Script

Hand guiding (lead-through teaching) is the most intuitive cobot programming method. The operator presses a button on the robot's wrist or teach pendant to enable free-drive mode, then physically moves the robot arm through the desired positions. Each position is recorded as a waypoint in the program. The robot then replays the recorded positions with specified motion types (linear, joint-space), speeds, and blending parameters. Hand guiding is ideal for simple pick-and-place tasks with a small number of waypoints and is accessible to operators with no programming experience. The limitation is precision — human hand positioning is accurate to roughly 1 to 2 millimeters, insufficient for applications requiring tighter tolerances.

Teach pendant programming builds programs through the vendor's graphical interface. The programmer creates a program tree of instructions: move commands (MoveJ for joint-space, MoveL for linear Cartesian moves), waypoints (recorded by jogging the robot to position), I/O commands (activate gripper, signal PLC), logic (if-else, loops, variables), and communication (send data to external systems via Modbus, TCP/IP, or MQTT). The teach pendant approach balances accessibility with capability — operators with basic training can build functional programs, while experienced programmers can create sophisticated applications with force control, error handling, and multi-step process logic.

Script programming provides full programmatic control for applications that exceed the capabilities of graphical interfaces. URScript for Universal Robots, RAPID for ABB, and KAREL for FANUC offer variables, functions, mathematical operations, string handling, socket communication, and real-time access to robot state data (joint positions, velocities, forces, I/O states). Script programming enables adaptive behaviors — adjusting robot motion based on sensor feedback, implementing search routines that find parts at variable positions, and creating parametric programs that adapt to different product variants without manual reteaching. The trade-off is that script programs require programming skills and are harder for production operators to modify or troubleshoot.

Offline programming and simulation tools generate robot programs from CAD models and process definitions without touching the physical robot. RobotStudio (ABB), ROBOGUIDE (FANUC), and RoboDK (multi-brand) provide virtual robot environments where programmers define motion paths, test reach, check cycle times, and validate collision-free operation. This is essential for complex applications where programming on the physical robot would tie up production time, and for validating new programs before deploying them to avoid costly collisions or process errors.

Force Sensing and Contact Detection

Force sensing is what transforms a cobot from a precise position machine into a tool that can feel and respond to its environment. The force/torque sensor built into modern cobots (or added as an external sensor) measures the forces and torques at the robot's wrist, enabling the software to detect contact, control insertion forces, verify assembly quality, and implement compliant motion that adapts to part position variations.

Force control modes in cobot programming allow the robot to control force rather than position in specified directions. In a surface following application, the robot maintains a commanded force normal to the surface while following a position path along the surface — ensuring consistent contact pressure for polishing, sanding, or inspection regardless of surface height variations. In an insertion task, the robot moves downward until a target insertion force is reached, with compliance in the lateral directions to accommodate positional misalignment between the peg and hole. Force control is specified per-axis in the robot's tool frame, enabling different control strategies in different directions simultaneously.

Contact detection uses force threshold monitoring to detect when the robot touches an object. The software monitors the force readings continuously, and when the measured force exceeds a configurable threshold, the program detects contact and executes the appropriate response — stop motion, switch to force-controlled insertion, or trigger an error if contact was unexpected. Contact detection enables search routines where the robot moves slowly in a direction until it touches a surface, measuring the exact contact position. This is invaluable for applications where part positions vary between cycles and the robot must find the part rather than move to a fixed position.

Quality verification through force sensing provides in-process inspection without additional sensors. During a screw driving operation, the torque profile during insertion reveals whether the screw seated correctly (smooth torque ramp), cross-threaded (early torque spike), or stripped (torque drop after initial engagement). During snap-fit assembly, the force profile during insertion confirms that the snap feature engaged (characteristic force peak followed by force drop). The cobot program can log these force profiles for quality records and immediately flag assemblies that deviate from the expected pattern, catching defects at the point of creation rather than at end-of-line inspection.

Safety Standards: ISO 15066 and Risk Assessment

The fundamental promise of collaborative robotics — robots working safely alongside humans without safety fencing — requires rigorous adherence to safety standards. ISO 15066 (Technical Specification for Collaborative Robot Safety) defines the framework, and every cobot deployment must demonstrate compliance through documented risk assessment.

ISO 15066 defines four collaborative operation modes: Safety-rated monitored stop — the robot stops when a human enters the collaborative workspace and resumes when they leave. Hand guiding — the robot is controlled by direct physical input from the operator. Speed and separation monitoring — the robot monitors the distance to humans and reduces speed or stops as the distance decreases. Power and force limiting — the robot limits its dynamic forces so that contact with a human does not cause injury. Most cobot applications use power and force limiting mode, which allows the robot to operate continuously without stopping when humans are nearby.

Force and pressure limits defined in ISO 15066 specify the maximum permissible contact forces and pressures for each body region. These limits differ between transient contact (brief impact, such as a robot arm striking a person passing by) and quasi-static contact (sustained pressure, such as a person being pinched between the robot and a fixed surface). The limits vary significantly by body region — the hand and forearm tolerate much higher forces than the face, neck, or skull. The cobot's maximum allowable speed depends on the effective mass of the moving parts, the end-effector geometry (sharp edges require lower speeds), the payload, and which body parts could potentially be contacted.

Risk assessment is mandatory for every collaborative robot application. The assessment identifies all hazards (collision, pinching, dropping payload, sharp tool edges), evaluates the severity and likelihood of each hazard, and documents the risk reduction measures implemented. Risk reduction measures include limiting robot speed and force through safety configuration, designing end-effectors with rounded edges and compliant materials, positioning the application to minimize the risk of contact with sensitive body regions, and implementing safety-rated monitoring of speed, force, and workspace boundaries. The risk assessment must be documented and typically reviewed by a safety professional or third-party assessor.

Application Programming Patterns

Machine tending — loading and unloading CNC machines, presses, and injection molding machines — is the most deployed cobot application. The programming pattern is cyclical: pick a raw part from the input fixture, open the machine door (via I/O signal or robot-operated handle), remove the finished part, load the raw part, close the door, start the machine cycle, and place the finished part in the output. The programming challenges are door operation timing (waiting for door open/close confirmation), part presence verification (checking that the fixture is empty before loading), cycle synchronization (waiting for the machine to finish before unloading), and error recovery (what happens when the machine faults, the part is missing, or the gripper drops the workpiece).

Assembly programming leverages force sensing extensively. Peg-in-hole insertion uses a spiral search pattern — the robot moves in an expanding spiral while pressing downward with controlled force until the peg finds the hole and drops in. Screw driving requires precise force and torque control throughout the insertion sequence, with torque monitoring for quality verification. Snap-fit assembly programs monitor the insertion force profile to confirm engagement. The common thread is adaptive motion — the robot adjusts its behavior based on force feedback rather than blindly following position commands, accommodating the part-to-part dimensional variation that is inevitable in manufacturing.

Welding cobots have opened automated welding to small and medium manufacturers who cannot justify dedicated robotic welding cells. Cobot welding programs define the weld path (a series of waypoints along the joint), welding parameters (voltage, wire feed speed, travel speed) synchronized with robot motion, weave patterns for wider welds, and start/stop sequences for arc ignition and crater filling. The programming is typically done by a skilled welder who hand-guides the robot through the weld path and sets the welding parameters from experience. Touch sensing — the robot uses the welding wire or a sensor to detect the workpiece surface and correct for fixture variations — improves weld consistency across production runs.

Packaging and palletizing programs handle repetitive pick-and-place sequences with varying pallet patterns. The programming challenge is defining the pallet pattern (grid positions, layer patterns, orientation changes between layers) parametrically so that the same program handles different product configurations. Most cobot vendors provide palletizing wizards that generate pallet patterns from parameters (box dimensions, pallet size, number of layers) without manual waypoint teaching. For mixed-case palletizing, vision integration identifies product types and the planner selects the appropriate pallet pattern for each product.

"Cobots succeed not because they are the most capable robots but because they are the most accessible. The programming must preserve that accessibility while ensuring safety and production quality. The best cobot programs are the ones that production operators can understand, modify, and troubleshoot without calling a robotics engineer."

— Karan Checker, Founder, ESS ENN Associates

Tags
Cobot ProgrammingUniversal RobotsForce SensingISO 15066Human-Robot InteractionAssembly Robotics
FAQ

Frequently asked questions.

What is the difference between a cobot and a traditional industrial robot?
Traditional industrial robots operate in fenced-off cells, separated from human workers by physical safety barriers. They move fast, carry heavy payloads, and will not stop if a person enters their workspace. Collaborative robots (cobots) are designed to work safely alongside humans without safety fencing. They achieve this through force-limited joints that detect unexpected contact and stop immediately, rounded designs that minimize pinch points, lower speeds and payloads than traditional robots, and built-in safety monitoring that enforces speed and force limits. This enables cobots to be deployed directly on production lines where human workers handle adjacent tasks, without the cost and space requirements of safety caging.
How do you program a collaborative robot?
Cobots support multiple programming methods. Hand guiding (lead-through teaching) lets the operator physically move the robot through desired positions while recording waypoints — the most intuitive method for simple tasks. Teach pendant programming uses the robot's touchscreen controller to create programs with waypoints, logic, I/O control, and force commands. Graphical programming environments like Universal Robots' Polyscope or ABB's Wizard Easy Programming provide drag-and-drop program creation. Script programming (URScript for UR, RAPID for ABB) offers full programmatic control for complex applications. Offline programming tools generate robot programs from CAD models and process simulations. ROS 2 integration via MoveIt provides advanced motion planning for research and custom applications.
What is ISO 15066 and how does it affect cobot deployment?
ISO/TS 15066 is the technical specification that defines safety requirements for collaborative robot operations. It specifies four collaborative operation modes: safety-rated monitored stop, hand guiding, speed and separation monitoring, and power and force limiting. For power and force limiting mode (the most common), ISO 15066 defines maximum permissible contact forces and pressures for each body region — for example, the hand can tolerate higher forces than the face or throat. The specification requires a risk assessment for each cobot application, considering the robot's speed, payload, end-effector geometry, and the specific body parts that could be contacted. Compliance with ISO 15066 is typically required by workplace safety regulations and insurance requirements.
Which cobot brands are most commonly used in industry?
Universal Robots dominates the cobot market with their UR3e, UR5e, UR10e, UR16e, and UR20 models covering payloads from 3 to 20 kg. Their ecosystem of certified peripherals (UR+ platform) and accessible programming environment make them the default choice for many applications. FANUC offers the CRX series with higher payload options and integration with their extensive industrial automation ecosystem. ABB's GoFa and SWIFTI cobots provide high speed and reach for applications requiring more performance. Doosan Robotics provides competitive alternatives with strong force sensing capabilities. Techman Robot integrates a vision system directly into the robot arm. The choice depends on payload requirements, reach, existing factory automation ecosystem, and specific application needs.
What are the most common cobot applications in manufacturing?
Machine tending is the largest cobot application — loading and unloading CNC machines, injection molding machines, and presses. Pick and place operations for packaging, kitting, and palletizing are the second most common. Assembly tasks including screw driving, snap fitting, and adhesive dispensing leverage the cobot's force sensing for quality verification. Welding cobots (particularly with Universal Robots and FANUC) enable small manufacturers to automate welding without dedicated robot welders. Quality inspection using camera-equipped cobots that move inspection sensors around parts. Surface finishing including sanding, polishing, and deburring uses force control to maintain consistent contact pressure. Each application requires specific end-effectors, programming approaches, and safety configurations.
Hiring

Grow with a team that has shipped software since 2009.

View openings