README.md 4.58 KB
Newer Older
1
## ROS panda capacity package and catkin
SKURIC Antun's avatar
SKURIC Antun committed
2
This is an example catkin workspace for panda capacity calculation. In the this directory you can find the implementation of the python capacity module for a specific use case of Panda robot. The directory consists of two ros packages:
3
4
- franka_description: Panda robot definitions from Franka Emika  http://wiki.ros.org/franka_description
- **panda_capacity: the capacity solver for Panda robot**
SKURIC Antun's avatar
SKURIC Antun committed
5

6
7
8
### Install the ros packages - using catkin
To run panda robot capacity calculation nodes first clone the repository and submodules:
```shell
9
git clone --recursive git@gitlab.inria.fr:auctus-team/people/antunskuric/ros/catkin_workspaces/panda_capacity_ws.git
SKURIC Antun's avatar
SKURIC Antun committed
10
cd panda_capacity_ws
11
```
SKURIC Antun's avatar
SKURIC Antun committed
12
And then just build the workspace
13
14
```shell
cd ..
15
catkin build
16
17
18
```
And you should be ready to go!

19
20
21
22
23
24
# panda_capacity package

`panda_capacity` package is an example implementation of the task space capacity calculation for for Franka Emika Panda robot in a form of a catkin ros package.

It uses the library [pinocchio](https://github.com/stack-of-tasks/pinocchio) for calculating robot kinematics.
## Dependencies
25
26
27
28
29
30
For visualizing the polytopes in RVIZ you will need to install the [jsk-rviz-plugin](https://github.com/jsk-ros-pkg/jsk_visualization)

```sh
sudo apt install ros-*-jsk-rviz-plugins # melodic/kinetic... your ros version
```

31
32
33
34
The code additionally depends on the pinocchio library. 

### Pinocchio already installed
If you do already have pinocchio installed simply install the the pip package `pycapacity`
35
36
37
```
pip install pycapacity
```
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
And you're ready to go!

### Installing pinocchio

If you dont have pinocchio installed we suggest you to use Anaconda. Create the environment will all dependencies:

```bash
conda env create -f env.yaml 
conda activate panda_capacity  # activate the environment
```

Once the environment is activated you are ready to go.

## Create your own catkin workspace

Then create new catkin workspace:
```bash
mkdir ~/capacity_ws && cd ~/capacity_ws/
mkdir src && cd src
```
Clone the projects:
```shell
git clone https://gitlab.inria.fr/auctus-team/people/antunskuric/ros/ros_nodes/panda_capacity.git
```
Clone the Franka description package for visualisation 
```shell
git clone https://gitlab.inria.fr/auctus-team/components/robots/panda/franka_description.git
```

Finally you can build the workspace
```shell
cd ..
catkin build
```
And you should be ready to go!


75
76
77
78
79
80
81
82
83
84
85
86

### One panda simulation
Once when you have everything installed you will be able to run the interactive simulations and see the polytope being visualised in real-time.

<img src="https://gitlab.inria.fr/auctus-team/people/antunskuric/ros_nodes/panda_capacity/-/raw/master/images/one_panda.png" height="250px">

To see a simulation with one panda robot and its force and velocity manipulatibility ellipsoid and polytope run the command in the terminal.

```shell
source ~/capacity_ws/devel/setup.bash 
roslaunch panda_capacity one_panda.launch
```
87
88
89
> If using anaconda, don't forget to call <br>
> `conda activate panda_capacity` <br> 
> before you call `roslaunch`
90
91
92
93
94
95
96
97
98
99


### Two panda simulation

To demonstrate the collaborative robotics applications of our algorithm we have provided an interactive simulation of two panda robots where use can visualise their separate and joint force capacities. 

<img src="https://gitlab.inria.fr/auctus-team/people/antunskuric/ros_nodes/panda_capacity/-/raw/master/images/two_panda.png" height="250px">

For the interactive simulation of two panda robots with their own capacity measures you can simply run the commands:
```shell
SKURIC Antun's avatar
source    
SKURIC Antun committed
100
source ~/your_catkin_ws/devel/setup.bash 
101
102
103
roslaunch panda_capacity two_panda.launch
```

104
105
106
107
> If using anaconda, don't forget to call <br>
> `conda activate panda_capacity` <br> 
> before you call `roslaunch`

108
109
110
111
112
#### Minkowski sum of polytopes
<img src="https://gitlab.inria.fr/auctus-team/people/antunskuric/ros_nodes/panda_capacity/-/raw/master/images/minkowski.png" height="250px">

Open a new terminal and run the command:
```shell
SKURIC Antun's avatar
source    
SKURIC Antun committed
113
source ~/your_catkin_ws/devel/setup.bash 
114
115
rosrun panda_capacity panda_force_polytope_sum.py
```
116
117
118
> If using anaconda, don't forget to call <br>
> `conda activate panda_capacity` <br> 
> before you call `rosrun`
119
120
121
122
123
124

#### Intersection of polytopes
<img src="https://gitlab.inria.fr/auctus-team/people/antunskuric/ros_nodes/panda_capacity/-/raw/master/images/intersect.png" height="250px">

Open a new terminal and run the command:
```shell
SKURIC Antun's avatar
source    
SKURIC Antun committed
125
source ~/your_catkin_ws/devel/setup.bash 
126
127
rosrun panda_capacity panda_force_polytope_intersection.py
```
128
129
130
> If using anaconda, don't forget to call <br>
> `conda activate panda_capacity` <br> 
> before you call `rosrun`