-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpost_22_24.html
238 lines (206 loc) · 10.1 KB
/
post_22_24.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">
<title>Avinash Sen - Master Research Project Blog</title>
<!-- Bootstrap core CSS -->
<link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<!-- Custom fonts for this template -->
<link href="vendor/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
<link href='https://fonts.googleapis.com/css?family=Lora:400,700,400italic,700italic' rel='stylesheet' type='text/css'>
<link href='https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800' rel='stylesheet' type='text/css'>
<!-- Custom styles for this template -->
<link href="css/clean-blog.min.css" rel="stylesheet">
<script type="text/javascript" async
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.4/MathJax.js?config=TeX-MML-AM_CHTML" async>
</script>
</head>
<body>
<!-- Navigation -->
<nav class="navbar navbar-expand-lg navbar-light fixed-top" id="mainNav">
<div class="container">
<a class="navbar-brand" href="about.html">Avinash Sen</a>
<button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
Menu
<i class="fa fa-bars"></i>
</button>
<div class="collapse navbar-collapse" id="navbarResponsive">
<ul class="navbar-nav ml-auto">
<li class="nav-item">
<a class="nav-link" href="index.html">Home</a>
</li>
<li class="nav-item">
<a class="nav-link" href="about.html">About</a>
</li>
<li class="nav-item">
<a class="nav-link" href="contact.html">Contact</a>
</li>
</ul>
</div>
</div>
</nav>
<!-- Page Header -->
<header class="masthead" style="background-image: url('img/week_22_24.jpg')">
<div class="overlay"></div>
<div class="container">
<div class="row">
<div class="col-lg-8 col-md-10 mx-auto">
<div class="post-heading">
<h1>Week 22-24 </h1>
<h2 class="subheading">Calibration of Realsense.</h2>
<span class="meta">Posted by
<a href="about.html">Avinash Sen</a>
on April 10, 2020</span>
</div>
</div>
</div>
</div>
</header>
<!-- Post Content -->
<article>
<div class="container">
<div class="row">
<div class="col-lg-8 col-md-10 mx-auto">
<font size="6"><b>Calibration</b></font>
<p>
The calibration of the camera sensor was carried on with the determination of the transformation from
the coordinate system of the centre of the gripper to the camera.
The process of determining was redone with more precision, if the angle of the camera changes with the perpendicular movement of the robot's
end effector.
Afterwards the translation of the X,Y and Z was calculated. To calculate the exact diference from the tip of the gripper to the camera in the Z-axis,
I gathered some readings from the camera when it is vertically pointing to the table. Thishelp in knowing the difference to the base
of the robot. Then those were compared with the Z-coordinate of the end effector read in the RVIZ. After gathering data
for different distances the average was calculated.
</p>
<p>
<center>
<p>
<img src="img/calib_ext.png" alt="" width="100%" height="100%"/>
</p>
</center>
</p>
<p>
Having already the transformation the URDF was changed, by altering the binpicking_robot_macro.xacro file and adding the
binpicking_gripper_macro.xacro, in order to incorporate the
coordinate system of the sender of the laser sensor. The (.STL) file of the device was also included for a better visualization as shown above.
</p>
<font size="6"><b>Realsense</b></font>
<p>
The calibration of the Realsense was my next step in this week. To do so the
<a href="http://wiki.ros.org/visp_hand2eye_calibration">visp_hand2eye_calibration ROS package</a>
was used. This package is used to estimate the camera position with respect to its effector (the robot arm)
using the ViSP library. To compute the relative transformation between the the camera and the hand it is necessary
to fed the calibrator node with the /world_effector and the /camera_object transformations. This last one
is calculated using an aruco and the
<a href="http://wiki.ros.org/aruco_detect">aruco_detect</a> package which detects the pose of aruco markers, and this process
can be visualized in the picture below.
</p>
<center>
<p><img src="img/aruco.png" alt="" width="70%" height="70%"/>
</p>
</center>
<p>
To use this package it is necessary to install the fiducial software from binary packages using the
following command.
</p>
<p>
<div style="background: #f0f0f0; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;"><pre style="margin: 0; line-height: 125%">sudo apt-get install ros-kinetic-fiducials</pre></div>
</p>
<p>
This calibration process is easily visualized in the scheme bellow.
</p>
<center>
<p>
<img src="img/transformations_robot_realsense.png" alt="" width="80%" height="80%"/>
</p>
</center>
<p>
For this calibration to work, the creation of a client, which feeds different
transformations to the calibrator responsible for computing the relative
transformation between the the camera and the hand from a few poses, is fundamental. The camera_calibration_client.py program,
present in the <i>calibration</i> file, is responsible for executing this process and printing the /effector_camera transformation
in the xyz(transformation) and rpy(rotation) format. With this it is possible to visualize the tree of the transformations
of the entire system.
</p>
<center>
<p><img src="img/frames_tree.png" alt="" width="90%" height="90%"/>
</p>
</center>
<p>
In order to visualize the robot, realsense and all the associated coordinate systems, the URDF model
of the entire system was changed, by altering the binpicking_macro.xacro file to incorporate the Realsense.
All the components can be visualized and analysed live by running the next command.
</p>
<p>
<div style="background: #f0f0f0; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;"><pre style="margin: 0; line-height: 125%">roslaunch binpicking_system global_state_visualize.launch</pre></div>
</p>
<center>
<p>
<iframe width="640" height="360"
src="https://www.youtube.com/embed/yAPadMrLlF0?autoplay=1&loop=1&playlist=yAPadMrLlF0">
</iframe>
</p>
</center>
<p>The obtained caliberation results are as follows:</p>
<center>
<p>
<img src="img/refer1.jpeg" alt="" width="45%" height="45%"/>
<img src="img/refer2.jpeg" alt="" width="45%" height="45%"/>
</p>
</center>
<!-- Pager -->
<div class="clearfix">
<a class="btn btn-primary float-left" href="post_19_21.html">←Previous Week </a>
<a class="btn btn-primary float-right" href="post_25_26.html">Next Week →</a>
</div>
</div>
</div>
</div>
</article>
<hr>
<!-- Footer -->
<footer>
<div class="container">
<div class="row">
<div class="col-lg-8 col-md-10 mx-auto">
<ul class="list-inline text-center">
<!-- <li class="list-inline-item">
<a href="#">
<span class="fa-stack fa-lg">
<i class="fa fa-circle fa-stack-2x"></i>
<i class="fa fa-twitter fa-stack-1x fa-inverse"></i>
</span>
</a>
</li> -->
<li class="list-inline-item">
<a href="https://www.facebook.com/avinashsen707">
<span class="fa-stack fa-lg">
<i class="fa fa-circle fa-stack-2x"></i>
<i class="fa fa-facebook fa-stack-1x fa-inverse"></i>
</span>
</a>
</li>
<li class="list-inline-item">
<a href="https://github.com/avinashsen707">
<span class="fa-stack fa-lg">
<i class="fa fa-circle fa-stack-2x"></i>
<i class="fa fa-github fa-stack-1x fa-inverse"></i>
</span>
</a>
</li>
</ul>
<p class="copyright text-muted">Copyright 2020 © avinashsen707.github.io</p>
</div>
</div>
</div>
</footer>
<!-- Bootstrap core JavaScript -->
<script src="vendor/jquery/jquery.min.js"></script>
<script src="vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
<!-- Custom scripts for this template -->
<script src="js/clean-blog.min.js"></script>
</body>
</html>