Skip to content

Commit

Permalink
Added world link that is used by gazebo to attach the robot to the fl…
Browse files Browse the repository at this point in the history
…oor, added nullspace param, added gif files
  • Loading branch information
Hydran00 committed Dec 27, 2024
1 parent acd5d5c commit bf0e166
Show file tree
Hide file tree
Showing 6 changed files with 83 additions and 10 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Humble CI

on:
push:
branches:
- main

jobs:
humble_source:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- uses: ros-tooling/[email protected]
with:
required-ros-distributions: humble
- run: |
# Create the workspace and move the repository to src
mkdir -p ~/ros2_ws/src
mv $(ls -d * | grep -v ros2_ws) ~/ros2_ws/src
cd ~/ros2_ws
# Install and initialize rosdep
# sudo apt-get update
# sudo apt-get install -y python3-rosdep
sudo rosdep init
rosdep update
- run: |
cd ~/ros2_ws
rosdep install --from-paths src -i -r -y
- uses: ros-tooling/[email protected]
with:
package-name: kuka_package
target-ros2-distro: humble
55 changes: 47 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,37 @@
# KUKA LBR Cartesian Impedance Control
# KUKA LBR Cartesian Impedance Control

A repository for controlling the KUKA lbr or med with cartesian impedance control.

<table>
<tr>
<th>ROS2 Distro</td>
<th>Controller</td>
<th>FRI library</th>
<th>LBR Stack</th>
</tr>
<tr>
<td>Humble</td>
<td><a href='humble-controllers'><img src='https://github.com/lucabeber/effort_controller/actions/workflows/humble.yml/badge.svg'></a><br/> </td>
<td><a href='humble-fri-library'><img src='https://github.com/lbr-stack/fri/actions/workflows/build.yaml/badge.svg?branch=fri-1.15'></a><br/> </td>
<td><a href='humble-lbr-stack'><img src='https://github.com/idra-lab/lbr_fri_ros2_stack/actions/workflows/build-ubuntu-22.04-fri-1.15.yml/badge.svg'></a><br/> </td>
</tr>
<td>Jazzy</td>
<td><a href='jazzy-controllers'><img src='https://github.com/lucabeber/effort_controller/actions/workflows/jazzy.yml/badge.svg'></a><br/> </td>
<td><a href='jazzy-fri-library'><img src='https://github.com/lbr-stack/fri/actions/workflows/build.yaml/badge.svg?branch=fri-1.15'></a><br/> </td>
<td>not tested</a><br/> </td>
</tr>
</table>

### Setup
#### Set the FRI impedance gains to zero
## Setup
### Set the FRI impedance gains to zero
Follows the instructions reported in the lbr stack documentation that you can find [here](https://lbr-stack.readthedocs.io/en/latest/lbr_fri_ros2_stack/lbr_fri_ros2_stack/doc/hardware_setup.html).
Set the stiffness of the `JointImpedanceControlMode` in the `LBRServer.java` to zero for each joint, i.e.:
```
control_mode_ = new JointImpedanceControlMode(0, 0, 0, 0, 0, 0, 0);
```
Then synchronize the application to update the changes.

#### Install
### Install
Clone this repo inside your ros2 workspace as the `src` folder
```
git clone --recursive [email protected]:idra-lab/kuka_impedance.git src
Expand All @@ -25,21 +45,40 @@ Build the workspace
colcon build --symlink-install
```

### Run the controllers
## Run the controllers

#### Gravity compensation
### Gravity compensation
```
source install/setup.bash
ros2 launch lbr_bringup hardware.launch.py ctrl:=gravity_compensation
```

#### Cartesian impedance control
---

### Cartesian impedance control
```
source install/setup.bash
ros2 launch lbr_bringup hardware.launch.py ctrl:=cartesian_impedance_controller
```

---

#### References

### Cartesian impedance control with nullspace task
This controller takes the initial configuration as the reference position for the nullspace control.
Can be activated by setting
```
...
nullspace_stiffness: 10.0
...
```
in `lbr_fri_ros2_stack/lbr_description/ros2_control/lbr_controllers.yaml` in the `cartesian_impedance_controller` configuration.
Then run the controller
```
source install/setup.bash
ros2 launch lbr_bringup hardware.launch.py ctrl:=cartesian_impedance_controller
```

## References
- [Cartesian controllers](https://github.com/fzi-forschungszentrum-informatik/cartesian_controllers.git)
- [lbr ROS2 stack](https://github.com/lbr-stack/lbr_fri_ros2_stack)
Binary file added assets/cart_impedance.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/null_space_impedance.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion effort_controller
Submodule effort_controller updated 113 files

0 comments on commit bf0e166

Please sign in to comment.