Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
230 commits
Select commit Hold shift + click to select a range
a1feab0
import draft
pwais Mar 17, 2020
38ef92d
bugfixes and 10x faster rgbd debug drawing
pwais Oct 21, 2020
d2cbbaf
10x faster rv plot
pwais Oct 21, 2020
57d4e31
save
pwais Oct 22, 2020
de5639d
half space plotting debug
pwais Oct 22, 2020
8579497
integrate better faster rv and bev
pwais Oct 23, 2020
5515d07
save
pwais Oct 23, 2020
5b0be16
save
pwais Oct 24, 2020
cf524ab
screwed up wat
pwais Oct 25, 2020
dd95e31
save
pwais Oct 25, 2020
c5dc811
save
pwais Oct 28, 2020
eab0ba2
save
pwais Oct 28, 2020
3db1ccf
save
pwais Oct 29, 2020
5f492c8
save
pwais Oct 29, 2020
f3e6ee6
modernize nusc spark stuff
pwais Oct 30, 2020
41a3c2f
save
pwais Oct 31, 2020
8e5f1d9
save
pwais Oct 31, 2020
7f1f130
save
pwais Nov 1, 2020
bce7d07
fixed
pwais Nov 1, 2020
8a4925a
fixed
pwais Nov 1, 2020
4d807a3
fixed
pwais Nov 1, 2020
0d55df1
save
pwais Nov 2, 2020
dfb36b9
save
pwais Nov 2, 2020
72381f2
save
pwais Nov 3, 2020
fddf66e
save
pwais Nov 3, 2020
717ed58
save
pwais Nov 3, 2020
1401dcd
save
pwais Nov 4, 2020
955bbdf
save
pwais Nov 4, 2020
7de2248
save
pwais Nov 4, 2020
d091a8e
save
pwais Nov 10, 2020
eea4ac4
save
pwais Nov 10, 2020
8da322d
kiti 360 timestamps
pwais Nov 11, 2020
4b53c62
lidarseg loading
pwais Nov 12, 2020
2a04990
bad bad bad
pwais Nov 20, 2020
ee6d726
bad bad bad
pwais Nov 22, 2020
126c34d
save
pwais Dec 11, 2020
0e7306c
save
pwais Dec 31, 2020
036eea0
save
pwais Jan 28, 2021
98d35b6
oflow draft
pwais Feb 2, 2021
458fb53
oflow draft
pwais Feb 2, 2021
e1d7345
oflow draft
pwais Feb 2, 2021
0cd9b96
oflow draft
pwais Feb 2, 2021
9f09c51
oflow draft
pwais Feb 3, 2021
49e9b4c
oflow draft
pwais Feb 3, 2021
6e51936
oflow draft
pwais Feb 3, 2021
d5d93e6
oflow draft
pwais Feb 4, 2021
0b14ea2
oflow draft
pwais Feb 4, 2021
4a12d9b
save
pwais Feb 6, 2021
bd22b72
svae
pwais Feb 6, 2021
3b22301
save
pwais Feb 11, 2021
1f86a1e
save
pwais Feb 11, 2021
be35e74
save
pwais Feb 11, 2021
bc6626d
save
pwais Feb 11, 2021
f3abd98
save
pwais Feb 12, 2021
fe43cca
save
pwais Feb 12, 2021
5507ae7
save
pwais Feb 13, 2021
7c34024
merged
pwais Feb 13, 2021
bc811f9
save
pwais Feb 13, 2021
09d43ec
save
pwais Feb 13, 2021
de236c5
save
pwais Feb 15, 2021
a95e1ca
save
pwais Feb 15, 2021
24ef458
save
pwais Feb 15, 2021
a0200fd
save
pwais Feb 15, 2021
518a43c
save
pwais Feb 15, 2021
5f4ee55
save
pwais Feb 18, 2021
270baa9
save
pwais Feb 19, 2021
8b5ec7f
save
pwais Feb 20, 2021
feb0373
save
pwais Feb 21, 2021
95f0118
save
pwais Feb 22, 2021
f70aa3f
save
pwais Feb 22, 2021
fd6550b
save
pwais Feb 22, 2021
36f0f52
save
pwais Feb 22, 2021
0bddead
save
pwais Feb 22, 2021
0ad03c9
save
pwais Feb 24, 2021
2806b47
save
pwais Feb 24, 2021
a3add4f
save
pwais Mar 9, 2021
c9875b7
save
pwais Mar 11, 2021
4347695
save
pwais Mar 12, 2021
4f30ce6
save
pwais Mar 12, 2021
acbc410
save
pwais Mar 12, 2021
a28da4b
save
pwais Mar 19, 2021
2373160
save
pwais Mar 22, 2021
5e76737
save
pwais Mar 22, 2021
94603d0
save
pwais Mar 25, 2021
cd30642
save
pwais Mar 25, 2021
5542fa8
save
pwais Mar 25, 2021
eb41bc7
save
pwais Mar 25, 2021
10b646d
save
pwais Mar 26, 2021
e7b96e7
save
pwais Mar 26, 2021
fd977cd
save
pwais Mar 26, 2021
3f59497
save
pwais Mar 27, 2021
cd7e557
save
pwais Mar 27, 2021
e6fda39
save
pwais Mar 27, 2021
f9b537a
save
pwais Mar 31, 2021
a38084b
save
pwais Apr 3, 2021
ac3f86c
save
pwais Apr 3, 2021
ce42d62
save
pwais Apr 3, 2021
976c9e6
save
pwais Apr 4, 2021
c5a7116
save
pwais Apr 6, 2021
39478b0
save
pwais Apr 7, 2021
999dc88
save
pwais Apr 7, 2021
cdb85d9
save
pwais Apr 8, 2021
e141ee1
save
pwais Apr 8, 2021
dd8fddf
save
pwais Apr 8, 2021
ed7decd
save
pwais Apr 8, 2021
09ebcb4
save
pwais Apr 9, 2021
f21858f
save
pwais Apr 9, 2021
8234764
save
pwais Apr 9, 2021
275a6ac
save
pwais Apr 9, 2021
ef2ca93
save
pwais Apr 9, 2021
2a4864f
save
pwais Apr 10, 2021
e6f2dec
save
pwais Apr 15, 2021
588bc78
save
pwais Apr 15, 2021
63afdbc
save
pwais Apr 15, 2021
c054071
save
pwais Apr 16, 2021
882c78b
save
pwais Apr 16, 2021
8b29a8d
save
pwais Apr 18, 2021
169cd6a
save
pwais Apr 18, 2021
be13b8c
save
pwais Apr 19, 2021
9e32c36
save
pwais Apr 22, 2021
a6ba367
save
pwais Apr 23, 2021
a1a38dc
save
pwais Apr 23, 2021
369dbd1
save
pwais Apr 23, 2021
7548440
saveush
pwais Apr 23, 2021
d69d905
saveush
pwais Apr 23, 2021
d24fac3
saveush
pwais Apr 23, 2021
92fb8b5
save
pwais Aug 4, 2021
2366244
save
pwais Aug 9, 2021
cec83dc
save
pwais Aug 21, 2021
fb61aed
save
pwais Aug 21, 2021
d83101d
save
pwais Aug 31, 2021
9cb0599
save
pwais Aug 31, 2021
63f588e
save
pwais Sep 5, 2021
157727c
save
pwais Oct 1, 2021
a283216
save
pwais Oct 1, 2021
619ae35
save
pwais Oct 16, 2021
49842cc
Merge branch 'v1' of github.com:pwais/psegs into v1
pwais Oct 16, 2021
9cd302c
save
pwais Nov 15, 2021
14fb016
save
pwais Nov 20, 2021
5357ff6
save
pwais Nov 20, 2021
999c5d5
save
pwais Nov 20, 2021
a7e26f4
save
pwais Nov 20, 2021
73a4047
save
pwais Nov 20, 2021
d8cdbc9
tests
pwais Nov 27, 2021
8f34364
save
pwais Dec 15, 2021
c23330a
save
pwais Jan 8, 2022
4795bbb
save
pwais Jan 8, 2022
7b36fef
blessed
pwais Jan 8, 2022
77e79d2
fix and re-bless
pwais Jan 9, 2022
c480277
save
pwais Jan 10, 2022
96b1c9d
save
pwais Jan 12, 2022
220cf38
render fixed up
pwais Jan 12, 2022
3dfd8f8
colmap and trimesh
pwais Jan 22, 2022
d1feac8
colmap export and viz works
pwais Jan 26, 2022
78e8aea
save
pwais Jan 27, 2022
9f6722c
colmap tast
pwais Jan 28, 2022
c5288dc
adhoc pixels
pwais Jan 28, 2022
7db7243
save
pwais Feb 4, 2022
11898ae
save
pwais Aug 6, 2022
1abfd0f
save
pwais Dec 27, 2022
d2ee533
save
pwais Dec 27, 2022
dded226
save
pwais Dec 30, 2022
9afca1c
save
pwais Dec 31, 2022
cee7591
save
pwais Jan 2, 2023
a46e268
save
pwais Jan 2, 2023
7285f8c
save
pwais Jan 2, 2023
b3da7be
save
pwais Jan 2, 2023
ecf56e8
save
pwais Jan 3, 2023
7eda52b
save
pwais Jan 3, 2023
785fe9a
save
pwais Jan 8, 2023
c739c4b
save
pwais Jan 16, 2023
32ae3fc
save
pwais Feb 5, 2023
bb7b623
save
pwais Feb 6, 2023
8094843
save
pwais Mar 1, 2023
0d72df5
Merge branch 'v1' of github.com:pwais/psegs into v1
pwais Mar 1, 2023
b232349
save
pwais Mar 11, 2023
7ba8a75
save
pwais Mar 12, 2023
0f0ce0e
get rid of mdv its defunt
pwais Mar 26, 2023
8e169a6
save
pwais Apr 16, 2023
6134851
save
pwais Apr 23, 2023
097b146
save
pwais Apr 23, 2023
8c9c1ab
save
pwais May 8, 2023
bead4c9
save
pwais Jun 4, 2023
29dea91
save
pwais Oct 12, 2023
77d2025
save
pwais Oct 12, 2023
954768c
save
pwais Oct 26, 2023
9b06480
save
pwais Oct 27, 2023
904e6d6
save
pwais Oct 27, 2023
aacbe8e
save
pwais Oct 28, 2023
d1b60c2
save
pwais Oct 29, 2023
54936d9
save
pwais Oct 29, 2023
3b347e8
save
pwais Oct 29, 2023
c6155c1
save
pwais Oct 30, 2023
6ec2c92
fixed
pwais Oct 31, 2023
4d283ca
save
pwais Nov 6, 2023
2ac55c3
save
pwais Nov 7, 2023
471886b
and tested
pwais Nov 9, 2023
acbdc5d
fixes
pwais Nov 10, 2023
9b3f1eb
fixes
pwais Nov 10, 2023
3431e2a
save
pwais Nov 11, 2023
e8c3c16
fixes
pwais Nov 11, 2023
1b4a2d6
opencv always a pita
pwais Nov 12, 2023
9a06255
save
pwais Nov 14, 2023
a730007
save
pwais Nov 15, 2023
d53705e
svae
pwais Nov 16, 2023
55277a9
svae
pwais Nov 17, 2023
906ff83
svae
pwais Nov 17, 2023
478bbe5
svae
pwais Nov 18, 2023
f54c2c8
svae
pwais Nov 18, 2023
615eea9
save
pwais Nov 19, 2023
334a5fe
save
pwais Nov 20, 2023
c5cfb84
save
pwais Nov 20, 2023
d3eb37d
save
pwais Nov 27, 2023
119ea2f
save
pwais Nov 30, 2023
15cd3f7
save
pwais Dec 2, 2023
41a49d6
save
pwais Dec 4, 2023
0ed80d7
save
pwais Dec 9, 2023
9d7d778
save
pwais Dec 30, 2023
684d646
save
pwais Dec 30, 2023
0a2dce0
save
pwais Jan 12, 2024
26f8749
save
pwais Jan 14, 2024
c9582e3
opencv is very segfaulty
pwais Jan 19, 2024
54bf81f
save
pwais Jan 23, 2024
5c05c29
save
pwais Jan 27, 2024
14b1f09
save
pwais Jan 27, 2024
3fe0932
save
pwais Jan 31, 2024
7ea6c78
save
pwais Feb 2, 2024
636403e
fixup
pwais Feb 16, 2024
5fc7ade
save
pwais Mar 14, 2024
4f6805c
fix union factory etc
pwais Mar 18, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
.git
*.egg-info
oarphpy.egg-info
*.pyc
*/**/__pycache__
.eggs
.pytest_cache
eggs
build
docs/build
ext_data
external_test_fixtures
notebooks/**/*
test_*
*.bag
dataroot
test_run_output

dataroot_costco
my_html_viz
trimeshtast*
colmap*
cv_charuco
history*
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
test/fixtures/test_DiskCachedFramesVideoSegmentFactory_create_factory_for_video.parquet filter=lfs diff=lfs merge=lfs -text
17 changes: 17 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
*.egg-info
*.pyc
*/**/__pycache__
.DS_Store
._.DS_Store
.eggs
.vscode
*/**/._*
eggs
build
dataroot
ext_data
external_test_fixtures
notebooks/.ipynb_checkpoints
notebooks/sparkmonitor_kernelextension.log
notebooks/pybullet_debug_out.mp4
psegs_test
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright 2020 Maintainers of PSegs
Copyright 2023 Maintainers of PSegs

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
118 changes: 117 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,118 @@
(Drafting)
# PSegs: Perception Segments Library

[![License: Apache 2.0](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)

# PSegs Extensions

notes about extensions and links to them

readme!

Things to finalize:
* Transforms: want some unit tests of chaining and demo of that
* frames: maybe | -> .
* maybe drop the timestamp member from cuboids, camera images, point clouds etc
* For a segment debug: fused painted cloud in plotly! sampeled to 100k pts obvi
* PointCloud: have column names for cloud (x, y, z, intensity, semantic [, instance])
* for nusc and mebbe others: should cloud labels be separate URIs?


frames:
* http://www.mech.sharif.ir/c/document_library/get_file?uuid=5a4bb247-1430-4e46-942c-d692dead831f&groupId=14040
* http://wiki.ros.org/tf/Overview/Transformations


* trailer:
* show a histogram with examples of distance / orientation with samples over ALL datasets
* show perf! show time to fetch frames using Spark + Parquet
* show a video of one camera with debug overlays. maybe one with delauny lidar too (!)
* show a frame HTML with 3d interface
* show new things: argo associated bikes, delauny lidar, occlusion tree
* supported datasets, how to get a blurb and **stats** on each of them. prolly render histo reports for each.
* data structures:
* StampedDatum
* Frame


cli
* install as part of pip install psegs
* dataset:
* stages:
- download (might be manual); download test fixtures
- place (symlinks or whatever)
- test (need way to check skipped tests)
- demo (show one segment)
- convert (all to sd table)





cd /tmp
pip3 install rosdep rospkg rosinstall_generator rosinstall wstool vcstools catkin_tools catkin_pkg

rosdep init
rosdep update
mkdir ros_catkin_ws
cd ros_catkin_ws
catkin config --init -DCMAKE_BUILD_TYPE=Release -DROS_PYTHON_VERSION=3 --blacklist rqt_rviz rviz_plugin_tutorials librviz_tutorial --install

rosinstall_generator desktop_full --rosdistro melodic --deps --tar > melodic-desktop-full.rosinstall
wstool init -j8 src melodic-desktop-full.rosinstall

export ROS_PYTHON_VERSION=3
pip3 install -U -f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-18.04 wxPython


#!/bin/bash
#Check whether root
if [ $(whoami) != root ]; then
echo You must be root or use sudo to install packages.
return
fi

#Call apt-get for each package
for pkg in "$@"
do
echo "Installing $pkg"
sudo apt-get -my install $pkg >> install.log
done


chmod +x install_skip

#./install_skip `rosdep check --from-paths src --ignore-src | grep python | sed -e "s/^apt\t//g" | sed -z "s/\n/ /g" | sed -e "s/python/python3/g"`

echo 'Etc/UTC' > /etc/timezone && \
ln -s /usr/share/zoneinfo/Etc/UTC /etc/localtime && \
apt-get update && apt-get install -q -y tzdata

apt-get install -y python3-psutil python3-catkin-pkg python3-empy python3-numpy python3-rospkg python3-yaml python3-pyqt5.qtwebkit python3-mock python3-rospkg python3-paramiko python3-cairo python3-pil python3-defusedxml python3-sip-dev python3-pyqt5.qtopengl python3-matplotlib python3-pyqt5 python3-pyqt5.qtsvg python3-sip-dev python3-pydot python3-pygraphviz python3-netifaces python3-yaml python3-opencv python3-catkin-pkg python3-rosdep python3-coverage python3-gnupg python3-lxml python3-mock python3-opengl python3-empy python3-nose

# apt-get install -y python3-wxtools

rosdep install --from-paths src --ignore-src -y --skip-keys="`rosdep check --from-paths src --ignore-src | grep python | sed -e "s/^apt\t//g" | sed -z "s/\n/ /g"`"
find . -type f -exec sed -i 's/\/usr\/bin\/env[ ]*python/\/usr\/bin\/env python3/g' {} +


cd src && git clone https://github.com/RobotWebTools/rosbridge_suite && git clone https://github.com/GT-RAIL/rosauth && cd -

# https://github.com/RobotWebTools/rosbridge_suite/blob/ad63eb1f7a05d8d52470ac1364b033c74683bbbf/rosbridge_server/package.xml#L18
apt-get install -y \
python3-twisted python3-autobahn python-backports.ssl-match-hostname python3-tornado python3-bson

catkin build




#############################
# NOPE NOPE
cd /tmp
apt-get install -y lsb-release
sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
curl -sSL 'http://keyserver.ubuntu.com/pks/lookup?op=get&search=0xC1CF6E31E6BADE8868B172B4F42ED6FBAB17C654' | sudo apt-key add -
apt-get update
apt-get install -y ros-melodic-rosbridge-server

roslaunch rosbridge_server rosbridge_websocket.launch
125 changes: 125 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
# Copyright 2023 Maintainers of PSegs

# syntax=docker/dockerfile:1
FROM oarphpy/full:0.1.1

## Include banner
COPY docker/bashrc /etc/bash.bashrc
RUN chmod a+rwx /etc/bash.bashrc

RUN \
--mount=type=cache,target=/var/cache/apt \
--mount=type=cache,target=/root/.cache/pip \
apt-get update && \
apt-get install -y \
git \
wget \
&& \
pip3 install --upgrade pip

# # Pytorch3d
# RUN \
# pip3 install torch==1.9.0+cu111 torchvision==0.9.2+cu111 torchaudio==0.8.2 && \
# pip3 install pytorch3d==0.6.0 -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/py38_cu111_pyt190/download.html

# # open3d
# RUN apt-get install ffmpeg libsm6 libxext6 libc++-dev sudo git -y
# RUN apt-get install -y build-essential cmake ccache
# RUN cd /opt && \
# git clone https://github.com/isl-org/Open3D.git && \
# cd Open3D && \
# ./util/install_deps_ubuntu.sh assume-yes && \
# mkdir -p build && cd build && \
# cmake \
# -DBUILD_CUDA_MODULE=1 \
# -DBUILD_COMMON_CUDA_ARCHS=1 \
# -DENABLE_HEADLESS_RENDERING=1 \
# -DBUILD_WEBRTC=1 \
# -DCMAKE_BUILD_TYPE=Release \
# .. && \
# make -j $(nproc)

# # RUN pip3 install open3d==0.13.0
# # RUN \
# # ln -s \
# # /usr/local/cuda-11.1/targets/x86_64-linux/lib/libcusolver.so.11 \
# # $(python3 -c "import open3d as x; print(x.__path__[0])")/cuda/libcusolver.so.10

# # ENV LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:/usr/local/cuda-11.1/targets/x86_64-linux/lib/
# RUN python3 -c ''

# PSegs extras
RUN \
--mount=type=cache,target=/var/cache/apt \
apt-get update && \
apt-get install -y \
ffmpeg

# pycolmap and pycolmap: TODO use a wheel
## COLMAP
RUN \
--mount=type=cache,target=/var/cache/apt \
apt-get update && \
apt-get install -y \
git \
cmake \
ninja-build \
build-essential \
libboost-program-options-dev \
libboost-filesystem-dev \
libboost-graph-dev \
libboost-system-dev \
libboost-test-dev \
libeigen3-dev \
libflann-dev \
libfreeimage-dev \
libopencv-dev \
libmetis-dev \
libgoogle-glog-dev \
libgflags-dev \
libsqlite3-dev \
libglew-dev \
qtbase5-dev \
libqt5opengl5-dev \
libcgal-dev \
libceres-dev
RUN \
cd /opt && \
(git clone --depth 1 --branch 3.8 https://github.com/colmap/colmap || true) && \
cd colmap && \
mkdir -p build && cd build && \
cmake .. -GNinja -DCUDA_ENABLED=OFF && \
ninja && \
ninja install && \
colmap -h
RUN \
--mount=type=cache,target=/root/.cache/pip \
cd /opt && \
git clone --recursive https://github.com/colmap/pycolmap.git && \
cd pycolmap && \
git checkout 401f82658cdad1e8b657c77381863f9e261c7c3c && \
echo "Hack: build with debug symbols else segfaults on list comps python 3.10" && \
sed -i -e "s/cfg = 'Debug'/cfg = 'RelWithDebInfo' # /g" setup.py && \
pip3 install -v -e .

# FIXME when upgrading base image
RUN \
--mount=type=cache,target=/root/.cache/pip \
sudo apt remove -y python3-blinker && \
pip3 install "blinker>=1.7.0"

COPY requirements.txt /tmp/requirements.txt
RUN \
--mount=type=cache,target=/root/.cache/pip \
pip3 install -r /tmp/requirements.txt && \
rm /tmp/requirements.txt

# RUN \
# --mount=type=cache,target=/root/.cache/pip \
# pip3 install \
# "opencv-contrib-python>=4.5.5.62"

RUN mkdir -p /opt/psegs
COPY . /opt/psegs
WORKDIR /opt/psegs
ENV PYTHONPATH $PYTHONPATH:/opt/psegs
Loading