Repetitive robots repeats sequence of commands received. It operates with sequence of commands. Thinker robots operates with sequence of tasks. It evaluates how task can be done. It uses a list of known objects to make a valid route. It tries to evaluate different route if current route is blocked. It stops the sequence of tasks if no route is available.
- You pick a point at 3D environment and conditions. The robot will decide how to move arm to achieve the goal.
- Using engines physical constraints to evaluate a valid movement strategy
- Using negative planes to achieve positions which inaccessible by normal way.
- Engine synchronization support. As example, it makes possible to move a teaspoon with sugar without scattering.
- Speed and delays supports.
- Queue supports
Physically, the robot-manipulator is amount of leverages connected together. Every leverage may have 3 Degrees of Freedom by default. X, Y and Z. But for every leverage amount of DoF can be customized. Every engine of robot-manipulator can be mapped to DoF of specific leverage.
I used 6 DoF robot-manipulator to perform the test. Look how it was mapped in my case.
The units are millimeters. The zero point is the center of robot
As example the task:
{
"claw-x": 95,
"claw-y": 0,
"claw-z": 25,
"claw-angle-y": -90
}
Means: Move arm from current position to new position with the following conditions
- The claw x must be at 95 mm from arm center
- The claw y must be at 0 mm from arm center
- The claw z must be at 25 mm from arm base
- The claw y logical angle must be -90 degrees
Physical parameters of robot-manipulator can be adjusted in armParams.h
Look at Make me a coffee scenario.
In my case engine with 270 degree limit is installed as rotate engine (shoulder-z). The offset has been adjusted so that the 90 degree of dead zone is exactly behind the arm.
What happens if I give a task to take something from behind?
In case of 360 degree engine installed the robot will just rotate arm to that position, but in my case the robot decided to set available counterside degree of shoulder-z and rotate elbow to back.
Physical angle is the angle you finally set to engine.
Look at home position of robot.
- The physical wrist-y angle is 235 deg. The logical is -90 deg.
- The physical shoulder-y angle is 90 deg. The logical is the same.
What happens if we set physical shoulder-y angle to 180 deg?
The physical wrist-y angle stays same 235 deg. But the logical angle will be 0 deg.
For better understanding look at video
Scenarios code can be found here scenarios
The project was built in VSCode using esp32doit-devkit-v1 platform
For autotest system nodejs and mocha are used.
- Install nodejs nodejs
- cd /tests
- npm install
- npm run test
Pick a point in 3D coordinate system and the robot evaluates engine angles to move at specific point
Move to home
{
"claw-x": 95,
"claw-y": 0,
"claw-z": 25
}
If "claw-angle-y" is defined the arm will try to move to specific point with specific claw Y angle.
The claw will be parallel floor.
{
"claw-x": 250,
"claw-y": 0,
"claw-z": 80,
"claw-angle-y": 0
}
The arm will be moved back but claw stays parallel floor
{
"claw-x": 60,
"claw-y": 0,
"claw-z": 80,
"claw-angle-y": 0
}
It`s useful to grab teaspoon with sugar and move it without scattering
If you set "claw-angle-y" to 90 degrees when claw will be vertical
{
"claw-x": 95,
"claw-y": 0,
"claw-z": 300,
"claw-angle-y": 90
}
The arm will move forward, but claw stays vertical
{
"claw-x": 150,
"claw-y": 0,
"claw-z": 300,
"claw-angle-y": 90
}
Set "claw-angle-y" to -90 and claw will be rotated perpendicular floor
{
"claw-x": 120,
"claw-y": 0,
"claw-z": 60,
"claw-angle-y": -90
}
{
"claw-x": 125,
"claw-y": 10,
"claw-z": 60,
"claw-angle-y": -90
}
{
"claw-x": 130,
"claw-y": 0,
"claw-z": 60,
"claw-angle-y": -90
}
{
"claw-x": 125,
"claw-y": -10,
"claw-z": 60,
"claw-angle-y": -90
}
The claw will describe a circle with radius 10. It`s useful to mix sugar and water
Set "claw-angle-x" parameter to rotate claw over the X axis
{
"claw-x": 130,
"claw-y": 0,
"claw-z": 60,
"claw-angle-y": -90,
"claw-angle-x": -90
}
Set "claw-angle" parameter to open or close claw
Open claw
{
"claw-x": 130,
"claw-y": 0,
"claw-z": 60,
"claw-angle-y": -90,
"claw-angle-x": 0,
"claw-angle": 140
}
Close claw
{
"claw-x": 130,
"claw-y": 0,
"claw-z": 60,
"claw-angle-y": -90,
"claw-angle-x": 0,
"claw-angle": 0
}
All commands you send to arm will be added to internal queue. The size of queue is defined in armParams.h in COMMAND_QUEUE_SIZE. It`s set to 20 by default.
Make two requests POST /position with following parameters
{
"claw-x": 250,
"claw-y": 0,
"claw-z": 80,
"claw-angle-y": 0,
"post-delay": 5000,
"iterations": 1
}
{
"claw-x": 60,
"claw-y": 0,
"claw-z": 80,
"claw-angle-y": 0,
"iterations": 60,
"iteration-delay": 50
}
- The arm will move to position (250, 0, 80) very fast.
- It waits 5 seconds
- When moves to position (60, 0, 80) very slow
Whole path will be divided to iterations. By default, it`s set 20 and defined in DEFAULT_ITERATIONS. "iteration-delay" is delay between every iteration, so total time of command will be iterations * iteration-delay (60 * 50) = 3000 milliseconds.
Use POST /version to know how much operations queued right now. When arm-operation-queued parameter will be 0 it means the arm finished current scenario and entered to standby mode.
Additional test cases can be found at tests
Using physical angles to manipulate the robot. Used for debugging purposes.
At starting point zero
{
"gripper": 1,
"gripper_rotate": 135,
"rotate": 135,
"shoulder": 90,
"elbow": 230,
"wrist": 235
}
Returns current version, the number operations in queue and free heap.
Returns simple web interface to upload new firmware
Send firmware directly through POST request