Skip to content

Commit a1648fc

Browse files
author
harshad_zade
committed
Merge remote-tracking branch 'upstream/master'
2 parents 199fd65 + 0e11e81 commit a1648fc

20 files changed

Lines changed: 1075 additions & 12 deletions

Gemfile.lock

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
GEM
22
remote: https://rubygems.org/
33
specs:
4-
activesupport (6.0.3.7)
4+
activesupport (6.0.6.1)
55
concurrent-ruby (~> 1.0, >= 1.0.2)
66
i18n (>= 0.7, < 2)
77
minitest (~> 5.1)
@@ -16,7 +16,7 @@ GEM
1616
colorator (1.1.0)
1717
commonmarker (0.17.13)
1818
ruby-enum (~> 0.5)
19-
concurrent-ruby (1.1.8)
19+
concurrent-ruby (1.2.0)
2020
dnsruby (1.61.5)
2121
simpleidn (~> 0.1)
2222
em-websocket (0.5.2)
@@ -211,7 +211,7 @@ GEM
211211
rb-fsevent (~> 0.10, >= 0.10.3)
212212
rb-inotify (~> 0.9, >= 0.9.10)
213213
mercenary (0.3.6)
214-
mini_portile2 (2.8.0)
214+
mini_portile2 (2.8.2)
215215
minima (2.5.1)
216216
jekyll (>= 3.5, < 5.0)
217217
jekyll-feed (~> 0.9)
@@ -223,9 +223,9 @@ GEM
223223
jekyll-include-cache (~> 0.1)
224224
jekyll-paginate (~> 1.1)
225225
jekyll-sitemap (~> 1.3)
226-
minitest (5.14.4)
226+
minitest (5.17.0)
227227
multipart-post (2.1.1)
228-
nokogiri (1.13.10)
228+
nokogiri (1.14.3)
229229
mini_portile2 (~> 2.8.0)
230230
racc (~> 1.4)
231231
octokit (4.21.0)
@@ -234,7 +234,7 @@ GEM
234234
pathutil (0.16.2)
235235
forwardable-extended (~> 2.6)
236236
public_suffix (4.0.6)
237-
racc (1.6.1)
237+
racc (1.6.2)
238238
rb-fsevent (0.11.0)
239239
rb-inotify (0.10.1)
240240
ffi (~> 1.0)
@@ -260,13 +260,13 @@ GEM
260260
thread_safe (0.3.6)
261261
typhoeus (1.4.0)
262262
ethon (>= 0.9.0)
263-
tzinfo (1.2.10)
263+
tzinfo (1.2.11)
264264
thread_safe (~> 0.1)
265265
unf (0.1.4)
266266
unf_ext
267267
unf_ext (0.0.7.7)
268268
unicode-display_width (1.7.0)
269-
zeitwerk (2.4.2)
269+
zeitwerk (2.6.6)
270270

271271
PLATFORMS
272272
ruby

_data/navigation.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,12 @@ wiki:
6565
url: /wiki/common-platforms/ros/ros-navigation/
6666
- title: ROS Global Planner
6767
url: /wiki/common-platforms/ros/ros-global-planner/
68+
- title: Running ROS On An Unsupported OS
69+
url: /wiki/common-platforms/ros/ros-unsupported-os
70+
- title: Making RC Vehicles Autonomous
71+
url: /wiki/common-platforms/rccars-the-complete-guide/
72+
- title: Khepera 4
73+
url: /wiki/common-platforms/khepera4/
6874
- title: Sensing
6975
url: /wiki/sensing/
7076
children:
@@ -155,7 +161,7 @@ wiki:
155161
url: /wiki/state-estimation/orb-slam2-setup/
156162
- title: Visual Servoing
157163
url: /wiki/state-estimation/visual-servoing/
158-
- title: Cartographer SLAM ROS Integration
164+
- title: Cartographer SLAM ROS Integration
159165
url: /wiki/state-estimation/Cartographer-ROS-Integration/
160166
- title: Programming
161167
url: /wiki/programming/
@@ -189,7 +195,7 @@ wiki:
189195
url: /wiki/networking/rocon-multi-master/
190196
- title: ROS over Multiple Machines
191197
url: /wiki/networking/ros-distributed/
192-
- title: Setting up WiFi hotspot at the boot up for Linux devices
198+
- title: Setting up WiFi hotspot at the boot up for Linux devices
193199
url: /wiki/networking/wifi-hotspot/
194200
- title: Simulation
195201
url: /wiki/simulation/
@@ -211,6 +217,8 @@ wiki:
211217
url: /wiki/interfacing/blink-1-led/
212218
- title: micro-ROS for ROS2 on Microcontrollers
213219
url: /wiki/interfacing/microros-for-ros2-on-microcontrollers/
220+
- title: ROS 1 - ROS 2 Bridge
221+
url: /wiki/interfacing/ros1_ros2_bridge/
214222
- title: Computing
215223
url: /wiki/computing/
216224
children:
@@ -226,6 +234,8 @@ wiki:
226234
url: /wiki/computing/ubuntu-chromebook/
227235
- title: Setup your GPU System for Computer Vision
228236
url: /wiki/computing/setup-gpus-for-computer-vision/
237+
- title: Ubuntu Dual Boot and Troubleshooting Guide
238+
url: /wiki/computing/troubleshooting-ubuntu-dual-boot/
229239
- title: Fabrication
230240
url: /wiki/fabrication/
231241
children:
@@ -271,6 +281,8 @@ wiki:
271281
url: /wiki/tools/tmux/
272282
- title: udev Rules
273283
url: /wiki/tools/udev-rules/
284+
- title: ROS GUI
285+
url: /wiki/tools/ros-gui/
274286
- title: Rosbags in Matlab
275287
url: /wiki/tools/rosbags-matlab/
276288
- title: Making Field Testing Easier through Visualization and Simulation
113 KB
Loading

wiki/common-platforms/dji-sdk.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
date: 2017-08-21
3-
title: Outdoor UAV navigation (focus on DJI SDK)
3+
title: Outdoor UAV navigation (focus on DJI SDK)
44
---
55
While DJI has been developing great hardware and software to make relatively safe UAV technology commercially available and has made available an amazing SDK to help research and development, sometimes it becomes difficult to get details on their implementation as their documentation is pretty limited. This article will help a beginner quickly understand what kind of flight information they can get using DJI SDK and how they can use it for their specific use case.
66

wiki/common-platforms/khepera4.md

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
---
2+
date: 2022-04-29
3+
title: Khepera 4
4+
published: true
5+
---
6+
This article with serve as an introduction, overview, and quick-start guide to K-Team's Khepera 4 robots.
7+
8+
![Put a relevant caption here](assets/KHEPERA4.png)
9+
10+
The Khepera 4 is a robot platform designed for indoor applications, meant to operate on tables and floor of labs. They are meant to provide a way to test algorithms developed in simulations or on paper in the real world. They're most often used to test navigation, swarm, and artificial intelligence applications, providing researchers an easy way to see how their code runs on an actual robot.
11+
12+
## Overview
13+
Website about the Khepera 4: [link](https://www.k-team.com/khepera-iv)
14+
15+
The Khepera 4 is a circular, differential drive robot. It is 140.8 mm in in diameter and can carry up to 2 kg. It has a suite of sensors built-in: 3-axis gyroscope & accelerometer, 5 ultrasonic sensors, 12 infrared sensors, wheel encoders, and a front-facing camera. It also supports various add-ons through connectors at the top of the robot, allowing you to get [upward-facing camera](https://www.k-team.com/extensions-khepera-iv#stargazer) or install a [LIDAR sensor](https://www.k-team.com/extensions-khepera-iv#laserrangefinder). More detailed information can be found in the user manual: [link](https://ftp.k-team.com/KheperaIV/software/Gumstix%20COM%20Y/UserManual/Khepera%20IV%20User%20Manual%204.x.pdf)
16+
17+
## Quick-start guide
18+
The quick-start guide will discuss how to program and compile for the Khepera 4, and how to get it onto the robot.
19+
20+
### Programming
21+
To program for the Khepera 4, you will need a cross-compiler. A compiler turns high-level code into machine code that can be executed by a processor. A cross-compiler does the same thing, but for a processor other than the one compiling the code. While you will be developing and compiling the code on your computer, your computer won't run the code; the Khepera 4 will; therefore, you will need a cross-compiler.
22+
23+
The instructions for installing a cross-compiler can be found in the [user manual ch 5](https://ftp.k-team.com/KheperaIV/software/Gumstix%20COM%20Y/UserManual/Khepera%20IV%20User%20Manual%204.x.pdf#page=36). The light toolchain will most likely be sufficient for your use, unless you want to modify the kernel running on the Khepera 4. Follow the instructions to get the cross-compiler; when you get to the [FTP](https://ftp.k-team.com/KheperaIV/software/), I picked the *Gumstix COM Y* folder. Continue on with the installation, per the instructions.
24+
25+
Once installation is complete, you can run the *make* command to use the cross-compiler, assuming the Makefile is set up properly. At the installed location, the *template* directory will provide example code and Makefile that you can play around with. Using this as an example for the rest of the article, when you run *make* it will use *prog-template.c* to generate *prog-template.o* and *template*; the latter is the binary that the Khepera 4 will actually use. Now, you have a binary you can execute on the Khepera 4!
26+
27+
### WiFi
28+
Before the Khepera 4 can execute your code, you have to get it on their first. The easiest way is SCP, but you need a WiFi connection to do that. Straight out of the box, you probably won't be able to access it through WiFi, so here's how you set that up.
29+
30+
First, you need to connect to the Khepera 4 over WiFi:
31+
32+
1. Connect to the Khepera 4 using a USB cable; connect it to the robot's USB mini port. On Ubuntu, the robot should show up as */dev/ttyACM0*
33+
2. Use a serial port software to communicate with it; I used minicom. To run minicom, run *minicom -s*
34+
3. After running the command above, you can configure your settings; here's what you need to communicate properly: **TODO**
35+
36+
Once you have serial communication with the Khepera 4, you can access its files. You'll need to modify two files: */etc/systemd/network/wifi.network* and */etc/wpa_supplicant/wpa_supplicant-wlan0.conf*. *wifi.network* configures what the robot's IP address should be (or if it should be assigned dynamically by the router). *wpa_supplicant-wlan0.conf* configures what network it should connect to, and what username or password it should use if that's the case. Here's an example for a TPLINK router:
37+
```
38+
wifi.network:
39+
[Match]
40+
Name=wlan0
41+
42+
[Network]
43+
DNS=192.168.0.1
44+
Address=192.168.0.108/24
45+
```
46+
```
47+
ctrl_interface=/var/run/wpa_supplicant
48+
ctrl_interface_group=0
49+
update_config=1
50+
51+
network={
52+
ssid="TP-Link_ASDF"
53+
proto=WPA2
54+
key_mgmt=WPA-PSK
55+
pairwise=CCMP TKIP
56+
group=CCMP TKIP
57+
psk="pwd"
58+
priority=10
59+
scan_ssid=1
60+
}
61+
```
62+
Example above will configure the Khepera 4 to connect to WiFi named *TP-Link_ASDF* using password *pwd*, and it will have the IP address of *192.168.0.108* with subnet mask *255.255.255.0*. Make sure the DNS is valid for your specific WiFi!
63+
64+
Power cycling the robot after changing the WiFi settings is usually a good idea.
65+
66+
### ssh & scp
67+
Now that you have the Khepera 4 connected to the internet, you can SSH into it, allowing you to communicate without relying on a USB cable. Make sure your computer is connected to the same WiFi as the one you configured the Khepera 4 to connect to. Then, use the following command to SSH into the khepera:
68+
```
69+
ssh root@192.168.0.108
70+
```
71+
If you're asked if you trust this IP address, say yes. Now, you can navigate the Khepera 4's computer like you would a terminal: *ls*, *cp*, *mv*, etc.
72+
73+
If you're still in the *template* directory, and you have the binary that you cross-compiled called *template*, then you can transfer it over to the Khepera 4 using SCP:
74+
```
75+
cp template root@192.168.0.108:/home/root
76+
```
77+
This will put the *template* binary file on the robot with IP address 192.168.0.108 at the location */home/root*.
78+
79+
To run the template file, run it like any executable on your on computer. For instance, SSH into the Khepera 4 then use the following command:
80+
```
81+
./template
82+
```
83+
84+
## Example
85+
When installing the libraries and the cross-compiler, there's a very useful example provided by K-Team: *libkhepera-2.1/src/tests/kh4_example.c*. This will provide the user examples for reading sensor data and displaying them to terminal.
86+
87+
Another source for examples is RoboSAR, Team F from MRSD 2023, who has Khepera code that could be useful; here's their repo: [link](https://github.com/MRSD-Team-RoboSAR/robosar_khepera_code). The *main* function simply reads and transmits sensor data (including LIDAR) to another computer on the same network using UDP, using protobuf to package the data. The code also executes some basic obstacle avoidance using infrared sensors, and uses LEDs to alert the user to the status of the robot.
88+
89+
## Summary
90+
The Khepera 4 is a robot useful for testing algorithms outside of simulation. We've covered how to communicate with it, and how to program it. We've also covered some example code that can give insight into how to read and act upon sensor data.
91+
92+
## Further Reading
93+
- [Khepera 4 Evaluation](https://os.zhdk.cloud.switch.ch/tind-tmp-epfl/853d7c2e-9435-4de6-a330-551a73483cf5?response-content-disposition=attachment%3B%20filename%2A%3DUTF-8%27%27k4_paper.pdf&response-content-type=application%2Fpdf&AWSAccessKeyId=ded3589a13b4450889b2f728d54861a6&Expires=1651355948&Signature=hY72qIqgOyX6BTqPigNKq7T%2FRNs%3D)

0 commit comments

Comments
 (0)