-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMars_rover.html
467 lines (372 loc) · 14.3 KB
/
Mars_rover.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
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta content="width=device-width, initial-scale=1.0" name="viewport">
<title>Portfolio Details - Personal Bootstrap Template</title>
<meta content="" name="description">
<meta content="" name="keywords">
<!-- Favicons -->
<link href="assets/img/favicon.png" rel="icon">
<link href="assets/img/apple-touch-icon.png" rel="apple-touch-icon">
<!-- Google Fonts -->
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,600,600i,700,700i|Raleway:300,300i,400,400i,500,500i,600,600i,700,700i|Poppins:300,300i,400,400i,500,500i,600,600i,700,700i" rel="stylesheet">
<!-- Vendor CSS Files -->
<link href="assets/vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="assets/vendor/bootstrap-icons/bootstrap-icons.css" rel="stylesheet">
<link href="assets/vendor/boxicons/css/boxicons.min.css" rel="stylesheet">
<link href="assets/vendor/glightbox/css/glightbox.min.css" rel="stylesheet">
<link href="assets/vendor/remixicon/remixicon.css" rel="stylesheet">
<link href="assets/vendor/swiper/swiper-bundle.min.css" rel="stylesheet">
<!-- Template Main CSS File -->
<link href="css/style.css" rel="stylesheet">
<style>
.gallery {
position: relative;
overflow: hidden;
height: 600px; /* Set the height of the gallery container */
}
#main .gallery figure {
position: absolute;
top: 0;
left: 0;
margin: 0;
opacity: 0;
transition: opacity 0.5s ease-in-out;
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
}
#main .gallery figure > img {
max-width: 100%;
max-height: 100%;
width: auto;
height: auto;
}
#main .points {
text-align: center;
margin-top: 10px;
}
.point {
display: inline-block;
width: 10px;
height: 10px;
border-radius: 50%;
background-color: #aaa;
margin: 0 5px;
cursor: pointer;
}
.point.active {
background-color: #ffffff;
}
.abstract {
margin-top: 10px;
background-color: rgba(96, 96, 96, 0.5);
border-radius: 2%;
padding-top: 10px;
text-align: justify;
margin-bottom: 20px;
}
.portfolio-title{
padding-top: 30px;
}
#main {
background-size: cover;
color:rgb(246, 241, 241);
/* background: linear-gradient(to bottom, #303030, #808080); */
/* background-color: black; */
background-image: url('img/portfolio/mar_rover/mar_background.png'); background-size: cover;
}
#link-article{
color:rgb(246, 241, 241);
}
#link-article:hover{
color:rgb(157, 157, 157);
}
.image-container1 {
display: inline-grid;
justify-content: space-between;
align-items: center;
grid-template-columns: 48% 48%;
grid-template-rows: auto;
row-gap: 20px;
column-gap: 10px;
}
.image-container1 video {
width: 100%;
margin: 10px;
border-radius: 10px;
}
.image-container1 img {
width: 100%;
height: auto;
margin: 10px;
border-radius: 10px;
}
model-viewer {
width: 100%;
height: 60%;
background-color: #ffffff;
padding-bottom: 60%;
}
:not(:defined) > * {
display: none;
}
.progress-bar {
display: block;
width: 33%;
height: 10%;
max-height: 2%;
position: absolute;
left: 50%;
top: 50%;
transform: translate3d(-50%, -50%, 0);
border-radius: 25px;
box-shadow: 0px 3px 10px 3px rgba(0, 0, 0, 0.5), 0px 0px 5px 1px rgba(0, 0, 0, 0.6);
border: 1px solid rgba(255, 255, 255, 0.9);
background-color: rgba(0, 0, 0, 0.5);
}
.progress-bar.hide {
visibility: hidden;
transition: visibility 0.3s;
}
.update-bar {
background-color: rgba(255, 255, 255, 0.9);
width: 0%;
height: 100%;
border-radius: 25px;
float: left;
transition: width 0.3s;
}
#ar-button {
background-image: url(ar_icon.png);
background-repeat: no-repeat;
background-size: 20px 20px;
background-position: 12px 50%;
background-color: #fff;
position: absolute;
left: 50%;
transform: translateX(-50%);
white-space: nowrap;
bottom: 16px;
padding: 0px 16px 0px 40px;
font-family: Roboto Regular, Helvetica Neue, sans-serif;
font-size: 14px;
color:#4285f4;
height: 36px;
line-height: 36px;
border-radius: 18px;
border: 1px solid #DADCE0;
}
#ar-button:active {
background-color: #E8EAED;
}
#ar-button:focus {
outline: none;
}
#ar-button:focus-visible {
outline: 1px solid #4285f4;
}
@keyframes circle {
from { transform: translateX(-50%) rotate(0deg) translateX(50px) rotate(0deg); }
to { transform: translateX(-50%) rotate(360deg) translateX(50px) rotate(-360deg); }
}
@keyframes elongate {
from { transform: translateX(100px); }
to { transform: translateX(-100px); }
}
model-viewer > #ar-prompt {
position: absolute;
left: 50%;
bottom: 60px;
animation: elongate 2s infinite ease-in-out alternate;
display: none;
}
model-viewer[ar-status="session-started"] > #ar-prompt {
display: block;
}
model-viewer > #ar-prompt > img {
animation: circle 4s linear infinite;
}
.portfolio-title{
padding-top: 3%;
}
.project-intro{
padding-top: 2%;
}
.resume-item > h4{
color: white;
}
</style>
<script type="module" src="https://unpkg.com/@google/model-viewer/dist/model-viewer.min.js"></script>
<script nomodule src="https://unpkg.com/@google/model-viewer/dist/model-viewer-legacy.js"></script>
</head>
<body>
<main id="main">
<!-- ======= Portfolio Details ======= -->
<div class="container">
<!-- <model-viewer src="img/portfolio/mar_rover/assem.gltf" alt="VR Headset"></model-viewer> -->
<div class="row">
<h2 class="portfolio-title">Mars Rover</h2>
<!-- style="background-color: unset;" -->
<!-- style="background-image: url('img/portfolio/mar_rover/mar_background.jpg'); background-size: cover;" -->
<model-viewer src="img/portfolio/mar_rover/ImageToStl.com_mf3.glb" camera-orbit="145deg 75deg 180%" ar ar-modes="webxr scene-viewer quick-look" camera-controls poster="img/portfolio/mar_rover/poster.webp" shadow-intensity="1" style="background-color: unset;" >
<div class="progress-bar hide" slot="progress-bar">
<div class="update-bar"></div>
</div>
<button slot="ar-button" id="ar-button">
View in your space
</button>
<div id="ar-prompt">
<img src="img/portfolio/mar_rover/ar_hand_prompt.png">
</div>
</model-viewer>
<h3 class = "project-intro">Remote Control Mars Rover with Variable Chassis</h3>
<ul>
<li><strong>Category</strong>: Robotics</li>
<li><strong>Project Period</strong>: May. 2021 - Aug. 2021</li>
<li><strong>Roll</strong>: Team Leader</li>
</ul>
<div class = 'abstract'>
<p>
In response to the imperative need for Mars exploration, our project introduces a cutting-edge remote-control rover with a double-lever chassis adept at overcoming the rugged Martian terrain.
The combination of pivot and servo steering, along with a precision robotic arm and ultrasonic sensor, ensures optimal sample collection and obstacle navigation. Rigorously tested for reliability
through finite elements analysis, our rover addresses issues such as tilted bogie and rear wheel suspension using strategic code modifications and innovative acceleration methods. Meticulous budget
and personnel planning underscore our commitment to achieving maximum efficiency in fulfilling Mars sample collection objectives. In essence, our rover represents a paradigm shift in extraterrestrial
exploration, poised to significantly advance our understanding of the Martian environment.
</p>
<div class="gallery">
<figure><img src="img/portfolio/mar_rover/logo.png" alt="logo"></figure>
<figure><img src="img/portfolio/mar_rover/Untitled4.png" alt="Image 2"></figure>
<figure><img src="img/portfolio/mar_rover/Robotics-MARover.jpg" alt="Image 1"></figure>
<figure><img src="img/portfolio/mar_rover/Untitled1.JPG" alt="Image 3"></figure>
<figure><img src="img/portfolio/mar_rover/Untitled2.JPG" alt="Image 4"></figure>
<figure><img src="img/portfolio/mar_rover/Untitled3.JPG" alt="Image 5"></figure>
<figure><img src="img/portfolio/mar_rover/rotate.png" alt="Image 6"></figure>
</div>
<div class="points"></div>
</div>
<div class="resume">
<h3 style="padding-bottom: 2%;">Final Product</h3>
<div class="container">
<div class="section-title">
<h2 style="font-size: medium;" >Demo</h2>
</div>
<div class="row">
<div class="col-lg-6">
<div class="resume-item">
<h4>Barrier Master</h4>
<video id="Video" width=100% controls loop>
<source src="img/portfolio/mar_rover/barrier_overcome.mp4" type="video/mp4">
</video>
</div>
<div class="resume-item">
<h4>Collision-Aware Halt</h4>
<video id="Video" width=100% controls loop>
<source src="img/portfolio/mar_rover/sensor.mp4" type="video/mp4">
</video>
</div>
</div>
<div class="col-lg-6">
<!-- <h3>Flexible Steering</h3> -->
<div class="resume-item">
<h4>Pivot Steering</h4>
<video id="Video" width=100% controls loop>
<source src="img/portfolio/mar_rover/rotate.mp4" type="video/mp4">
</video>
</div>
<div class="resume-item">
<h4>Servo Steering</h4>
<video id="Video" width=100% controls loop>
<source src="img/portfolio/mar_rover/servo.mp4" type="video/mp4">
</video>
</div>
</div>
</div>
</div>
</div>
<h3>Assembling Process</h3>
<div class="image-container1">
<img src="img/portfolio/mar_rover/exp/exp1.png" alt="Image 2">
<img src="img/portfolio/mar_rover/exp/exp4.png" alt="Image 4">
<video id="myVideo" width="640" height="360" controls loop>
<source src="img/portfolio/mar_rover/exp/exp2.mp4" type="video/mp4">
</video>
<video id="myVideo1" width="640" height="360" controls loop>
<source src="img/portfolio/mar_rover/exp/exp3.mp4" type="video/mp4">
</video>
</div>
</div>
</div>
</main><!-- End #main -->
<!-- My JS Code-->
<script>
document.addEventListener("DOMContentLoaded", function() {
let automaticInterval; // Move the declaration here
const gallery = document.querySelector('.container .row .gallery');
const figures = document.querySelectorAll('.gallery figure');
const pointsContainer = document.querySelector('.points');
// Create navigation points
for (let i = 0; i < figures.length; i++) {
const point = document.createElement('div');
point.classList.add('point');
point.addEventListener('click', function() {
clearInterval(automaticInterval);
showImage(i);
});
pointsContainer.appendChild(point);
}
let currentIndex = 0;
function showImage(index) {
figures[currentIndex].style.opacity = 0;
figures[index].style.opacity = 1;
pointsContainer.children[currentIndex].classList.remove('active');
pointsContainer.children[index].classList.add('active');
currentIndex = index;
startAutomaticSlideShow();
}
function startAutomaticSlideShow() {
clearInterval(automaticInterval);
automaticInterval = setInterval(function() {
const nextIndex = (currentIndex + 1) % figures.length;
showImage(nextIndex);
}, 2500); // Change the time interval (in milliseconds) as needed
}
// Initial setup
showImage(0);
// Start automatic slideshow
startAutomaticSlideShow();
});
</script>
<script>
document.addEventListener('DOMContentLoaded', function() {
var video = document.getElementById('myVideo');
video.play();
});
</script>
<script>
document.addEventListener('DOMContentLoaded', function() {
var video = document.getElementById('myVideo1');
video.play();
});
</script>
<script type="module" src="https://ajax.googleapis.com/ajax/libs/model-viewer/3.2.0/model-viewer.min.js"></script>
<script>
const onProgress = (event) => {
const progressBar = event.target.querySelector('.progress-bar');
const updatingBar = event.target.querySelector('.update-bar');
updatingBar.style.width = `${event.detail.totalProgress * 100}%`;
if (event.detail.totalProgress === 1) {
progressBar.classList.add('hide');
event.target.removeEventListener('progress', onProgress);
} else {
progressBar.classList.remove('hide');
}
};
document.querySelector('model-viewer').addEventListener('progress', onProgress);
</script>
</body>
</html>