Skip to content

Commit

Permalink
Merge pull request #64 from j3soon/docs/website
Browse files Browse the repository at this point in the history
Add document website
  • Loading branch information
j3soon authored Oct 23, 2024
2 parents cf63c8a + c2f7299 commit 4802cf3
Show file tree
Hide file tree
Showing 63 changed files with 2,467 additions and 1,215 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Ref: https://squidfunk.github.io/mkdocs-material/publishing-your-site/
name: Build Documentation
on:
push:
branches:
- master
- main
permissions:
contents: write
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# Ref: https://github.com/timvink/mkdocs-git-revision-date-localized-plugin#note-when-using-build-environments
with:
fetch-depth: '0'
- uses: actions/setup-python@v4
with:
python-version: 3.x
- uses: actions/cache@v2
with:
key: ${{ github.ref }}
path: .cache
- run: pip install -r requirements.txt
- run: mkdocs gh-deploy --force
# Ref: https://github.com/ojacques/mkdocs-git-committers-plugin-2
# Ref: https://github.com/ojacques/mkdocs-git-committers-plugin-2/issues/51#issuecomment-1951450239
env:
MKDOCS_GIT_COMMITTERS_APIKEY: ${{ secrets.MKDOCS_GIT_COMMITTERS_APIKEY }}

# DONE (Deploy the site):
# - In the forked GitHub repo page, go to `Settings > Pages` and change `Branch` to `gh-pages`:
# https://docs.github.com/en/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site
# - Visit the site at `https://<username>.github.io/<repository>`
# - For using custom domain, refer to the link below:
# https://www.mkdocs.org/user-guide/deploying-your-docs/#custom-domains
# - To publish the site to other platforms, refer to the link below:
# https://squidfunk.github.io/mkdocs-material/publishing-your-site/
# - Take Netlify as an example, follow:
# https://www.starfallprojects.co.uk/projects/deploy-host-docs/deploy-mkdocs-material-netlify/
# Make sure to also set up the secrets:
# https://docs.netlify.com/environment-variables/get-started/#site-environment-variables
44 changes: 28 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,37 @@ A repo containing essential ROS2 Humble features for controlling Autonomous Mobi

> Please note that this repo is under rapid development. The code is not guaranteed to be stable, and breaking changes may occur.
## Pre-built Docker Images
The documentation is hosted on <https://j3soon.github.io/ros2-essentials/>.

The following Docker images can be pulled by `docker pull <IMAGE_NAME>` or by `docker compose pull` in the corresponding directory.
## Pre-built Workspaces

Pre-built Docker images for each workspace can be pulled by running `docker compose pull` in the corresponding workspace directory.

Pulling the pre-built Docker images can bypass the time-consuming building process (for both docker compose & devcontainers).

| Docker Image | amd64 | arm64 | Notes | Maintainer |
|--------------|-------|-------|-------|------------|
| `j3soon/ros2-template-ws` [[tags](https://hub.docker.com/r/j3soon/ros2-template-ws/tags)][[code](./template_ws)] | ✔️ | ✔️ | | [Yu-Zhong Chen](https://github.com/YuZhong-Chen) |
| `j3soon/ros2-orbslam3-ws` [[tags](https://hub.docker.com/r/j3soon/ros2-orbslam3-ws/tags)][[code](./orbslam3_ws)] | ✔️ || | [Assume Zhan](https://github.com/Assume-Zhan) |
| `j3soon/ros2-rtabmap-ws` [[tags](https://hub.docker.com/r/j3soon/ros2-rtabmap-ws/tags)][[code](./rtabmap_ws)] | ✔️ || | [Assume Zhan](https://github.com/Assume-Zhan) |
| `j3soon/ros2-ros1-bridge-ws` [[tags](https://hub.docker.com/r/j3soon/ros2-ros1-bridge-ws/tags)][[code](./ros1_bridge_ws)] | ✔️ | ✔️ | Skip linting | [Yu-Zhong Chen](https://github.com/YuZhong-Chen) |
| `j3soon/ros2-ros1-bridge-build-ws` [[tags](https://hub.docker.com/r/j3soon/ros2-ros1-bridge-build-ws/tags)][[code](./ros1_bridge_ws)] | ✔️ | ✔️ | Skip linting | [Yu-Zhong Chen](https://github.com/YuZhong-Chen) |
| `j3soon/ros2-cartographer-ws` [[tags](https://hub.docker.com/r/j3soon/ros2-cartographer-ws/tags)][[code](./cartographer_ws)] | ✔️ | ✔️ | | [Assume Zhan](https://github.com/Assume-Zhan) |
| `j3soon/ros2-husky-ws` [[tags](https://hub.docker.com/r/j3soon/ros2-husky-ws/tags)][[code](./husky_ws)] | ✔️ | ✔️ | Real-world support | [Yu-Zhong Chen](https://github.com/YuZhong-Chen) |
| `j3soon/ros2-kobuki-ws` [[tags](https://hub.docker.com/r/j3soon/ros2-kobuki-ws/tags)][[code](./kobuki_ws)] | ✔️ | ✔️ | Real-world support | [Yu-Zhong Chen](https://github.com/YuZhong-Chen) |
| `j3soon/ros2-vlp-ws` [[tags](https://hub.docker.com/r/j3soon/ros2-vlp-ws/tags)][[code](./vlp_ws)] | ✔️ | ✔️ | Real-world support | [Assume Zhan](https://github.com/Assume-Zhan) |
| `j3soon/ros2-gazebo-world-ws` [[tags](https://hub.docker.com/r/j3soon/ros2-gazebo-world-ws/tags)][[code](./gazebo_world_ws)] | ✔️ | ❌️ | | [Yu-Zhong Chen](https://github.com/YuZhong-Chen) |
| `j3soon/ros2-aloha-ws` [[tags](https://hub.docker.com/r/j3soon/ros2-aloha-ws/tags)][[code](./aloha_ws)] | ✔️ | ✔️ | Simulation only | |
| Workspace | amd64 | arm64 | Notes | Maintainer |
|-----------|-------|-------|-------|------------|
| [Template](https://j3soon.github.io/ros2-essentials/template-ws/) | ✔️ | ✔️ | | [Yu-Zhong Chen](https://github.com/YuZhong-Chen) |
| [ORB-SLAM3](https://j3soon.github.io/ros2-essentials/orbslam3_ws) | ✔️ || | [Assume Zhan](https://github.com/Assume-Zhan) |
| [RTAB-Map](https://j3soon.github.io/ros2-essentials/rtabmap_ws/) | ✔️ || | [Assume Zhan](https://github.com/Assume-Zhan) |
| [ROS1 Bridge](https://j3soon.github.io/ros2-essentials/ros1_bridge_ws/) | ✔️ | ✔️ | Skip linting | [Yu-Zhong Chen](https://github.com/YuZhong-Chen) |
| [Cartographer](https://j3soon.github.io/ros2-essentials/cartographer_ws/) | ✔️ | ✔️ | | [Assume Zhan](https://github.com/Assume-Zhan) |
| [Clearpath Husky](https://j3soon.github.io/ros2-essentials/husky_ws/) | ✔️ | ✔️ | Real-world support | [Yu-Zhong Chen](https://github.com/YuZhong-Chen) |
| [Yujin Robot Kobuki](https://j3soon.github.io/ros2-essentials/kobuki_ws/) | ✔️ | ✔️ | Real-world support | [Yu-Zhong Chen](https://github.com/YuZhong-Chen) |
| [Velodyne VLP-16](https://j3soon.github.io/ros2-essentials/vlp_ws/) | ✔️ | ✔️ | Real-world support | [Assume Zhan](https://github.com/Assume-Zhan) |
| [Gazebo World](https://j3soon.github.io/ros2-essentials/gazebo_world_ws/) | ✔️ | ❌️ | | [Yu-Zhong Chen](https://github.com/YuZhong-Chen) |
| [ALOHA](https://j3soon.github.io/ros2-essentials/aloha_ws/) | ✔️ | ✔️ | Simulation only | |

## Building Documentation

```sh
virtualenv venv -p python3
source venv/bin/activate
cd docs
pip install -r requirements.txt
mkdocs serve
# Go to https://127.0.0.1:8000 to view the site.
```

## Acknowledgement

Expand All @@ -39,7 +51,7 @@ Disclaimer: this is not an official NVIDIA product.

## License

All modifications are licensed under [Apache License 2.0](./LICENSE).
All modifications are licensed under [Apache License 2.0](https://github.com/j3soon/ros2-essentials/blob/main/LICENSE).

However, this repository includes many dependencies released under different licenses. For information on these licenses, please check the commit history. Make sure to review the license of each dependency before using this repository.

Expand Down
125 changes: 2 additions & 123 deletions aloha_ws/README.md
Original file line number Diff line number Diff line change
@@ -1,124 +1,3 @@
# aloha_ws
# ROS 2 Essentials Workspace

## Start Container

```sh
cd ~/ros2-essentials/aloha_ws/docker
xhost +local:docker
docker compose up
# The first build will take a while (~10 mins), please wait patiently.
```

The commands in the following sections assume that you are inside the Docker container:

```sh
# in a new terminal
docker exec -it ros2-aloha-ws bash
```

## View Robot Model in RViz

```sh
ros2 launch interbotix_xsarm_descriptions xsarm_description.launch.py robot_model:=vx300s use_joint_pub_gui:=true
```

It is worth noting that `aloha_vx300s.urdf.xacro` and `vx300s.urdf.xacro` files are identical. We opt to use `vx300s` since `aloha_vx300s` seems to lack corresponding configs, such as those for MoveIt 2.

![](figure/rviz.png)

## View Robot Model in Gazebo

```sh
ros2 launch interbotix_xsarm_sim xsarm_gz_classic.launch.py robot_model:=vx300s
```

## ROS 2 Control

```sh
ros2 launch interbotix_xsarm_control xsarm_control.launch.py robot_model:=vx300s use_sim:=true
# and then use the `Interbotix Control Panel`.
```

![](figure/ros2-control.png)

## MoveIt 2 with RViz

```sh
ros2 launch interbotix_xsarm_moveit xsarm_moveit.launch.py robot_model:=vx300s hardware_type:=fake
```

![](figure/moveit-rviz.png)

## MoveIt 2 with Gazebo

```sh
ros2 launch interbotix_xsarm_moveit xsarm_moveit.launch.py robot_model:=vx300s hardware_type:=gz_classic
```

![](figure/moveit-gazebo.png)

## MoveIt 2 with Isaac Sim

Prepare USD files:

```sh
cd /home/ros2-essentials/aloha_ws/isaacsim/scripts
./create_urdf_from_xacro.sh
python3 create_vx300s_from_urdf.py
python3 create_vx300s_with_omnigraph.py
```

and run:

```sh
ros2 launch interbotix_xsarm_moveit xsarm_moveit.launch.py robot_model:=vx300s hardware_type:=isaac
# and then move the target and use the `MotionPlanning` panel.
```

![](figure/moveit-isaacsim.png)

### Debugging with Isaac Sim

The Isaac Sim app can be launched with:

```sh
isaacsim omni.isaac.sim
```

Keep in mind that the standalone scripts can be easily debugged in Isaac Sim's `Script Editor`.
Simply copy the code, omitting anything related to SimulationApp (remove the beginning and end),
and paste to the `Script Editor` and run it.

To open pre-configured USD file with OmniGraph:

- `File > Open` and click `My Computer`, then in `File name:` type:
```
/home/ros2-essentials/aloha_ws/isaacsim/assets/vx300s_og.usd
```
- Click `Window > Visual Scripting > Action Graph`
- In the `Action Graph` tab, click `Edit Action Graph` and select `/ActionGraph`
- Click `Play (SPACE)`

View the current joint states:

```sh
# in a new terminal
docker exec -it ros2-aloha-ws bash
ros2 topic echo /vx300s/joint_states
```

A specific world can also be directly launched and played with:

```sh
isaacsim omni.isaac.sim --exec '/home/ros2-essentials/aloha_ws/isaacsim/scripts/open_isaacsim_stage.py --path /home/ros2-essentials/aloha_ws/isaacsim/assets/vx300s_og.usd'
```

To access Nucleus from Isaac Sim, you should [install Nucleus](https://docs.omniverse.nvidia.com/nucleus/latest/workstation/installation.html) with default username/password `admin:admin` on your host machine or connect to an external Nucleus server.

## References

- [Interbotix X-Series Arms \| Trossen Robotics Documentation](https://docs.trossenrobotics.com/interbotix_xsarms_docs/index.html)
- [ROS 2 Interface](https://docs.trossenrobotics.com/interbotix_xsarms_docs/ros_interface/ros2.html)
- [ROS 2 Standard Software Setup](https://docs.trossenrobotics.com/interbotix_xsarms_docs/ros_interface/ros2/software_setup.html)
- [ROS 2 Open Source Packages](https://docs.trossenrobotics.com/interbotix_xsarms_docs/ros2_packages.html)
- [Stationary ALOHA Software Setup \| Trossen Robotics Documentation](https://docs.trossenrobotics.com/aloha_docs/getting_started/stationary/software_setup.html)
Please visit <https://j3soon.github.io/ros2-essentials/> for documentation.
79 changes: 2 additions & 77 deletions cartographer_ws/README.md
Original file line number Diff line number Diff line change
@@ -1,78 +1,3 @@
# ROS2 Cartographer
# ROS 2 Essentials Workspace

### Run with docker

```bash
git clone https://github.com/j3soon/ros2-essentials.git
```

```bash
cd ros2-essentials/cartographer_ws/docker
docker compose pull
docker compose up -d --build
```

### Simple Test With Turtlebot3

- Attach to the container

```sh
docker attach ros2-cartographer-ws
cd /home/ros2-essentials/cartographer_ws
```
- Open the turtlebot simulation in `tmux`

```bash
export TURTLEBOT3_MODEL=burger
ros2 launch turtlebot3_gazebo turtlebot3_world.launch.py
```
- Run the SLAM node in new window of `tmux`

```bash
ros2 launch turtlebot3_cartographer cartographer.launch.py is_sim:=True
```
- Run the control tool in new window of `tmux`

```bash
rqt_robot_steering
```

### Building Packages

```sh
docker attach ros2-cartographer-ws
cd /home/ros2-essentials/cartographer_ws
rosdep update
rosdep install --from-paths src --ignore-src --rosdistro humble -y
colcon build
```

> After the build process, make sure to source the `install/setup.bash` file.
> Otherwise, ROS2 will not locate the executable files. You can open a new terminal to accomplish this.

### Multi LiDAR - Single Robot SLAM test

#### Simulation

- multi_lidar_desp package: Description of a robot with multiple LiDARs.
- multi_lidar_gazebo package: Gazebo simulation of the robot with robot state publisher.

```bash
ros2 launch multi_lidar_gazebo multi_lidar_gazebo.launch.py
```

#### Run the SLAM node

- Run the cartographer SLAM node in new window of `tmux`
```bash
ros2 launch cartographer_demo cartographer_demo.launch.py is_sim:=True
```

- Run the control tool in new window of `tmux`
```bash
rqt_robot_steering
```

#### References

- [Cartographer Demo](https://google-cartographer-ros.readthedocs.io/en/latest/demos.html)
Please visit <https://j3soon.github.io/ros2-essentials/> for documentation.
Loading

0 comments on commit 4802cf3

Please sign in to comment.