Skip to content

Commit

Permalink
Add Static IP setting (#25)
Browse files Browse the repository at this point in the history
* Add Static IP setting

* Rename the mismatched link name

* Communication setup documentation

* Fix linting error.

* Add how to give serial comm permission to user

* Change file name and reference

---------

Co-authored-by: Haneol Kim <hekim@jmarple.ai>
  • Loading branch information
ulken94 and Haneol Kim authored Dec 11, 2023
1 parent 3896265 commit b4f59f9
Show file tree
Hide file tree
Showing 8 changed files with 127 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .ducker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ run_arg:
build_arg: []
mount_pwd: true
default_shell: zsh
lastexecid: 0915db6144ea
lastexecid: 3854da920448
1 change: 1 addition & 0 deletions DoxygenLayout.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<!-- Custom pages START -->
<tab type="usergroup" visible="yes" title="Getting started">
<tab type="user" url="@ref HardwareOverview" title="Hardware Overview"/>
<tab type="user" url="@ref Tutorial" visible="yes" title="Tutorial"/>
<tab type="user" url="@ref LiDARSetting" title="LiDAR Setting"/>
<tab type="user" url="@ref SLAMBOXSetting" title="SLAMBOX Setting"/>
</tab>
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/ardupilot/ardupilot_example.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@

- Update SLAMBOX Mavlink setting with command below

- Check the details [here](SLAMBOXSetting.html#SLAMBOXSettingsWithSerial-ConfigureSLAMBOX-SLAMBOXMavlinkConfiguration)
- Check the details [here](SLAMBOXSetting.html#SLAMBOXSetting-ConfigureSLAMBOX-SLAMBOXMavlinkConfiguration)

```
# Enable Mavlink
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/px4/px4_example.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@

- Update SLAMBOX Mavlink setting with command below

- Check the details [here](SLAMBOXSetting.html#SLAMBOXSettingsWithSerial-ConfigureSLAMBOX-SLAMBOXMavlinkConfiguration)
- Check the details [here](SLAMBOXSetting.html#SLAMBOXSetting-ConfigureSLAMBOX-SLAMBOXMavlinkConfiguration)

```
# Enable Mavlink
Expand Down
17 changes: 8 additions & 9 deletions docs/getting_started/slambox_setting.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ The `SLAMBOX` configuration can be configured via *serial communication with asc

[TOC]

## Install Serial Communication Tools {#SLAMBOXSettingsWithSerial-InstallSerialCommunicationTools}

## Install Serial Communication Tools {#SLAMBOXSetting-InstallSerialCommunicationTools}

<details open>
<summary> Unix OS </summary>
Expand Down Expand Up @@ -70,7 +69,7 @@ Working with Unix OS, use `minicom` to configure the **SLAMBOX**
For your convinience, turn Local echo on by pressing `<Ctrl>+A z e`
Then, start configuration as your needs by following [below section](#SLAMBOXSettingsWithSerial-ConfigureSLAMBOX).
Then, start configuration as your needs by following [below section](#SLAMBOXSetting-ConfigureSLAMBOX).
</details>
Expand All @@ -87,7 +86,7 @@ Then, start configuration as your needs by following [below section](#SLAMBOXSet
</details>
## Configure SLAMBOX {#SLAMBOXSettingsWithSerial-ConfigureSLAMBOX}
## Configure SLAMBOX {#SLAMBOXSetting-ConfigureSLAMBOX}
Using ascii command to change configuration of **SLAMBOX**
Expand All @@ -101,7 +100,7 @@ Using ascii command to change configuration of **SLAMBOX**
**NOTE** The **Baud rate** of serial connection for setting is fixed to **115200**
### SLAMBOX Serial Configuration {#SLAMBOXSettingsWithSerial-ConfigureSLAMBOX-SLAMBOXSerialConfiguration}
### SLAMBOX Serial Configuration {#SLAMBOXSetting-ConfigureSLAMBOX-SLAMBOXSerialConfiguration}
- `SERIAL_ENABLE` with option `0` or `1`. `0` means to disable and `1` means enable this option
Expand Down Expand Up @@ -137,7 +136,7 @@ $SERIAL_ENABLE 1#
$SERIAL_BAUD 921600#
```

### SLAMBOX Ethernet Configuration {#SLAMBOXSettingsWithSerial-ConfigureSLAMBOX-SLAMBOXEthernetConfiguration}
### SLAMBOX Ethernet Configuration {#SLAMBOXSetting-ConfigureSLAMBOX-SLAMBOXEthernetConfiguration}

- `ETH_ENABLE` with option `0` or `1`. `0` means to disable and `1` means enable this option

Expand All @@ -156,7 +155,7 @@ $ETH_PORT 25180#
$ETH_IP 192.168.1.50#
```

### SLAMBOX Mavlink Configuration {#SLAMBOXSettingsWithSerial-ConfigureSLAMBOX-SLAMBOXMavlinkConfiguration}
### SLAMBOX Mavlink Configuration {#SLAMBOXSetting-ConfigureSLAMBOX-SLAMBOXMavlinkConfiguration}

- `MAVLINK_ENABLE` with option `0` or `1`. `0` means to disable and `1` means enable this option

Expand All @@ -183,7 +182,7 @@ $MAVLINK_BAUD 921600#
$MAVLINK_TYPE 0#
```

### SLAMBOX Sensor Configuration {#SLAMBOXSettingsWithSerial-ConfigureSLAMBOX-SLAMBOXSensorConfiguration}
### SLAMBOX Sensor Configuration {#SLAMBOXSetting-ConfigureSLAMBOX-SLAMBOXSensorConfiguration}
- `LIDAR_TYPE` with option `0` to `5`

| option | sensor |
Expand All @@ -199,7 +198,7 @@ $MAVLINK_TYPE 0#
$LIDAR_TYPE 1#
```

### Save Configurations {#SLAMBOXSettingsWithSerial-ConfigureSLAMBOX-SaveConfigurations}
### Save Configurations {#SLAMBOXSetting-ConfigureSLAMBOX-SaveConfigurations}

- Configurtaion can be saved by command `SAVE` or `START`

Expand Down
115 changes: 115 additions & 0 deletions docs/getting_started/tutorial.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
# Tutorial {#Tutorial}

[TOC]

# 1. Communication Setting {#Tutorial-CommunicationSetting}

- To communicate with *SLAMBOX*, you need to setup the serial and ethernet of your **host PC**

## 1.1. Serial {#Tutorial-CommunicationSetting-Serial}

- To get data from SLAMBOX through serial, check your **host PC's** serial communication port

```bash
# check which serial port is online
ls -al /dev/ttyUSB*
```

If you connect the TTL2USB module properly, then the result shows like this

```
crw-rw---- 1 root dialout 188, 0 Dec 11 10:46 /dev/ttyUSB0
```

The result means the serial communication port is `/dev/ttyUSB0`

If your host PC account do not have a permission to `dialout` group, add the account to the group `dialout`

```bash
# add $USER to group dialout
sudo usermod -a -G dialout $USER

# activate the changes of group
newgrp dialout
```

## 1.2. Ethernet (OTG) {#Tutorial-CommunicationSetting-Ethernet}

To get data from *SLAMBOX* through etherent, then set your host PC's host IP like below.

### 1.2.1. Set Static IP with Terminal {#Tutorial-CommunicationSetting-Ethernet-SetStaticIPwithTerminal}

To set static ip to your host PC, please follow the commands below

**NOTE**: The default IP address of OTG port of *SLAMBOX* is `192.168.101.101`

```bash
# check the ethernet device
ifconfig

# result will show the ethernet port which connected with SLAMBOX
enx5ad1753eff84: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet6 fe80::b045:854e:fa2e:21b3 prefixlen 64 scopeid 0x20<link>
ether xx:xx:xx:xx:xx:xx txqueuelen 1000 (Ethernet)
RX packets 24 bytes 3121 (3.1 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 42 bytes 7403 (7.4 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
```

The device name `enx5ad1753eff84` is the OTG ethernet connection of SLAMBOX

Then set the device's IP

In this example, set the static IP to `192.168.101.5`

```bash
# set device's IP
sudo ifconfig enx5ad1753eff84 down
sudo ip addr add 192.168.101.5/24 dev enx5ad1753eff84
sudo ifconfig enx5ad1753eff84 up

# check the IP is set properly
ifconfig

enx5ad1753eff84: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.101.5 netmask 255.255.255.0 broadcast 0.0.0.0
inet6 fe80::b045:854e:fa2e:21b3 prefixlen 64 scopeid 0x20<link>
ether xx:xx:xx:xx:xx:xx txqueuelen 1000 (Ethernet)
RX packets 24 bytes 3121 (3.1 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 42 bytes 7403 (7.4 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
```

### 1.2.2. Set Static IP with Ubuntu GUI {#Tutorial-CommunicationSetting-Ethernet-SetStaticIPwithUbuntuGUI}

This part demonstrates how to set static ip to your host PC with ubuntu GUI.

![Check the SLAMBOX connection](imgs/getting_started/communication_setup/ubuntu_ip_setup_gui.png)

Click the **Setting** buttion(gear logo) then goto ipv4 tab

Then, set the device IP like the screen shot below

![Set static ip of the host device](imgs/getting_started/communication_setup/setup_static_ip_gui.png){width=70%}

# 2. LiDAR Setting {#Tutorial-LiDARSetting}

- Check how to setup LiDAR to *SLAMBOX*, please see here([LiDAR Setting](#LiDARSetting))

# 3. SLAMBOX Setting {#Tutorial-SLAMBOXSetting}

- Check how to setup *SLAMBOX* or how to configure *SLAMBOX*, please see here([SLAMBOX Setting](#SLAMBOXSetting))

# 4. Advanced {#Tutorial-Advanced}

We prefer you to check examples below

- [TurtleBot3 example](#TurtleBotExample)

- [PX4 example](#PX4Example)

- [Ardupilot example](#ArdupilotExample)

- [ROS example](https://github.com/j-marple-dev/slambox-ros)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit b4f59f9

Please sign in to comment.