You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ROS indigo metapackage that contains packages to work with the KUKA LWR 4+.
5
+
ROS (tested on indigo) packages to work with the KUKA LWR 4+.
6
6
7
7
## Overview
8
8
The main packages are:
9
9
-[__lwr_description__](https://github.com/CentroEPiaggio/kuka-lwr/tree/master/lwr_description): a package that defines the model of the robot (ToDo: name it __lwr_model__)
10
-
-[__lwr_hw__](https://github.com/CentroEPiaggio/kuka-lwr/tree/master/lwr_hw): a package that allows communication with an LWR 4+ through FRI or through a gazebo simulation. If you are using the joint impedance control strategy, it adds the gravity term computed from the URDF model.
10
+
-[__lwr_hw__](https://github.com/CentroEPiaggio/kuka-lwr/tree/master/lwr_hw): a package that contains the LWR 4+ definition within the ros control framework, and also final interfaces using Kuka FRI, Stanford FRI Library or a Gazebo plugin. Read adding an interface below if you wish to add a different non-existing interface.
11
11
-[__lwr_controllers__](https://github.com/CentroEPiaggio/kuka-lwr/tree/master/lwr_controllers): a package that implement a set of useful controllers (ToDo: perhaps moving this to a forked version of `ros_controllers` would be ok, but some controllers are specific for the a 7-dof arm).
12
12
-[__single_lwr_example__](https://github.com/CentroEPiaggio/kuka-lwr/tree/master/single_lwr_example): a cofiguration-based meta-package that shows how to use the `kuka_lwr` packages.
13
13
- [__single_lwr_robot__](https://github.com/CentroEPiaggio/kuka-lwr/tree/master/single_lwr_example/single_lwr_robot): the package where you define your robot using the LWR 4+ arm.
@@ -18,8 +18,35 @@ For an example using two LWR 4+ arms and two Pisa/IIT SoftHands, see the [Vito r
18
18
19
19
## Install
20
20
21
-
ToDo: one should check the commands in the [`.travis.yaml`](https://github.com/CentroEPiaggio/kuka-lwr/blob/master/.travis.yml) file when that is working in Ubuntu 14.04.
21
+
Check the [`.travis.yaml`](https://github.com/CentroEPiaggio/kuka-lwr/blob/master/.travis.yml) file, that'll give you the basic steps to install all necessary packages to compile the package.
22
22
23
-
The most critical that are not straight forward if you want to use the simulation environment are:
24
-
-[Gazebo4](http://gazebosim.org/tutorials?tut=install_ubuntu&ver=4.0&cat=install) or higher
25
-
- Slightly modified `transmission_interface` package that allows robot composability in gazebo @ (forked) [ros_control](https://github.com/CentroEPiaggio/ros_control/tree/multi-robot-test)
23
+
## Adding more interfaces/platforms
24
+
25
+
The package [lwr_hw](lwr_hw) contains the abstraction that allows to make the most of the new ros control framework. To create an instance of the arm you need to call the function [`void LWRHW::create(std::string name, std::string urdf_string)`](lwr_hw/include/lwr_hw/lwr_hw.h#L40), where `name` MUST match the name you give to the xacro instance in the URDF and the `urdf_string` is any robot description containing one single instance of the lwr called as `name` (note that, several lwr can exist in `urdf_string` if they are called differently).
26
+
27
+
The abstraction is enforced with [three pure virtual functions](lwr_hw/include/lwr_hw/lwr_hw.h#L61-L64):
28
+
```c++
29
+
virtualboolinit() = 0;
30
+
virtualvoidread(ros::Time time, ros::Duration period) = 0;
31
+
virtual void write(ros::Time time, ros::Duration period) = 0;
32
+
```
33
+
34
+
Adding an interface boils down to inherit from the [LWRHW class](lwr_hw/include/lwr_hw/lwr_hw.h#L33), implement these three function according to your final platform, and creating either a node or a plugin that uses your new class. This way you can use all your planning and controllers setup in any final real or simulated robot.
35
+
36
+
Examples of final interface class implementations are found for the [Kuka FRI](lwr_hw/include/lwr_hw/lwr_hw_fri.hpp), [Stanford FRI library](lwr_hw/include/lwr_hw/lwr_hw_fril.hpp) and a [Gazebo simulation](lwr_hw/include/lwr_hw/lwr_hw_gazebo.hpp). The corresponding nodes and plugin are found [here](lwr_hw/src/lwr_hw_fri_node.cpp), [here](lwr_hw/src/lwr_hw_fril_node.cpp), and [here](lwr_hw/src/lwr_hw_gazebo_plugin.cpp).
37
+
38
+
## Using the Stanford FRI Library
39
+
40
+
You need to provide your user name with real time priority and memlock limits higher than the default ones. You can do it permanently like this:
41
+
42
+
1. `sudo nano /etc/security/limits.conf` and add these lines:
43
+
```
44
+
YOUR_USERNAME hard rtprio 95
45
+
YOUR_USERNAME soft rtprio 95
46
+
YOUR_USERNAME hard memlock unlimited
47
+
YOUR_USERNAME soft memlock unlimited
48
+
```
49
+
2. `sudo nano /etc/pam.d/common-session` and add `session required pam_limits.so`
50
+
3. Reboot, open a terminal, and check that `ulimit -r -l` gives you the values set above.
51
+
4. You need to edit manually the [lwr_hw.launch](lwr_hw/launch/lwr_hw.launch)
52
+
5. Load the KRL script that is downloaded with the library to the Robot, and follow the instructions from the [original link](http://cs.stanford.edu/people/tkr/fri/html/) to set up network and other requirements properly.
0 commit comments