Skip to content

Commit 401b210

Browse files
committed
Add Kuka.
1 parent 2c2d256 commit 401b210

7 files changed

Lines changed: 83 additions & 0 deletions

File tree

154 KB
Loading
155 KB
Loading

wiki/common-platforms/assets/lbr_fri_ros2.svg

Lines changed: 4 additions & 0 deletions
Loading
61 KB
Loading
78.8 KB
Loading
25.9 KB
Loading

wiki/common-platforms/kuka.md

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
---
2+
# Jekyll 'Front Matter' goes here. Most are set by default, and should NOT be
3+
# overwritten except in special circumstances.
4+
# You should set the date the article was last updated like this:
5+
date: 2024-05-01 # YYYY-MM-DD
6+
# This will be displayed at the bottom of the article
7+
# You should set the article's title:
8+
title: Working with the KUKA LBR Med
9+
# The 'title' is automatically displayed at the top of the page
10+
# and used in other parts of the site.
11+
---
12+
The LBR Med is a series of robots designed for medical diagnostics, treatment, and surgical interventions. To allow these functionalities, the manipulator is CB-certified, has comprehensive safety precautions, and is very accurate. We are using this device to build an assistive solution for Total Knee Arthroplasties (TKAs).
13+
14+
Being a proprietary device, there is very limited documentation about using the KUKA, with little to no community support. We spent a lot of time trying to figure out how to interface the KUKA with ROS. Hence, this article is written to guide you through the entire setup of the manipulator.
15+
16+
## Initial setup
17+
Before you start mounting the manipulator, it's important to keep in mind that you'll need a custom base plate and table for the purpose. We used a Vention table with a personalized design and a machined steel plate for the manipulator's mounting.
18+
19+
Once you have acquired these components, you can proceed with the mounting process. Refer to the manual for detailed instructions on connecting the controller, manipulator, and pendant. Following these instructions will ensure that the setup is done correctly and minimize any risk of damage or malfunction.
20+
21+
After completing the connection, you can test the setup by switching the pendant to T1 mode. To enable it, press the button, and then use the +/- button to jog the manipulator. You should note that the pendant has three modes of operation: T1, T2, and AUT.
22+
23+
In T1 and T2 modes, the robot will only function while the enable button is pressed. In T1 mode, the robot's speed is reduced by 25% of the maximum speed. Additionally, you can run various applications on the manipulator aside from jogging it. The AUT mode is solely for running these applications.
24+
25+
26+
### Brake test monitor
27+
During the initial setup, we spent a lot of time trying to debug why the manipulator would shut off if left idle for 15-20 mins. It would enter an error state, with a code not found on Google, and the only solution would be to restart the manipulator which is a 10-15 min activity. After struggling with it for a week, here’s what we learned: “CBTM” stands for Central Brake Test Monitor, and if you don't run a brake test ever so often, the manipulator will lock off and not function.
28+
29+
When you boot the controller, the pendant will be in a “warning” state and have an orange indicator in the software. Switch the mode to AUT, select SampleBrakeTestMonitor from the menu, and run it. Once it is completed, it will show you the status of the brakes of each joint. The orange indicator will turn green if the brakes in all the joints are working well.
30+
31+
### Sunrise Workbench
32+
Sunrise Workbench is the IDE for developing Java applications running on the KUKA. Along with the Sunrise Workbench installer, you should also be able to find the SunriseOS folder with ver X. In our case, we are using SunriseOS Med V.2.6.5, the OS version is important as we found out that OS V.1.1.5 to V.2.6.5 has a lot of breaking changes.
33+
34+
Once you installed the Workbench and started a project, you need to manually install the software packages in the SunriseOS folder. From Help->Install New software, you select local as installing source, and browse toward the packages you want to install.
35+
36+
![Sunrise Workbench](assets/images/sunrise_install_software.png)
37+
38+
Once you have installed the packages, in our case it solved all the missing dependencies in our existing project.
39+
40+
Inside a project, StationSetup.cat is the file that defines the arm topology, what software should be installed into the control station, and the arm’s configuration like IP address and other parameters. The StationSetup should only be installed once, while project synchronization should be done every time you make modifications to the code.
41+
42+
![Synchronize Project Button](assets/images/sunrise_workbench_synchronize.png)
43+
44+
Because the KUKA software is proprietary, it’s not easy to find documentation online. Thus it’s hard to understand what is the function of the code. Luckily when in code editor view, if you hover over a function, it will pop out the function definition. If you want to dive deeper into the function, you can select “open attached Javadoc in a browser” to open the Javadoc that comes with the packages.
45+
46+
![Open Javadoc Button](assets/images/sunrise_workbench_synchronize.png)
47+
48+
### Fast Robot Interface
49+
Fast Robot interface can stream out robot data in real-time, and when connection quality is good, it can also command the robot.
50+
51+
![Software Architecture](assets/images/lbr_fri_ros2.svg)
52+
53+
(In AUT Mode) Run the LBRServer.java application from the robot pendant, and run the corresponding ROS2 node on the PC. Then the robot should be connected.
54+
55+
The purpose of the LBRServer application is to talk over the controller PC’s Ethernet connection to another device. It can publish the current joint states, and accept goal joint values for the manipulator, which it will communicate to the controller PC, which will then move the manipulator. These messages can be decoded by the LBR_FRI package maintained by Kings College London, which provides an interface that talks to the LBRServer, and to ROS on your PC.
56+
57+
### Avoiding Connection Issues
58+
59+
Depending on the network quality, there might be issues that come up with using the LBR FRI connection issues. If the connection quality drops below a certain threshold, the ROS side of the system will kill the connection for safety reasons and crash the application. Based on the network quality, the application defines certain states, as shown below.
60+
61+
![Representation of the network connection states](assets/images/friquality.png)
62+
63+
The system will let you monitor the state of the robot and control it as long as the connection is classified as “Good” or “Excellent”. The behavior tree based on the connection status is as follows. You can get information about the robot’s joints if the status is MONITORING_READY, and you can give it goal values if the status is COMMANDING_ACTIVE.
64+
65+
![System behavior tree based on the connection status](assets/images/fristate.png)
66+
67+
If the connection status is below “GOOD” anytime, The application will shut. We had this issue happen to us during our demo. To avoid that happening in the future, we intend to modify the ROS Client to allow the robot to stay connected even if the connection is lost for a second, and we’ll implement our manipulation code in a manner to handle these situations.
68+
69+
## Summary
70+
Use this space to reinforce key points and to suggest next steps for your readers.
71+
72+
## See Also:
73+
- Links to relevant material within the Robotics Knowledgebase go here.
74+
75+
## Further Reading
76+
- https://github.com/lbr-stack/lbr_fri_ros2_stack
77+
- https://lbr-stack.readthedocs.io/en/latest/
78+
79+
## References

0 commit comments

Comments
 (0)