Project

General

Profile

Cooperation Manipulation Control » History » Version 6

Kévin Desormeaux, 2021-06-15 15:32

1 1 Kévin Desormeaux
h1. Cooperation Manipulation Control
2
3 2 Kévin Desormeaux
h2. Franka_ros
4
5 1 Kévin Desormeaux
To operate the pandas it is necessary to have real-time kernels on the machines running the control stacks. It is the case with the *kukarm* and *truyere* workstation.
6 2 Kévin Desormeaux
You should have ROS (melodic version ideally) installed. You will need to also to install *franka_ros* and *libfranka* .
7 1 Kévin Desormeaux
8
<pre>
9
sudo apt-get install ros-melodic-franka-ros
10
sudo apt-get install ros-melodic-libfranka
11
</pre>
12
13 2 Kévin Desormeaux
You are strongly advised to read the franka documentation to begin with. See https://redmine.laas.fr/projects/dual_arm_exp/wiki/Franka_documentation_and_operating_the_Pandas and https://frankaemika.github.io/docs/franka_ros.html.
14
15
!ros-architecture.png!
16
17
Basically franka_ros is a collection of package integrating libfranka into ros_control. There is packages for hardware abstraction, to control the grippers, for robots description etc.
18
19 3 Kévin Desormeaux
*Important* : libfranka must have the same versions running on the workstations (kukarm, truyere etc) and on the panda controllers (FCI). Otherwise there will be compatibility issues.
20 1 Kévin Desormeaux
21
h2. CM2C
22 3 Kévin Desormeaux
23 5 Kévin Desormeaux
h3. Installation
24
25 3 Kévin Desormeaux
Once franka_ros is installed you can create a catkin workspace in your home directory to install CM2C. See http://wiki.ros.org/catkin/Tutorials/create_a_workspace.
26
CM2C is available here on the mp2_ros repository:
27
28
https://redmine.laas.fr/projects/m2p2/repository
29 4 Kévin Desormeaux
30
Then you only have to compile your catkin workspace and CM2C can be launched. 
31
You might need to install different ROS packages missing on the system. 
32
*Important* : your catkin workspace must be built in release mode! By default it might be in debug mode, and CM2C might not be able to run at the desired frequency for real time usage.
33
34
<pre>
35
catkin build -DCMAKE_BUILD_TYPE=Release
36 1 Kévin Desormeaux
</pre>
37
38
Information on how to use CM2C can be found a bit further in the wiki: https://redmine.laas.fr/projects/dual_arm_exp/wiki/Control_API_functions_description 
39 5 Kévin Desormeaux
40 6 Kévin Desormeaux
41 5 Kévin Desormeaux
h3. The code
42
43
All the important code is located in a single file: admittance_joint_trajectory_controller_impl.h. This is where you will find the admittance control law implementation etc.
44
45 6 Kévin Desormeaux
h3. CM2P Inputs
46
47
CM2C spawns follow_joint_trajectory action servers with the following names:
48
49
<pre>
50
/panda_1_controller/follow_joint_trajectory
51
/panda_2_controller/follow_joint_trajectory
52
</pre>
53
54
CM2P send the trajectories to these servers via the dual_arm_controller_api class.
55
56
h3. From admittance_joint_trajectory_controller to simple joint_trajectory_controller
57
58 1 Kévin Desormeaux
You might want to not use the admittance gains, and only run a simple joint_trajectory_controller. This can be done by commenting the admittance gains in those 3 lines and compiling after:
59
60 6 Kévin Desormeaux
<pre>
61
desired_state_.position[i] = desired_state_.position[i];// - q_dc_[i];
62
desired_state_.velocity[i] = desired_state_.velocity[i];// - dq_dc_[i];
63
desired_state_.acceleration[i] = desired_state_.acceleration[i];// - ddq_dc_[i];
64
</pre>
65
66
A reason for that is that we had issues running a place() with the admittance gains. Without it works fine.
67
68
h3. External forces estimation
69
70
The admittance control law uses the external forces measurements on the end effector to compute the admittance gains for each joint.
71
72
73
h4. Force/Torque sensors integration
74
75
For now we use the pandas Force/Torque sensors (FTS) to estimate the forces and torques at the end effector (EEF). The pandas have FTS at the joints, so the forces at the EEF are estimates. 
76
If the results are okay, it would be better to dispose of a real FTS placed at the EEF. We have that at LAAS, but we didn't manage to finish the integration.
77
From an hardware point of view this is done. The wires have been extended and 3d printed support have been printed to integrate it. You can find the .stl model here. 
78
79
From a software point of view we have a C++ library developed by Matthieu, the icub-libs. See https://git.openrobots.org/projects/icub-libs.
80
I developed a ROS wrapper of this library that you can find here: https://redmine.laas.fr/projects/icub_fts_wrapper.
81
You can put the wrapper in your catkin workspace and build it along with CM2C. Obviously you will have to install the library beforehand.
82
83
You can launch the wrapper like so in a terminal:
84
85
<pre>
86
rosrun icub_fts_wrapper icub_fts_wrapper
87
</pre>
88
89
The wrapper will publish on the topic "/icub_fts_wrapper/fts_data" the force/torque sensor data. *As you can see the problem here is that it was made for a single arm and need to be extended to dual arm* by having different topic names etc. A way to do this is to use a launch file with the name of the arm as an argument, and use it to initialize the topic. 
90
 
91
The work on the wrapper is mostly done but there is a bug regarding the resolution on the Y axis to correct as well as the projection of the forces from the FTS frame to the EEF frame. The translation part is trivial but the orientation part might require more efforts.