-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #29 from glaciercoder/main
Add a dependcy tutorial
- Loading branch information
Showing
3 changed files
with
168 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"label": "Navigation", | ||
"position": 2, | ||
"link": { | ||
"type": "generated-index", | ||
"description": "Navigation Interfaces" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
--- | ||
id: navigation_setup_doc | ||
title: Navigation Setup Documentation | ||
--- | ||
|
||
import Tabs from '@theme/Tabs'; | ||
import TabItem from '@theme/TabItem'; | ||
|
||
# Tinker Navigation Setup | ||
|
||
This doc is used for Tinker Navigation setup. Make sure you have finished the `ros2-humble` installation and the `ros2_control` setup in [this doc](temp). | ||
|
||
## Install `nav2` stack | ||
|
||
```sh | ||
sudo apt install ros-humble-navigation2 | ||
sudo apt install ros-humble-nav2-bringup | ||
sudo apt install ros-humble-robot-localization | ||
sudo apt install ros-humble-slam-toolbox | ||
``` | ||
|
||
## Setup Chassis | ||
Clone `tk23_navigation`: | ||
```sh | ||
git clone [email protected]:tinkerfuroc/tk23_navigation.git | ||
``` | ||
Make sure USB_CAN is connected, then | ||
```sh | ||
sudo ./setupcan.sh | ||
``` | ||
Then launch chassis: | ||
```sh | ||
./chassis_bringup.sh | ||
``` | ||
You can now use keyboard to control the chassis | ||
|
||
## Setup Lidar | ||
|
||
Tinker uses Livox-Mid360 now. | ||
1. Config [livox-SDK2](https://github.com/Livox-SDK/Livox-SDK2/blob/master/README.md): | ||
```sh | ||
git clone https://github.com/Livox-SDK/Livox-SDK2.git | ||
cd ./Livox-SDK2/ | ||
mkdir build | ||
cd build | ||
cmake .. && make -j | ||
sudo make install | ||
``` | ||
2. Livox Driver: the official driver config can be found [here](https://github.com/Livox-SDK/livox_ros_driver2?tab=readme-ov-file). We have put the driver into `tk23_navigation` package and the user don't need to config driver addtionally. | ||
3. Setup `pointcloud2laserscan`: | ||
Tinker navigation uses 2D laser scan from 3D pointcloud for mapping. install: | ||
```sh | ||
sudo apt install ros-humble-pointcloud-to-laserscan | ||
``` | ||
4. Test lidar: | ||
Go to `tk23_navigation`, run | ||
```sh | ||
./chassis_lidar_bringup.sh | ||
``` | ||
You should see pointcloud in rviz2. | ||
## Setup Map | ||
To setup a map, go to `tk23_navigation`, run: | ||
```sh | ||
ros2 launch tinker_nav_bringup tinker_slam.launch.py | ||
``` | ||
s | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
--- | ||
last_update: | ||
date: 5/26/2024 | ||
author: CabbageDog | ||
--- | ||
|
||
# Tinker New PC Setup | ||
This Document aims to provide the steps to set up a PC for Tinker developing. | ||
## System Requirements | ||
`Ubuntu 22.04 Desktop` | ||
## Basic Software Installation | ||
Download `.deb` package of `chrome`, `vs code` from the official site | ||
```sh | ||
sudo dpkg -i <xxx>.deb | ||
``` | ||
## Basic Commands Installation | ||
```sh | ||
sudo apt update | ||
sudo apt upgrade | ||
sudo apt-get install git vim curl htop | ||
``` | ||
#### Config `git` | ||
```sh | ||
git config --global user.name "YOUR_NAME" | ||
git config --global user.email "YOUR_EMAIL" | ||
# Generate ssh key | ||
ssh-keygen -t ed25519 -C "[email protected]" | ||
``` | ||
Then add the key to github, see [ref](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account) | ||
|
||
## Config `zsh` (Optional) | ||
Since many scripts are based on `zsh`, it is recommended to config `zsh`: | ||
```sh | ||
sudo apt-get install zsh | ||
sudo vim /etc/passwd | ||
``` | ||
Change then end of the line started with your username `/bin/bash` to `/bin/zsh` | ||
### Config `oh-my-zsh` and `powerlevel10k` | ||
Use `oh-my-zsh` to customize `zsh`:[oh-my-zsh](https://ohmyz.sh/) | ||
|
||
Use `powerlevel10k`: [powerlevel10k](https://github.com/romkatv/powerlevel10k) | ||
|
||
> Attention: powerlevel works best using its fonts, so don't forget install the fonts and apply them in the profile of zsh | ||
Config `auto_suggestion` and `syntax-highlighting` | ||
```sh | ||
sudo git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions | ||
sudo git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting | ||
``` | ||
Edit `.zshrc`, add: | ||
```sh | ||
plugins=( | ||
... | ||
zsh-autosuggestions | ||
zsh-syntax-highlighting | ||
) | ||
``` | ||
|
||
## Install ROS2-Humble | ||
ROS2 humble can be installed following [official-docs], use | ||
```sh | ||
sudo apt install ros-humble-desktop-full | ||
``` | ||
This makes `gazebo11` installed as well. | ||
And don't forget | ||
```sh | ||
sudo apt install ros-dev-tools | ||
``` | ||
Config `zshrc` | ||
```sh | ||
echo "source /opt/ros/humble/setup.zsh" >> .zshrc | ||
echo "source /usr/share/colcon_cd/function/colcon_cd.sh" >> ~/.zshrc | ||
echo "export _colcon_cd_root=/opt/ros/humble/" >> ~/.zshrc | ||
``` | ||
Config `rosdep` | ||
```sh | ||
sudo rosdep init | ||
sudo rosdep update | ||
``` | ||
Some useful packages: | ||
```sh | ||
sudo apt-get install ros-humble-rqt-tf-tree | ||
sudo apt install ros-humble-gazebo-ros-pkgs | ||
``` | ||
|
||
## Install `ros2_control` | ||
`ros2_control` is used in many parts of tinker such as chassis or arm: | ||
```sh | ||
sudo apt-get install ros-humble-ros2-control | ||
sudo apt-get install ros-humble-ros2-controllers | ||
sudo apt-get install ros-humble-gazebo-ros2-control | ||
``` |