Space aware robotic path planner
- Python 83%
- Nix 17%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| ikpy_nix | ||
| ur_rtde_nix | ||
| ursim | ||
| .envrc | ||
| .gitignore | ||
| plot_tcp_motion.py | ||
| read_robot_state.py | ||
| read_target_position.py | ||
| README.MD | ||
| shell.nix | ||
Robot collision prevention system
Overview
Goals
- Program execution - Robot executes the provided program in finite time or declares a position unreachable within the current constraints.
- Spatial awareness - System detects possible obstacles inbetween movements and stops execution on expected collision.
- Dynamism - System reacts in a sufficiently real time manner, to prevent collisions.
Inputs
- Robot axes positions in joint space (can be converted to cartesian space using forward kinematics or by external library ikpy)
- Target position of the currently executed move command
Outputs
Constraints
- A initialization period during which the statistical models are built involves deliberately built robot programs which allow the statistical models the be trained to learn the expected trajectories and detect possible collisions.
TOF sensor data interpretation
- Data from a single 8x8 TOF sensor matrix is treated as a single array of 64 values.
- For
nTOF sensors covering the production area, the vectors are concatenated into a single array\text{TOF}of lengthn \cdot 64. - Deliberately not converting data into a point cloud based on the distance and FOV of each sensor. Exact computation would be expensive.
Collision detection
- The expected trajectory of all joints is built using a statistical model based on the immediate position of all axes and the current target positions.
- The collision detection model predicts if the predicted trajectory leads to a collision with the robot. (This I dont really understand how machine learning could be used, because the robot program has to be automated. Maybe self collisions? But that might not be enough.)
Implementation
The UR robot exposes a real time data exchange (RTDE) interface in C++ and provides a Python binding.
-
The UR robot requires a special robot program (UR script) to be run on the controller to use RTDE. How to run user defined programs and RTDE at the same time? UR documentation provides a possible solution, where the UR script is run in a separate thread of the main program.
-
There can be multiple RTDE read-only connections in parallel. This can be used to have one connection only for reading axis positions and current target position.
-
To be able to stop the robot externally, we either have to
- force a connection via RTDE contoll connection, which halts the execution.
- Only control the robot via RTDE.http://localhost:6080/vnc.html
Robot simulation
- The UR5 robot can be simulated using a docker container. A simple docker-compose.yml exposing the necessary is available.
- Once running, the web VNC to the programming pendant is accessible via http://localhost:6080/vnc.html
- RTDE communication is working.
- Using the provided rtde_control.script allows parallel control via regular UR program and external data access using RTDE.