Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions _docs/tutorials/getting_started/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,21 +101,21 @@ Run the subscriber.
Run the micro-ROS Agent.
For the micro-ROS Agent to find the XML reference file, the execution must be done from the executable folder.

```bash
```cmd
cd C:\A\install\Lib\uros_agent\
uros_agent.exe udp 8888
```

Run the publisher.

```bash
```cmd
cd C:\C\install\Lib\int32_publisher_c\
int32_publisher_c.exe
```

Run the subscriber.

```bash
```cmd
cd C:\C\install\Lib\int32_subscriber_c\
int32_subscriber_c.exe
```
Expand Down Expand Up @@ -174,21 +174,21 @@ Run the subscriber.
Run the micro-ROS Agent.
For the micro-ROS Agent to find the XML reference file, the execution must be done from the executable folder.

```bash
```cmd
cd C:\A\install\Lib\uros_agent\
uros_agent.exe udp 8888
```

Run the publisher.

```bash
```cmd
cd C:\C\install\Lib\string_publisher_c\
string_publisher_c.exe
```

Run the subscriber.

```bash
```cmd
cd C:\C\install\Lib\string_subscriber_c\
string_subscriber_c.exe
```
Expand Down Expand Up @@ -256,21 +256,21 @@ Run the subscriber.
Run the micro-ROS Agent.
For the micro-ROS Agent to find the XML reference file, the execution must be done from the executable folder.

```bash
```cmd
cd C:\A\install\Lib\uros_agent\
uros_agent.exe udp 8888
```

Run the publisher.

```bash
```cmd
cd C:\C\install\Lib\complex_msg_publisher_c\
complex_msg_publisher_c.exe
```

Run the subscriber.

```bash
```cmd
cd C:\C\install\Lib\complex_msg_subscriber_c\
complex_msg_subscriber_c.exe
```
Expand Down Expand Up @@ -386,35 +386,35 @@ Run the display node.
Run the micro-ROS Agent.
For the micro-ROS Agent to find the XML reference file, the execution must be done from the executable folder.

```bash
```cmd
cd C:\A\install\Lib\uros_agent\
uros_agent.exe udp 8888
```

Run the altitude_sensor node.

```bash
```cmd
cd C:\C\install\Lib\rad0_altitude_sensor_c
rad0_altitude_sensor_c.exe
```

Run the actuator node.

```bash
```cmd
cd C:\C\install\Lib\rad0_actuator_c
rad0_actuator_c.exe
```

Run the display node.

```bash
```cmd
cd C:\C\install\Lib\rad0_display_c\
rad0_display_c.exe
```

###### ROS2 nodes

```bash
```cmd
cd C:\A\install\Lib\rad0_control_cpp\
rad0_control_cpp.exe
```
Expand Down
73 changes: 73 additions & 0 deletions _includes/search-lunr.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
<script src="/js/lunr.js"></script>

<script>
{% assign counter = 0 %}
var documents = [{% for page in site.pages %}{% if page.url contains '.xml' or page.url contains 'assets' %}{% else %}{
"id": {{ counter }},
"url": "{{ site.url }}{{ page.url }}",
"title": "{{ page.title }}",
"body": "{{ page.content | markdownify | replace: '.', '. ' | replace: '</h2>', ': ' | replace: '</h3>', ': ' | replace: '</h4>', ': ' | replace: '</p>', ' ' | strip_html | strip_newlines | replace: ' ', ' ' | replace: '"', ' ' }}"{% assign counter = counter | plus: 1 %}
}, {% endif %}{% endfor %}{% for page in site.without-plugin %}{
"id": {{ counter }},
"url": "{{ site.url }}{{ page.url }}",
"title": "{{ page.title }}",
"body": "{{ page.content | markdownify | replace: '.', '. ' | replace: '</h2>', ': ' | replace: '</h3>', ': ' | replace: '</h4>', ': ' | replace: '</p>', ' ' | strip_html | strip_newlines | replace: ' ', ' ' | replace: '"', ' ' }}"{% assign counter = counter | plus: 1 %}
}, {% endfor %}{% for page in site.posts %}{
"id": {{ counter }},
"url": "{{ site.url }}{{ page.url }}",
"title": "{{ page.title }}",
"body": "{{ page.date | date: "%Y/%m/%d" }} - {{ page.content | markdownify | replace: '.', '. ' | replace: '</h2>', ': ' | replace: '</h3>', ': ' | replace: '</h4>', ': ' | replace: '</p>', ' ' | strip_html | strip_newlines | replace: ' ', ' ' | replace: '"', ' ' }}"{% assign counter = counter | plus: 1 %}
}, {% endfor %}{% for page in site.docs %}{
"id": {{ counter }},
"url": "{{ site.url }}{{ page.url }}",
"title": "{{ page.title }}",
"body": "{{ page.date | date: "%Y/%m/%d" }} - {{ page.content | markdownify | replace: '.', '. ' | replace: '\', '/' | replace: '</h2>', ': ' | replace: '</h3>', ': ' | replace: '</h4>', ': ' | replace: '</p>', ' ' | strip_html | strip_newlines | replace: ' ', ' ' | replace: '"', ' ' }}"{% assign counter = counter | plus: 1 %}
}{% if forloop.last %}{% else %}, {% endif %}{% endfor %}];

var idx = lunr(function () {
this.ref('id')
this.field('title')
this.field('body')

documents.forEach(function (doc) {
this.add(doc)
}, this)
});
function lunr_search(term) {
document.getElementById('lunrsearchresults').innerHTML = '<ul></ul>';
if(term) {
document.getElementById('lunrsearchresults').innerHTML = "<p>Search results for '" + term + "'</p>" + document.getElementById('lunrsearchresults').innerHTML;
//put results on the screen.
var results = idx.search(term);
if(results.length>0){
//console.log(idx.search(term));
//if results
for (var i = 0; i < results.length; i++) {
// more statements
var ref = results[i]['ref'];
var url = documents[ref]['url'];
var title = documents[ref]['title'];
var body = documents[ref]['body'].substring(0,160)+'...';
document.querySelectorAll('#lunrsearchresults ul')[0].innerHTML = document.querySelectorAll('#lunrsearchresults ul')[0].innerHTML + "<li class='lunrsearchresult'><a href='" + url + "'><span class='title'>" + title + "</span><br /><span class='body'>"+ body +"</span><br /><span class='url'>"+ url +"</span></a></li>";
}
} else {
document.querySelectorAll('#lunrsearchresults ul')[0].innerHTML = "<li class='lunrsearchresult'>No results found...</li>";
}
}
return false;
}
</script>
<style>
.lunrsearchresult .title {color: #d9230f;}
.lunrsearchresult .url {color: silver;}
.lunrsearchresult a {display: block; color: #777;}
.lunrsearchresult a:hover, .lunrsearchresult a:focus {text-decoration: none;}
.lunrsearchresult a:hover .title {text-decoration: underline;}
</style>

<form class="navbar-form navbar-right" onSubmit="return lunr_search(document.getElementById('lunrsearch').value);">
<div class="form-group">
<label for="lunrsearch" class="fa fa-search"></label>
<input type="text" class="form-control fa fa-search" id="lunrsearch" name="q" maxlength="255" value="" placeholder="Search via Lunr.js" />
</div>
</form>
18 changes: 6 additions & 12 deletions _includes/topnav.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,11 @@
<li {% if page.sectionid=='docs' %} class="active" {% endif %}><a href="{{ "/docs/home/" | prepend: site.baseurl }}">Docs</a></li>
<li {% if page.sectionid=='posts' %} class="active" {% endif %}><a href="{{ site.posts.first.url | prepend: site.baseurl }}">Updates</a></li>
</ul>
<div class="navbar-right">
<!--form class="navbar-form navbar-left">
<!div class="form-group has-feedback">
<input id="search-box" type="search" class="form-control" placeholder="Search...">
<i class="fa fa-search form-control-feedback"></i>
</div>
</form-->
<ul class="nav navbar-nav">
<li><a href="{{ site.git_address }}"><i class="fa fa-github" aria-hidden="true"></i></a></li>
</ul>
</div>
</div>
<ul class="nav navbar-nav navbar-right">
<li>{% include search-lunr.html %}</li>
<li><a href="{{ site.git_address }}"><span class="fa fa-github" aria-hidden="true"></span></a></li>
</ul>
</div>

</div>
</nav>
5 changes: 4 additions & 1 deletion _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@
<body>

{% include topnav.html %}

<div class="container" id="lunrsearchresults">
<ul></ul>
</div>

<div class="page-content">
<div class="wrapper">
{{ content }}
Expand Down
Loading