Skip to content

Commit

Permalink
typo fixing in new READMEs
Browse files Browse the repository at this point in the history
Former-commit-id: 1bd77155bc39ac9bcc617ee3747cf05ef2c16047
  • Loading branch information
IrvingF7 committed Oct 18, 2024
1 parent 2cdd8fe commit ac67518
Show file tree
Hide file tree
Showing 3 changed files with 87 additions and 85 deletions.
120 changes: 61 additions & 59 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
**More Documentation Ongoing for VLM Reasoning and Real World Experiment. The README Needs a Lot of Cleaning and Update**
**More Documentation Ongoing for VLM Reasoning and Real World Experiments. The README Needs a Lot of Cleaning and Update**

:new: [2024-10-17] *Installation for Hardware Integration/3D Printing Updated.*

:new: [2024-10-15] *Installation for Robotics Software Updated.*

:new: [2024-10-11] *Made Public*
# FusionSense
### [[Page](https://ai4ce.github.io/FusionSense/)] | [[Paper](https://arxiv.org/abs/2410.08282)] | [[Video](https://youtu.be/thC0PeAQxe0)]
Expand All @@ -25,7 +27,7 @@ If you have no need for this part, feel free to jump into [Step 1](https://githu
- For hardware integration, please see [3D Printing Instructions](./instructions/3d_printing.md).

### Step 1: Install 3D Gaussian Dependencies and Nerfstudio
**Note:** Because our major dependencies, `Nerfstudio` and `Grounded-SAM-2`, officially support two different CUDA version (11.8 vs. 12.1), we will have to create two separate environments. We hope to resolve this in the future when `Nerfstudio` bump its official CUDA support version.
**Note:** Because our major dependencies, `Nerfstudio` and `Grounded-SAM-2`, officially support two different CUDA versions (11.8 vs. 12.1), we will have to create two separate environments. We hope to resolve this in the future when `Nerfstudio` bumps its official CUDA support version.

```sh
git clone --recursive https://github.com/ai4ce/FusionSense.git
Expand Down Expand Up @@ -56,7 +58,7 @@ pip install -e .

We use `Grounded-SAM-2` for segmenting the foreground and background. Please make sure to use our modified submodule.

We recommend starting a separate Conda environment, since `Grounded-SAM-2` requires CUDA 12.1, which is not yet officially supported by `Nerfstudio`.
We recommend starting a separate Conda environment since `Grounded-SAM-2` requires CUDA 12.1, which is not yet officially supported by `Nerfstudio`.
```sh
cd Grounded-SAM2-for-masking
cd checkpoints
Expand All @@ -83,7 +85,7 @@ pip install --no-build-isolation -e grounding_dino

For further installation problems:

- For `dn-splatter`, see [Installation](https://github.com/maturk/dn-splatter?tab=readme-ov-file#installation)
- For `dn-splatter`, see [Installation](https://github.com/maturk/dn-splatter?tab=readme-ov-file#installation)  

- For `Grounded-SAM2-for-masking`, see [Installation](https://github.com/IDEA-Research/Grounded-SAM-2#installation)

Expand All @@ -92,19 +94,19 @@ For further installation problems:
set `train.txt` with images id.

### Extract Mask
**Switch your conda env first**
set your scene path and prompt text with the end of '.'
`eg. 'transparent white statue.'`
**Switch your conda env first**  
Set your scene path and prompt text with an '.' at the end.  
`eg. 'transparent white statue.'`  

```bash
```bash  
conda activate G-SAM-2
cd Grounded-SAM2-for-masking
python grounded_sam2_hf_model_imgs_MaskExtract.py --path {ABSOLUTE_PATH} --text {TEXT_PROMPT_FOR_TARGET_OBJ}
python grounded_sam2_hf_model_imgs_MaskExtract.py  --path {ABSOLUTE_PATH} --text {TEXT_PROMPT_FOR_TARGET_OBJ}
cd ..
```
run the script to extract masks.
```  
run the script to extract masks.  
If the `num_no_detection` is not 0, you need to select the frame again. Then you will see mask_imgs in `/masks`, and you can check `/annotated` frames to see the results more directly.
If the `num_no_detection` is not 0, you need to select the frame again. Then you will see mask_imgs in `/masks`, and you can check `/annotated` frames to see the results more directly.  
### Run pipeline
You can change configs here: `configs/config.py`
Expand All @@ -131,58 +133,58 @@ more details in nerfstudio `ns-render`.
## Dataset Format
```bash
datasets/
ds_name/
├── transforms.json # need for training
├── train.txt
├── images/
├── rgb_1.png
└── rgb_2.png
├── realsense_depth/
├── depth_1.png
└── depth_2.png
│── tactile/
├── image
├── mask
├── normal
└── patch
├── model.stl # need for evaluation
├── normals_from_pretrain/ # generated
├── rgb_1.png
└── rgb_2.png
├── foreground_pcd.ply
└── merged_pcd.ply
    ds_name/
   
    ├── transforms.json # need for training
   
    ├── train.txt
   
    ├── images/
    │   ├── rgb_1.png
    │   └── rgb_2.png
   
    ├── realsense_depth/
    │   ├── depth_1.png
    │   └── depth_2.png
   
    │── tactile/
    │   ├── image
    │   ├── mask
    │   ├── normal
    │   └── patch
   
    ├── model.stl       # need for evaluation
   
    ├── normals_from_pretrain/ # generated
    │   ├── rgb_1.png
    │   └── rgb_2.png
   
    ├── foreground_pcd.ply
   
    └── merged_pcd.ply
```
## Outputs Format
```bash
outputs/
ds_name/
├── MESH/
└── mesh.ply
├── nerfstudio_models/
└── 30000.ckpt
├── cluster_centers.npy
├── config.yml
├── high_grad_pts.pcd
├── high_grad_pts_ascii.pcd
└── dataparser_transforms.json
    ds_name/
   
    ├── MESH/
    │   └── mesh.ply
   
    ├── nerfstudio_models/
    │   └── 30000.ckpt
    │  
    ├── cluster_centers.npy
   
    ├── config.yml
   
    ├── high_grad_pts.pcd
   
    ├── high_grad_pts_ascii.pcd
   
    └── dataparser_transforms.json
eval/
ds_name/ *evaluation results files*
    ds_name/ *evaluation results files*
```
42 changes: 21 additions & 21 deletions instructions/3d_printing.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,30 @@

## Object
- The `.stl` for printing the Stanford Bunny can be found at `/assets/3d_printing/object/stanford_bunny.stl`.
- The print file can be found at `/assets/3d_printing/object/stanford_bunny.form`
- The printing is done on a Formlabs Form 3 SLA 3D printer. The material used are:
- Transparent bunny: Clear Resin V4
- Black Bunny: Black Resin V4
- Reflective Bunny: Tough 2000 V1 + Generic reflective paint from Amazon
- The print file can be found at `/assets/3d_printing/object/stanford_bunny.form`.
- The printing is done on a Formlabs Form 3 SLA 3D printer. The materials used are:
    - Transparent bunny: Clear Resin V4
    - Black Bunny: Black Resin V4
    - Reflective Bunny: Tough 2000 V1 + Generic reflective paint from Amazon
- Some tips for printing:
1. Try to align the supports at the bottom of the bunny, which is invisible during experiment and won't be touched, because supports will leave some artifacts (bump) on the surface.
2. Try not to use the cure station for the transparent bunny, because curing will cause the clear resin to become yellowish.
3. For the same reason, we did not cure the black and reflective bunnies as we want to maintain maximum comparability between them. Instead, we use a fan to blow on the three bunnies for 24 hours.
    1. Try to align the supports at the bottom of the bunny, which tends to be invisible during experiments and won't be touched. Supports will leave some artifacts (bumps) on the surface.
    2. Avoid using the cure station for the transparent bunny, because curing will cause the clear resin to become yellowish.
    3. For the same reason, we did not cure the black and reflective bunnies as we want maximum comparability among them. Instead, we use a fan to blow on the three bunnies for 24 hours.

## Camera and Tactile Sensor Mount
- The `.stl` files for the mount that connect the sensor/camera to the robot are located at:
- `/assets/3d_printing/sensor_mount/xArm6_Interface_V2.STL`
- `/assets/3d_printing/sensor_mount/xArm6_Sensor_Mount_V2.STL`
- The design source file from Solidworks is also in the same folder
- The interface is to connect to the robot EEF flange, while the mount will carry the camera and the sensor. The mount will be insert on top of the interface.
- The assembly file, which put the models of mount, interface, sensor and camera together, can be found in the `/assets/3d_printing/sensor_mount/assembly` folder.
- This can be used for visualization in RViz, or for collision avoidance. For collision avoidance, I recommend downsample the assembly stl to reduce face number. There is a sample in the provided xArm ROS2 package
- The `.stl` files for the mount that connects the sensor/camera to the robot are located at:
    - `/assets/3d_printing/sensor_mount/xArm6_Interface_V2.STL`
    - `/assets/3d_printing/sensor_mount/xArm6_Sensor_Mount_V2.STL`
- The design source files from Solidworks are also in the same folder
- The interface is to connect to the robot EEF flange, while the mount will carry the camera and the sensor. The mount will be inserted at the top of the interface.
- The assembly file, which puts the models of mount, interface, sensor, and camera together, can be found in the `/assets/3d_printing/sensor_mount/assembly` folder.
    - This can be used for visualization in RViz or collision avoidance. For collision avoidance, I recommend downsampling the assembly stl to reduce the face number. There is a sample in the provided xArm ROS2 package
- Two M2 screws to connect the GelSight Mini tactile sensor. Two M3 screws to connect the Intel RealSense D405 camera.
- **Important:** The dimension of the mount is measured in Solidworks and put to the configuration file in the [RealSense interface package](https://github.com/ai4ce/realsense_ROS2_interface) and the [GelSight tactile sensor interface package](https://github.com/ai4ce/gelsight_ROS2_interface), so that we can accurately acquire the pose of camera and the sensor in the world coordinate by adding offsets to the EEF's coordinate.
- Therefore, if you modify the parts' dimension, please update the configuration in the ROS2 packages accordingly. Specifically, the `realsense_ROS2_interface/realsense_capture/config/calibration.yaml` and `gelsight_ROS2_interface/gelsight_capture/config/gsmini.yaml`.
- **Important:** The dimension of the mount is measured in Solidworks and put to the configuration file in the [RealSense interface package](https://github.com/ai4ce/realsense_ROS2_interface) and the [GelSight tactile sensor interface package](https://github.com/ai4ce/gelsight_ROS2_interface) so that we can accurately acquire the pose of camera and the sensor in the world coordinate by adding offsets to the EEF's coordinate.
    - Therefore, if you modify the parts' dimensions, please update the configuration in the ROS2 packages accordingly. Specifically, the `realsense_ROS2_interface/realsense_capture/config/calibration.yaml` and `gelsight_ROS2_interface/gelsight_capture/config/gsmini.yaml`.

## Object Mounting Platform
- The `.stl` file for the mounting platform that connect the object to the tripod can be found at:
- `/assets/3d_printing/tripod_mount/Tripod_Plate_180MM_V2.STL`
- `/assets/3d_printing/tripod_mount/Tripod_Plate_180MM_V2_LID.STL`
- The `Tripod_Plate_180MM_V2.STL` can be inserted into the groove of the Arca-Swiss plate as we mentioned in the Appendix of the Arxiv paper. The `LID` then connect to the former so object can be fastened on this platform.
- The `.stl` file for the mounting platform that connects the object to the tripod can be found at:
    - `/assets/3d_printing/tripod_mount/Tripod_Plate_180MM_V2.STL`
    - `/assets/3d_printing/tripod_mount/Tripod_Plate_180MM_V2_LID.STL`
- The `Tripod_Plate_180MM_V2.STL` can be inserted into the groove of the Arca-Swiss plate as we mentioned in the Appendix of the Arxiv paper. The `LID` then connects to the former so the object can be fastened on this platform.
10 changes: 5 additions & 5 deletions instructions/install_robotics.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@

## ROS 2
1. Install ROS2 Humble according to the [official instruction](https://docs.ros.org/en/humble/Installation.html).
- Note that while this project is developed under Humble, we do not explicitly use any Humble-specific feature, so other distro should work in principle.
    - Note that while this project is developed under Humble, we do not explicitly use any Humble-specific feature, so other distro should work in principle.

## RealSense D405 Depth Camera
2. Install the [RealSense depth camera interface package](https://github.com/ai4ce/realsense_ROS2_interface). This is a custom ROS2 package built upon Intel's official ROS2 wrapper.

## GelSight Mini Tactile Sensor
3. Install the [GelSight tactile sensor interface package](https://github.com/ai4ce/gelsight_ROS2_interface).
- **Unfortunately**, this package is built upon a codebase that has not been open-source. We will update the link when the dependency is fully-open within a few weeks. Stay tuned!
- Note that this is not the same as the official GelSight implementation. We made some tweaks and (hopefully) improvement, so it's strongly encouraged that you use our own package.
    - **Unfortunately**, this package is built upon a codebase that has not been open-source. We will update the link within a few weeks when the dependency is fully open. Stay tuned!
    - Note that this is not the same as the official GelSight implementation. We made some tweaks and (hopefully) improvements, so you are strongly encouraged to use our own package.

**Note:** See [3D Printing Instructions](3d_printing.md) for some caveats on the dimension of the camera/sensor mount and the world-frame coordinates of the camera and the tactile sensor.

## Robot Servoing and Teleoperation.
4. Install the [Ufactory xArm6 servoing and teleoperation package](https://github.com/ai4ce/xarm_ros2). This is a custom ROS2 package built upon the official UFactory ROS2 packages.
- We also have a [UR10e equivalent](https://github.com/ai4ce/ur_ros2) available.
- If you are using a different robot, while we may not have a ROS2 package readily available, as long as your robot works with MoveIt 2, you should be able to adapt my code fairly easily.
    - We also have a [UR10e equivalent](https://github.com/ai4ce/ur_ros2) available.
    - If you are using a different robot, while we may not have a ROS2 package readily available, as long as your robot works with MoveIt 2, you should be able to adapt my code fairly easily.

0 comments on commit ac67518

Please sign in to comment.