Getting started
Your first program
A program is a list of steps in src/program.rs, run in order. The API is the same on the igus ReBeL and the UR5e. Joint arrays hold six angles, first joint to last, in degrees.
The default program
This is what the template generates:
use crate::runner::Step;
use crate::runner::Step::*;
pub fn steps() -> Vec<Step> {
vec![
// all joints at once, out and back
Offset([5.0, 5.0, 5.0, 5.0, 5.0, 5.0]),
Offset([-5.0, -5.0, -5.0, -5.0, -5.0, -5.0]),
Wait(1.0),
// Add robot-appropriate absolute targets with Joints([...]) or Plan([...]).
// Tool([0.0, 0.0, 0.03]) moves 3 cm up using the selected model's IK.
// Absolute targets and reachable tool moves depend on the robot/start pose.
]
}Steps
Joints([..; 6]) | Move to absolute joint angles, in degrees. |
Offset([..; 6]) | Move relative to the previous target, in degrees. |
Tool([x, y, z]) | Move the tool by x, y, z metres in the base frame, keeping its orientation. Solved with inverse kinematics on the selected robot's model. |
Plan([..; 6]) | Reach absolute joint angles, in degrees, along a collision-free path from a motion planner. |
Wait(s) | Hold for s seconds. |
Offsets and waits work on any robot from wherever it starts. Absolute targets (Joints, Plan) and tool moves depend on the robot: an angle that is a safe pose on the ReBeL may be out of reach or in collision on a UR5e, and a tool move must be reachable from the current pose.
Before anything moves, every step is solved and checked for joint limits and self-collision. If one fails, the program refuses to start.
Configure
robot.ron selects the robot. Everything else lives in that robot's profile, robots/igus_rebel.ron or robots/ur5e.ron: the bridge and its address, the kinematic and collision models, the motion limits, and the planner for Plan steps. The relevant part of the igus profile:
config: {
"chain": "igus_rebel",
"collision_model": "igus_rebel",
// Planner for Plan steps: rrt_connect (default), rrt_star,
// prm, a_star, stomp, path_optimizer, direct.
"planner": "rrt_connect",
"speed": 5.0,
"acceleration": 20.0,
},speed, acceleration | Peak joint speed in deg/s and acceleration in deg/s². The bridges apply their own caps on top. |
chain, collision_model | Kinematic and collision models, as a preset name (igus_rebel) or an inline spec, as in the UR5e profile. Used for IK, the pre-flight check and the planner. |
planner | rrt_connect (default), rrt_star, prm, a_star, stomp, path_optimizer or direct. Resolved by Repose v0.7.1's repose::planners::CuAnyPlanner. |
The build copies the selected profile to copperconfig.ron. Edit the profiles; the generated file is overwritten on every build.