This repository is to provide a simple and easy-to-use alterative for people that work with robotic arms to visualise and do basic offline manipulator motion planning.
Surprisingly, the features in Blender are very relatable and translatable to the context of manipulators, like being able to do either linear or point-to-point motion and to control joint speed.
This README will bring you through on how to start motion planning using Blender and some of the basic functions and features that might be useful for your specific application.
- Install Blender
- Download/clone this repository
git clone https://github.com/TanJunKiat/blender_manipulator_motion_demo
- Open the desired robotic arm blender file (e.g. UR10.blend)
- Creating tool tip reference
Note
While the tool tip is not limited to these (you can freely use any object as a tool tip reference), it is important to note that the tool tip reference is a reference object and the actual tool tip will not follow the reference closely, especially in scenarios where there is no solution to the reference.
Tip
The initial location of the tool tip reference should be conicide with the initial position of the physical tool tip, while the robotic arm is in its neutral state.
- Linking tool tip reference to armature
- Under "Bone constraint properties" of the last bone, there should be a Inverse Kinematics (IK) element. Change the "Target" to the tool tip reference object that you just created
- Moving tool tip reference
Tip
To add an actual tool onto the robotic arm, you can parent the tool on the last link of the robotic arm. This will ensure that the motion of the robotic arm will move the physical tool.
- Selecting time frame in timeline
Under the "Timeline" panel, drag the time frame pointer to the desired time frame
Tip
Remember to change the frame rate under the "Output Properties" to get the desired translation from timeframe to time.
- Enabling properties to animate Next to each property, there is a diamond shaped button. Clicking it adds a keyframe of that property to the timeline.
Note
The way Blender animation works is that any non-animated property that is inbetween two animated of the same property will interpolated. So make sure to animate properties that you want to keep constant
Under your armature and the "Object Data Properties" tab, the inverse kinematics property can be found. Users can change the following parameters:
Property | Description | Remark |
---|---|---|
IK Solver | What kind of solver to use | So far, the best performance is the iTaSC solver |
Mode | Which mode to run the iTaSC | There is animation and simulation. Simulation is preferred as it estimates the velocity of the motion. |
Reiteration | When to trigger a re-iteration / re-planning | "Always" is preferred as it will perform a re-plan after every frame. |
Precision | The maximum variation of the end effector between two successive iterations at which a pose is obtained that is stable enough and the solver should stop the iterations. | Default: 0.005 |
Iterations | The upper bound for the number of iterations. | Default: 1000 |
Auto Step | A substep is a subdivision on the time between two frames for which the solver evaluates the IK equation and updates the joint position. | Use this option if you want to let the solver set how many substeps should be executed for each frame. Default is True |
Solver | Which inverse Jacobian solver that iTaSC will use. | Default: SDLS |
Feedback | Coefficient on end effector position error to set corrective joint velocity. | Default: 1.0 |
Max Velocity | ndicative maximum joint velocity in radian per second. | Default: 100.0 |
Steps Min | Proposed minimum substep duration (in second). The auto step algorithm may reduce the substep further based on joint velocity. | Default: 0.01 |
Max | Maximum substep duration (in second). The auto step algorithm will not allow substep longer than this value. | Default: 0.06 |
- Under "Bone constraint properties" of the last bone and the Inverse Kinematics (IK) tab, you can animate the following parameters:
Property | Description | Remark |
---|---|---|
Position | To enable position tracking | Default: True |
Weight | Weight of position control | Default: 1.0 |
Lock | Constrain position of axis tool tip to target | Default: True for all |
Rotation | To enable rotation tracking | Default: True |
Weight | Weight of rotation control | Default: 1.0 |
Lock | Constrain rotation of axis tool tip to target | Default: True for all |
Tip
The way to toggle these properties in animation time is similar to the above mentioned method.
Under "Bone constraint properties" of the bones, there should be two properties, "Limit Rotation" and "Limit Location".
The rotation of a joint is by default about the Y-axis (direction from head to tail of a bone). So the rotation should be removed for the X and Z axes (limit to 0 degree for max and min). The joint angle of the joint can be saturated by setting the limit of the Y-axis.
Since all the joints of a manipulator are rotaries, all the axes in the limit rotation constraint should be set to true and zeros.
- Import robotic arms using the "Link" or "Append" feature in Blender
Note
"Link" is to import items from a blender file without breaking the connection; meaning any changes in the referred blender file will update the main file. "Append" is to create a copy of the items from the referred file to the main file. This will allow users to manipulate the items without affecting the original referred file, which is preferred.
- Select the tool tip reference
- Select Object > Animation > Clear Keyframes
Robotic arm | Brand | Status |
---|---|---|
UR3 | Universal Robots | Available 🟢 |
UR3e | Universal Robots | In progress 🟡 |
UR5 | Universal Robots | Available 🟢 |
UR5e | Universal Robots | In pipeline 🔴 |
UR10 | Universal Robots | Available 🟢 |
UR10e | Universal Robots | In pipeline 🔴 |
UR16e | Universal Robots | In pipeline 🔴 |
UR20 | Universal Robots | In pipeline 🔴 |
UR30 | Universal Robots | Available 🟢 |
------------- | ------------- | ------------- |
IRB120 | ABB | Available 🟢 |
IRB1010 | ABB | In pipeline 🔴 |
IRB1090 | ABB | In pipeline 🔴 |
IRB1100 | ABB | In pipeline 🔴 |
IRB1200 | ABB | In pipeline 🔴 |
IRB1300 | ABB | In pipeline 🔴 |
IRB1500ID | ABB | In pipeline 🔴 |
IRB1600 | ABB | In pipeline 🔴 |
------------- | ------------- | ------------- |
xArm6 | UFactory | Available 🟢 |
------------- | ------------- | ------------- |
VS-68 | DENSO | Available 🟢 |
------------- | ------------- | ------------- |
- Import mesh under "File > Import"
Important
The mesh needs to be arranged in the neutral state / starting state so the behaviour will be visually accurate after parenting the bones to the mesh.
- Create and align bones
Note
The bones do not need to be connected.
Note
For ease of visualisation, the Y-axis of the bone (which is the direction pointing from the head to tail) represents the direction of rotation of the joint.
- Parenting bones to mesh
- Switch to Pose mode
- Select the mesh from the "Outliner" panel
- Select the bone that you want to parent
- Parent the bone to the mesh using the "Bone" parenting option
Tip
Ctrl+P is the shortcut to bring out the parenting dialog
- Setting up inverse kinematics
- Select the last bone / joint
- Under "Bone Constraint Properties", add a "Inverse Kinematics" property
- Follow the steps in here to set up the tool tip reference
- Follow the steps in here to set up the inverse kinematics of the armature
- Documentation on Blender animations
- Documentation on Blender armatures
- Documentation on Blender Inverse Kinematics
Tan Jun Kiat - Robotics researcher, currently working in Changi General Hospital as a Simulation Robotics Engineer
Email: [email protected]