Warning! Docker Desktop not recommended, you will run into issues running GUI apps in container and visualizing on host.
- Ensure Docker Engine (CLI version) is installed.
- ROS Noetic Base: osrf/ros:noetic-desktop-full (Ubuntu 20.04).
- Preinstalled Dependencies: ROS libraries, OpenCV, Eigen, PCL, Ceres, and Python tools.
- Non-root User: devuser
- Livox SDK
- Sophus (Patched): Applies a custom patch and builds the non-templated/double-only version for rpg_vikit.
On your host machine, clone the repository and navigate to the project directory:
git clone https://github.com/JianwenCao/3DVisionProject.git
cd 3DVisionProject/Move your downloaded .bag files into the following directory on your host machine:
~/dataset_fastlivo2/Note: This folder will be mounted and accessible inside the container.
- Reopen
3DVisionProject/in DevContainer. Select With GPU or No GPU. If this is a new, unbuilt container, thedevcontainer.json + Dockerfilepair will be built.
Then, initialize catkin:
catkin initcatkin buildLaunch
# Terminal 1
roscore
# Terminal 2
. devel/setup.bash
roslaunch fast_livo mapping_avia.launch
# Terminal 3
rosbag play ~/dataset_fastlivo2/YOUR_FILE.bag- Build
HISLAM2 With GPUdevcontainer - Postcreatecommand runs
setup.pyautomatically, installing CUDA extensions.
Warning: the postcreatecommand takes a long time, if you "rebuild" container instead of "reopen", this long step will take a while.
Same as HI-SLAM2 instructions
act_hi2
cd src/HI-SLAM2
wget https://zenodo.org/records/10447888/files/omnidata_dpt_normal_v2.ckpt -P pretrained_models
wget https://zenodo.org/records/10447888/files/omnidata_dpt_depth_v2.ckpt -P pretrained_models
bash scripts/download_replica.sh
python scripts/preprocess_replica.pyRun demo:
python demo.py \
--imagedir data/Replica/room0/colors \
--calib calib/replica.txt \
--config config/replica_config.yaml \
--output outputs/room0 \
--gsvis \
--droidvisContainer publishes ROS message on localhost and forwards websocket to 9090 (example). HISLAM2BridgeClient listens to websocket, parses, and stores data in torch tensors.
# Terminal 1
roslaunch rosbridge_server rosbridge_websocket.launch port:=9090
# Terminal 2: Decode ROS msgs and sync sensor data. Optionally save to folder.
act_hi2
cd /catkin_ws/src/HI-SLAM2
python scripts/run_ros_conversions.py
[-h] [--mode {online,preprocess}] # Online for real-time pipeline, preprocess (save frames to folder)
[--ros-host ROS_HOST] # default 'localhost'
[--ros-port ROS_PORT] # default 9090
[--output-name OUTPUT_NAME] # folder NAME, data saved in Hi_SLAM2/data/<output-name>
[--log-level {DEBUG,INFO,WARNING,ERROR,CRITICAL}]
# Terminal 3:
rosbag play path/to/dataset.bagact_hi2
cd /catkin_ws/src/HI-SLAM2
python3 scripts/test_ros_conversions.py --mode {image, lidar, pose} --folder <folder name inside HI-SLAM2/data/>Note:
hislam_with_gpudevcontainer already has these pip dependencies installed when you activate the HI-SLAM2 conda env (act_hi2).
If you are not using this devcontainer, your env requires:
pip install torch-cluster transformersDownload dataset and put under dataset folder. Dataset link: https://drive.google.com/file/d/1RiNzMUvheI54GInM1f4_L-cEXfBJ7-VO/view?usp=share_link
cd /catkin_ws/src/3dgs
python3 demo.py # Requires following parameters-c: Path to the configuration file w.r.t cwd (e.g.,../../config/config_lidar.yaml).-n: Number of frames to process.-d: Path to the preprocessed dataset directory w.r.t cwd (e.g.../HI-SLAM2/data/CBD_Building_01)
python viz_gauss_normals.py \
--ply <path_to_ply_file> [--component {x,y,z}] [--hist] [--arrows]-
--ply PLY, -p PLY
Path to the Gaussian.plyfile (must includex,y,z, androt_0..rot_3fields). -
--component {x,y,z}, -c {x,y,z}
Specify which normal component (x,y, orz) to use for coloring. Defultz. -
--hist
Plot a histogram of the chosen normal component and exit. -
--arrows
Visualize arrows on some points (downsampled).
Example usage:
python viz_gauss_normals.py --ply output/rot_init_after_refine.ply --arrows