Skip to content

standalone and "ros-free" python wrapper of voxblox (online SDF generator from point clouds)

License

Notifications You must be signed in to change notification settings

HiroIshida/voxbloxpy

Repository files navigation

voxbloxpy CI pypi-version

voxblox is a ROS-based revolutionary project for online creation of signed distance field. This repository voxbloxpy provides the python-wrapper of the voxblox and some utils for volumetric rendering using plotly. This python package is standalone, that is, the package is ros-dependencies-free and can be installed from pypi.

The wrapper's core source code can be found in wrapper.cpp (lower-level) and python/voxbloxpy (higher-level) directory.

The following animation is created using point cloud collected by a robot rotating in our lab.

pr2_rotating_around_73b2room.mp4

This project is just a wrapper. So, please cite the paper (Oleynikova+, IROS 2017) for the original project when you use this in your research.

@inproceedings{oleynikova2017voxblox,
  author={Oleynikova, Helen and Taylor, Zachary and Fehr, Marius and Siegwart, Roland and  Nieto, Juan},
  booktitle={IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS)},
  title={Voxblox: Incremental 3D Euclidean Signed Distance Fields for On-Board MAV Planning},
  year={2017}
}

Usage

from voxbloxpy import EsdfMap, CameraPose

esdf = EsdfMap(0.02)  # voxel size in meter
camera_pose = CameraPose(pos, quat_wxyz)  # set camera pose wrt world
esdf.udpate(camera_pose, cloud_wrt_camera)  # able to update as many as you want with different camera-cloud pair
sd_values = esdf.get_sd_batch(pts_wrt_world)

installation

NOTE: ROS not required

Install from pypi

sudo apt-get install libgoogle-glog-dev
pip3 install voxbloxpy

Note: Dependency on libgoogle-glog-dev is kind of a pain, though it can be resolved by apt install. I'm planning to remove this dependency by building glog from source and build a static library.

Source build

git clone https://github.com/HiroIshida/voxbloxpy.git
cd voxbloxpy
git submodule update --init
sudo apt-get install libeigen3-dev libgtest-dev libgflags-dev libgoogle-glog-dev libprotobuf-dev protobuf-compiler
pip3 install -e .

Run demo (real dataset)

download dataset (pickled pointcloud and camera poses)

pip3 install gdown  # if not installed yet
cd example/dataset/
./download_dataset.sh

The dataset is created by the scan when PR2 robot is directing toward the fridge with the opened door.

Then run esdf creation demo

python3 example/real_data.py --visualize

The bottom left figure shows the rviz-image at the scan time, and the bottom right figure shows the output of the visualization.

Run demo playing rosbag (you need to have ROS)

cd example/ros
bash download_rosbag.sh
roscore  # run in different terminal
rosbag play pr2_jsk_73b2_movearound.bag # run in different terminal
python3 example_node.py

The sequence of figures and interactive html will be dumped in /example/ros/figs. See the mp4 video at the top of this README for the visualization of the result.

About

standalone and "ros-free" python wrapper of voxblox (online SDF generator from point clouds)

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages