-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
36 additions
and
25 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
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 |
---|---|---|
@@ -1,30 +1,40 @@ | ||
# Deployment Instructions | ||
|
||
In this document, we provide instructions of how to deploy the model on a real AllegroHand. | ||
|
||
(This document is still under active polishing and construction, ping me in discord if you need help or want to contribute). | ||
This document provides instructions on how to deploy a trained policy on the real AllegroHand. | ||
|
||
## Install ROS | ||
|
||
There are varies ways of installing ROS. During the development of this project, we use the following command to install ROS: | ||
This section provides instruction for installing ROS. Note that there are varies ways of installing ROS. Since this project is developed using Ubuntu 22.04, which is not officially supported by ROS. During the development of this project, we install ros from [robostack](https://github.com/RoboStack/ros-noetic). It's ok to ignore this section if you already have a working ROS library setup. | ||
|
||
The following instructions are copied from [robostack](https://github.com/RoboStack/ros-noetic). We assume you have a miniconda or conda environment installed. | ||
|
||
First, install `mamba` in the `base` environment. | ||
|
||
``` | ||
conda install -c conda-forge -c robostack ros-noetic-desktop | ||
# if you don't have mamba yet, install it first in the base environment (not needed when using mambaforge): | ||
conda install mamba -c conda-forge | ||
``` | ||
This is because of the official ROS release does not support my operating system at that time. | ||
|
||
## Setup the Allegro ROS library | ||
Then, install `rosallegro` conda environment. Note that his `rosallegro` environment is different from what we used to train the policy. This is mainly to solve possible conflicts between ros and varies packages we used (e.g. `pytorch`). | ||
|
||
Follow the insturctions at [ros-allegro](https://github.com/HaozhiQi/ros-allegro/) repository to setup the ROS package and the PCAN driver. | ||
``` | ||
mamba create -n rosallegro ros-noetic-desktop python=3.9 -c robostack -c robostack-experimental -c conda-forge --no-channel-priority --override-channels | ||
conda activate rosallegro | ||
``` | ||
|
||
Finally, follow the instructions at [ros-allegro](https://github.com/HaozhiQi/ros-allegro/) repository to set up the ROS package and the PCAN driver. | ||
|
||
## Usage | ||
|
||
First, you need to open a shell and launch the following script: | ||
``` | ||
# may need to change /dev/pcanusbfd32 to your customized values | ||
roslaunch allegro_hand allegro_hand.launch HAND:=right AUTO_CAN:=false CAN_DEVICE:=/dev/pcanusbfd32 KEYBOARD:=false | ||
roslaunch allegro_hand allegro_hand.launch HAND:=right AUTO_CAN:=false CAN_DEVICE:=/dev/pcanusbfd32 KEYBOARD:=false CONTROLLER:=pd | ||
``` | ||
Once it's launched, run the following command to control the robot hand. | ||
|
||
Once it's launched, run the following command in the `hora` conda environment to control the robot hand. | ||
``` | ||
# e.g. scripts/deploy.sh hora | ||
conda activate hora | ||
scripts/deploy.sh ${OUTPUT_NAME} | ||
``` |
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
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