Skip to content

Commit

Permalink
Move content from readme to doc site
Browse files Browse the repository at this point in the history
  • Loading branch information
janblumenkamp committed May 3, 2024
1 parent 9cc6635 commit 1f8dfdd
Show file tree
Hide file tree
Showing 5 changed files with 176 additions and 111 deletions.
114 changes: 5 additions & 109 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,113 +1,9 @@
General information:
User nvidia, password nvidia
# Cambridge RoboMaster

1) Change hostname
Allow NVIdia user to use sudo without password, modify /etc/hostname to the new hostname, then reboot
```
sudo ./setup/sudocfg.bash
sudo nano /etc/hostname
>robomaster-1
sudo reboot
```
This is the source repository containing all information necessary to reproduce the Cambridge RoboMaster platform.

2) Network setup
This allows access to the internet through wgb
```
sudo ./setup/nmcli.bash
> Connection 'robomaster' (56d6c150-46eb-4028-be24-2faa2eec9486) successfully added.
> Connection 'wired' (ba5c3b46-94df-44e2-bd49-3cdeba1f25d1) successfully added.
```
<iframe src="https://drive.google.com/file/d/1jWwP6suwpkOU9ZxwHMxLMfk5RL20GtL8/preview" width="560" height="315" allow="autoplay"></iframe>

You can test the setup by pinging the router:
```
ping 10.3.1.1
> PING 10.3.1.1 (10.3.1.1) 56(84) bytes of data.
64 bytes from 10.3.1.1: icmp_seq=1 ttl=64 time=4.82 ms
64 bytes from 10.3.1.1: icmp_seq=2 ttl=64 time=89.2 ms
```
Paper: TBD

And by showing the network config, where the `wlan0` configuration should look like this:
```
ip a
> 4: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether f4:3b:d8:e0:33:a5 brd ff:ff:ff:ff:ff:ff
altname wlP1p1s0
inet 10.3.1.4/24 brd 10.3.1.255 scope global noprefixroute wlan0
valid_lft forever preferred_lft forever
inet6 fe80::680c:3a7f:11b1:cc8b/64 scope link noprefixroute
valid_lft forever preferred_lft forever
```

Optionally, if the router is configured and connected to the internet, you can test pinging a website:
```
ping google.com
> PING google.com (216.58.204.78) 56(84) bytes of data.
64 bytes from lhr48s49-in-f14.1e100.net (216.58.204.78): icmp_seq=1 ttl=54 time=19.3 ms
```

The ethernet is set up with ip address 10.3.0.x. After connecting a cable to another device, the eth0 interface should show up.
```
ip a
> 3: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 48:b0:2d:d8:bf:74 brd ff:ff:ff:ff:ff:ff
altname enP8p1s0
inet 10.3.0.4/24 brd 10.3.0.255 scope global noprefixroute eth0
valid_lft forever preferred_lft forever
inet6 fe80::65bb:1eb:71e1:986/64 scope link noprefixroute
valid_lft forever preferred_lft forever
```

3) Install nvidia jetpack and other utilities
```
sudo ./setup/apt.bash
```
This may take a while. Reboot after.

4) Set up docker
```
sudo ./docker/add_group.bash
sudo ./docker/setup_docker_compose.bash
sudo cp docker/daemon.json /etc/docker
sudo service docker restart
```

Optional: Pull images for CAN, cam and UI:
```
sudo ./docker/pull_images.sh
```
If this step is skipped, the installation commands will build from scratch.

5) Set up CAN
```
cd robomaster_bridge
sudo ./install.bash
```

6) Set up cameras
The cameras can be tested with the following command if logged in on a terminal in non-headless mode (i.e. with a monitor connected):
```
gst-launch-1.0 -e nvarguscamerasrc sensor-id=0 ! 'video/x-raw(memory:NVMM),width=3840,height=2160,framerate=30/1' ! queue ! nvvidconv ! fakesink
gst-launch-1.0 -e nvarguscamerasrc sensor-id=0 ! 'video/x-raw(memory:NVMM),width=3840,height=2160,framerate=30/1' ! queue ! nvvidconv ! xvimagesink -e
```

Setup:
```
cd cam_driver
sudo ./install.bash
```

6) Set up UI
```
cd ui
sudo ./install.bash
```

7) Adhoc setup
```
sudo ./adhoc/nmcli.bash
```

8) Adding users
```
./setup/adduser.bash
```
For all further information, please refer the [website](https://proroklab.github.io/cambridge-robomaster/).
29 changes: 29 additions & 0 deletions docs/hardware_setup.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
layout: default
title: Hardware Setup
nav_order: 3
---

# Hardware
{: .no_toc }

## Table of contents
{: .no_toc .text-delta }

1. TOC
{:toc}

## RoboMaster Assembly

## Components

## Laser Cutting

## Raspberry Pi

### Wire harness

## Jetson

### Wire harness

7 changes: 7 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: Home
layout: home
nav_order: 1
---

This is the homepage and documentation for the Cambridge RoboMaster.
132 changes: 132 additions & 0 deletions docs/software_setup.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
---
layout: default
title: Software Setup
nav_order: 4
---

# Software
{: .no_toc }

## Table of contents
{: .no_toc .text-delta }

1. TOC
{:toc}

## Flashing

Differing procedure for Jetson vs Raspberry Pi.

General information Jetsons:
User nvidia, password nvidia

## Change hostname
Allow NVIdia user to use sudo without password, modify /etc/hostname to the new hostname, then reboot
```
sudo ./setup/sudocfg.bash
sudo nano /etc/hostname
>robomaster-1
sudo reboot
```

## Network setup
This allows access to the internet through wgb
```
sudo ./setup/nmcli.bash
> Connection 'robomaster' (56d6c150-46eb-4028-be24-2faa2eec9486) successfully added.
> Connection 'wired' (ba5c3b46-94df-44e2-bd49-3cdeba1f25d1) successfully added.
```

You can test the setup by pinging the router:
```
ping 10.3.1.1
> PING 10.3.1.1 (10.3.1.1) 56(84) bytes of data.
64 bytes from 10.3.1.1: icmp_seq=1 ttl=64 time=4.82 ms
64 bytes from 10.3.1.1: icmp_seq=2 ttl=64 time=89.2 ms
```

And by showing the network config, where the `wlan0` configuration should look like this:
```
ip a
> 4: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether f4:3b:d8:e0:33:a5 brd ff:ff:ff:ff:ff:ff
altname wlP1p1s0
inet 10.3.1.4/24 brd 10.3.1.255 scope global noprefixroute wlan0
valid_lft forever preferred_lft forever
inet6 fe80::680c:3a7f:11b1:cc8b/64 scope link noprefixroute
valid_lft forever preferred_lft forever
```

Optionally, if the router is configured and connected to the internet, you can test pinging a website:
```
ping google.com
> PING google.com (216.58.204.78) 56(84) bytes of data.
64 bytes from lhr48s49-in-f14.1e100.net (216.58.204.78): icmp_seq=1 ttl=54 time=19.3 ms
```

The ethernet is set up with ip address 10.3.0.x. After connecting a cable to another device, the eth0 interface should show up.
```
ip a
> 3: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 48:b0:2d:d8:bf:74 brd ff:ff:ff:ff:ff:ff
altname enP8p1s0
inet 10.3.0.4/24 brd 10.3.0.255 scope global noprefixroute eth0
valid_lft forever preferred_lft forever
inet6 fe80::65bb:1eb:71e1:986/64 scope link noprefixroute
valid_lft forever preferred_lft forever
```

## Install nvidia jetpack and other utilities
```
sudo ./setup/apt.bash
```
This may take a while. Reboot after.

## Set up docker
```
sudo ./docker/add_group.bash
sudo ./docker/setup_docker_compose.bash
sudo cp docker/daemon.json /etc/docker
sudo service docker restart
```

Optional: Pull images for CAN, cam and UI:
```
sudo ./docker/pull_images.sh
```
If this step is skipped, the installation commands will build from scratch.

## Set up CAN
```
cd robomaster_bridge
sudo ./install.bash
```

## Set up cameras
The cameras can be tested with the following command if logged in on a terminal in non-headless mode (i.e. with a monitor connected):
```
gst-launch-1.0 -e nvarguscamerasrc sensor-id=0 ! 'video/x-raw(memory:NVMM),width=3840,height=2160,framerate=30/1' ! queue ! nvvidconv ! fakesink
gst-launch-1.0 -e nvarguscamerasrc sensor-id=0 ! 'video/x-raw(memory:NVMM),width=3840,height=2160,framerate=30/1' ! queue ! nvvidconv ! xvimagesink -e
```

Setup:
```
cd cam_driver
sudo ./install.bash
```

## Set up UI
```
cd ui
sudo ./install.bash
```

## Adhoc setup
```
sudo ./adhoc/nmcli.bash
```

## Adding users
```
./setup/adduser.bash
```
5 changes: 3 additions & 2 deletions docs/supplementary.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Home
layout: home
layout: default
title: Supplementary
nav_order: 2
---

# Supplementary Videos
Expand Down

0 comments on commit 1f8dfdd

Please sign in to comment.