Giter VIP home page Giter VIP logo

eds-buildconf's Introduction

Build Status

EDS: Event-aided Direct Sparse Odometry

Direct Sparse Odometry

This is the code for the paper Event-aided Direct Sparse Odometry (CVPR 2022 oral) by
Javier Hidalgo-Carrió, Guillermo Callego, and Davide Scaramuzza.

If you use this work in your research, please cite it as follows:

@@InProceedings{Hidalgo2022cvpr,
  author = {Javier Hidalgo-Carri{\'{o}} and Guillermo Gallego and Davide Scaramuzza},
  title = {Event-aided Direct Sparse odometry},
  booktitle = {IEEE Conference on Computer Vision and Pattern Recognition (CVPR)},
  year = {2022}
}

Project Page and Dataset

General Page: https://rpg.ifi.uzh.ch/eds.html

EDS Dataset and Calibration Details

Beamsplitter Design

License

This source code is GPLv3 license. See the LICENSE file for further details.

Installation

  1. Make sure that the Ruby interpreter is installed on your machine. Rock requires ruby 2.3 or higher, which is provided on Debian and Ubuntu by the ruby2.3 package. This installation process is tested with Ruby 2.7 on Ubuntu 20.04.
docker@javi$ ruby --version
ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x86_64-linux-gnu]
docker@javi$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 20.04.4 LTS
Release:	20.04
Codename:	focal
  1. Create and “cd” into the directory in which you want to install the toolchain.
docker@javiS mkdir rock && cd rock && mkdir dev && cd dev
docker@dev$ pwd
/home/javi/rock/dev
  1. To build EDS, use this bootstrap.sh script. Save it in the folder you just created.
docker@dev:$ wget https://raw.githubusercontent.com/uzh-rpg/eds-buildconf/master/bootstrap.sh
  1. In a console run
docker@dev:$ sh bootstrap.sh
  1. Follow the installation guide and answer the questions. In case you hesitate choose the answer by default.
Connecting to www.rock-robotics.org (www.rock-robotics.org)|185.199.111.153|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 30078 (29K) [application/octet-stream]
Saving to: 'autoproj_bootstrap'

autoproj_bootstrap       100%[=================================>]  29.37K  --.-KB/s    in 0.007s  

2022-04-13 15:58:06 (3.97 MB/s) - 'autoproj_bootstrap' saved [30078/30078]

Which protocol do you want to use to access uzh-rpg/eds-buildconf.git on github.com?
[git|ssh|http] (default: http) 


So, what do you want ? (all, none or a comma-separated list of: os gem pip) [all] 
Would you like autoproj to keep apt packages up-to-date? [yes] 

The current directory is not empty, continue bootstrapping anyway ? [yes] 


How should I interact with github.com (git, http, ssh)
If you give one value, it's going to be the method used for all access
If you give multiple values, comma-separated, the first one will be
used for pulling and the second one for pushing. An optional third value
will be used to pull from private repositories (the same than pushing is
used by default) [http,ssh]

Which flavor of Rock do you want to use ?
Stay with the default ('master') if you want to use Rock on the most recent
distributions (Ubuntu 16.04 and later). Use 'stable' only for 
now officially unsupported distributions (Ubuntu 14.04) [master]
  1. Answer here 'yes' in case you want to activate python. You need a python installation in your system for this.
Do you want to activate python? [no] yes
Select the path to the python executable [/usr/bin/python3] 
  1. Select 'master' in case you want to build EDS with DSO backend or type 'ceres' otherwise
Which flavor of EDS do you want to use ?
Stay with the default ('master') if you want to use EDS with DSO backend
otherwise select ('ceres') [master] 
  1. Choose the answers by default in the questions regarding RTT/Orocos. Select 'gnulinux' for Linux based systems
Do you need compatibility with OCL ? (yes or no)
New Rock users that don't need backward compatibility with legacy Orocos components
probably want to say 'no'. Otherwise, say 'yes'.
Saying 'yes' will significantly impact compilation time and the size of the resulting binaries
Please answer 'yes' or 'no' [no]

the target operating system for Orocos/RTT (gnulinux, xenomai, or macosx) [gnulinux] 
  1. In case no problems occurred the installation shoudl finish "successfully"
updated environment
Command finished successfully at 2022-04-13 16:47:58 +0200 (took 44 mins 20 secs)
  1. Don't forget to source the environmental variables
docker@dev:$ source env.sh

Dockerfile and Image

All the steps described in the Installation are also written in a Dockerfile. Run the following command line to build the EDS docker image

wget https://raw.githubusercontent.com/uzh-rpg/eds-buildconf/master/Dockerfile 
docker build -t <image_name> -f Dockerfile .

There is also a built docker image in here, that you can just download and run your docker container with EDS installed. You might pull the latest EDS docker image

docker pull jhidalgocarrio/eds:20.04

Execution

All the executing scripts are in bundles/eds directory of your installation.

docker@javi $ cd rock/dev
docker@dev $ source env.sh
docker@dev $ cd bundles/eds

Download one dataset in log format, for example the atrium dataset:

docker:eds (master) $ wget https://download.ifi.uzh.ch/rpg/eds/atrium/atrium.log -O /tmp/atrium.log

Run the run_eds_log.rb script in one terminal

docker@eds (master) $ ruby scripts/slam/eds/run_eds_logs.rb --dataset=atrium --log_type=davis /tmp/atrium.log

Open another terminal and visualize the progress with the eds_visualizaton.rb script.

docker@javi $ cd rock/dev
docker@dev $ source env.sh
docker@dev $ cd bundles/eds
docker@eds (master) $ ruby scripts/gui/eds_visualization.rb 

It does not matter the order you run the scripts, visualization or running. The visualization will always wait until the running gives data. You should see something like this:

EDS

Log Files and Conversion to Rosbag

The log files are created in the /tmp folder by default (You can change the folder here). The log files are named in a folder as /tmp/date, e.g.: /tmp/20220401-1015 EDS is not real time. You can convert the log file to the correct time by running the following command in your log folder

docker@javi $ cd rock/dev
docker@dev $ source env.sh
docker@dev $ cd /tmp/20220401-1015
docker@20220401-1015 $ rock-convert --use_sample-time eds.0.log 

The resulting eds.0.log file should be in the newly created updated folder in /tmp/20220401-1015. You can replay the log files and visualize the results with eds_visualization.rb by doing

docker@javi $ cd rock/dev
docker@dev $ source env.sh
docker@dev $ cd bundles/eds
docker@eds (master) $ ruby scripts/gui/eds_visualization.rb --log /tmp/20220401-1015/updated/eds.0.log 

Pocolog files (i.e.: eds.0.log) conversion to Rosbag is possible by running the pocolog2rosbag.py. It is explained in the e2calib repository.

Troubleshooting

In case you see CORBA related errors when runing the run_eds_log.rb. Restart the omniorb deamon

docker@dev $ sudo /etc/init.d/omniorb4-nameserver stop
docker@dev $ sudo rm -f /var/lib/omniorb/*
docker@dev $ sudo /etc/init.d/omniorb4-nameserver start

The Event-to-Image Tracker: Source Code

EDS source code is structure as follows:

  • buildconf: is this reposity where the bootstrapping mechanism to install EDS is located.
  • bundles/eds: this is the bundles. Bundles are collections of all files needed to run a particular system. Those are configuration files, calibration files and script files for executing the binaries.
  • slam/eds: this is the EDS C++ library.
  • slam/orogen/eds: this is the Task that builds a class with all the system's functionalities.

EDS combines Events with classical frame-based direct methods. You can have a look at this zip file, in case you are already familiar with direct methods and you just want to see the core part of the event-based tracker implemented in EDS. The code in the zip file contains comments to the equations in the paper.

RPG Beamsplitter Design

Describing the mechanical and electronic setup for combined Event Camera and RGB Camera with simultaneous trigger

Beamsplitter Design

Cameras:

Mirror:

IR Filter (optional)

  • IR filter is requiered is you are using an extrenal infrarred tracking system such as Vicon or OptiTrack.

Case Design:

  • The RPG beamsplitter is 3D printer using PLA material for the case and PolyFlex for the camera adaptor rings. You can download the STL or Solidworks.

Acknowledgements

The Authors would like to thank Simon Klenk from TUM for the nice discussions about the potential of direct methods. We also thank our collaboration with Prophesee and Huawei.

Additional Resources on Event Cameras

eds-buildconf's People

Contributors

2maz avatar doudou avatar goldhoorn avatar guillermogb avatar jakobs avatar jhidalgocarrio avatar maltewi avatar marc-hildebrandt avatar planthaber avatar saarnold avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

eds-buildconf's Issues

timestamp convention and coordinate frame?

Thanks for the great work!

  1. Timestamps: Do you still need to apply timeshift_cam_imu: -0.005475324106170151 and timeshift_cam_imu: 0.0016611976654922291 to the timestamps of RGB and event camera timestamps? Are the MotionCapture-poses in IMU time (or in event time? or in RGB time?)?

  2. Poses: Are the poses in the rgb frame, in the event frame or in the imu frame?

How to run EDS with stereo davis dataset

How can I run EDS with stereo davis dataset which is used in this paper? (bin, boxes, desk, monitor)
The sequences are provided as rosbag files, but EDS should run dataset with pocolog format.
Thank you for this great work.

running sample corba corba naming service error

Thanks for the great work!

I'm having trouble running the provided example.

after doing:
source env.sh cd bundles/eds ruby scripts/slam/eds/run_eds_logs.rb --dataset=atrium --log_type=davis /tmp/atrium.log
I'm getting this error:
image

Can anyone have a look and see what I'm missing?

Thanks in advance!

rosbag to pocolog OR running EDS directly with rosbags

Hi guys,
Thanks a lot for sharing this impressive work!
I see in the project webpage (https://rpg.ifi.uzh.ch/eds.html) that you offer to download the rosbags. Is there anyway to run EDS with rosbags? I might have missed it, but I haven't found any equivalent to "run_eds_logs.rb" that will allow us to run rosbags.
If the answer is "no", then...is there any way to convert from rosbag to pocolog to run it? I've see the opposite tool (pocolog2rosbag.py)

Thanks

Event Camera Biases

I would like to ask whether do you still recall what biases you used for the Prophesee PPS3MVCD event camera in the recordings? I would really appreciate if you could share the biases / bias file. Thanks!

About Calculating Flow

It seems that the front-end optimization process is not used Δt as described in the paper. Is the vx in the variable corresponding to the camera speed in the paper, or is the camera speed multiplied by the time difference (time difference between event frames and key frames)?

Vizkit[ERROR]:Cannot load Vizkit3D plugin

Hello, thank you for this great work! But I was stuck with the following problem.
When I run ruby scripts/gui/eds_visualization.rb , error occurs:

(base) huoyu@huoyuWP:~/local/installpackage/rock_3/dev/bundles/eds$ ruby scripts/gui/eds_visualization.rb 
Typelib[WARN]: WARN: integrating typelib plugin using the TYPELIB_RUBY_PLUGIN_PATH environment
Typelib[WARN]: WARN: variable is deprecated. Just put a file called typelib_plugin.rb into a
Typelib[WARN]: WARN: subfolder from the RUBYLIB (e.g. base/typelib_plugin.rb)
Typelib[WARN]: WARN: Offending file: /home/huoyu/local/installpackage/rock_3/dev/install/share/typelib/ruby/base_types.rb
/home/huoyu/local/installpackage/rock_3/dev/tools/utilrb/lib/utilrb/pkgconfig.rb:628: warning: Insecure world writable dir /home/huoyu/local/installpackage/rock_3/dev/tools/log_tools/bin in PATH, mode 040777
Bundles[INFO]: Active bundles: eds, rock
orocos.rb[WARN]: ignoring configuration file /home/huoyu/local/installpackage/rock_3/dev/bundles/eds/config/orogen/apriltags::Task.yml as there are no corresponding task model
orocos.rb[WARN]: ignoring configuration file /home/huoyu/local/installpackage/rock_3/dev/bundles/eds/config/orogen/midas::Task.yml as there are no corresponding task model
Bundles[INFO]: log files are going in /tmp/20221013-1643
Vizkit[ERROR]: Cannot load Vizkit3D pluign /home/huoyu/local/installpackage/rock_3/dev/install/lib/libbase-viz.so. Library seems to be incompatible to the qt loader. Have you created a plugin factory?
Traceback (most recent call last):
	6: from scripts/gui/eds_visualization.rb:81:in `<main>'
	5: from /home/huoyu/local/installpackage/rock_3/dev/gui/vizkit/lib/vizkit/plugin_accessor.rb:40:in `block in add_plugin_spec'
	4: from /home/huoyu/local/installpackage/rock_3/dev/gui/vizkit/lib/vizkit/uiloader.rb:341:in `create_plugin'
	3: from /home/huoyu/local/installpackage/rock_3/dev/gui/vizkit/lib/vizkit/plugin.rb:549:in `create_plugin'
	2: from /home/huoyu/local/installpackage/rock_3/dev/gui/vizkit/lib/vizkit/uiloader.rb:46:in `block in register_3d_plugin'
	1: from /home/huoyu/local/installpackage/rock_3/dev/gui/vizkit/lib/vizkit/cplusplus_extensions/vizkit_widget.rb:241:in `createPlugin'
/home/huoyu/local/installpackage/rock_3/dev/gui/vizkit/lib/vizkit/cplusplus_extensions/vizkit_widget.rb:156:in `load_plugin': Cannot load /home/huoyu/local/installpackage/rock_3/dev/install/lib/libbase-viz.so. Last error is: The plugin '/home/huoyu/local/installpackage/rock_3/dev/install/lib/libbase-viz.so' uses incompatible Qt library. Expected build key "x86_64 linux g++-7 full-config", got "x86_64 linux g++-4 full-config" (RuntimeError)

I'm not sure if the error of incompatibility is relevant with the warnings above. It seems that the error is due to the build key. I've searched for qconfig.h where the QT_BUILD_KEY is defined. And I find it appears in different files.

In /usr/include/qt4/QtCore/qconfig.h:

#define QT_BUILD_KEY "x86_64 linux g++-4 full-config"
#define QT_BUILD_KEY_COMPAT "x86_64 Linux g++-4 full-config"

In /usr/local/Trolltech/Qt-4.8.6/include/QtCore/qconfig.h:

#define QT_BUILD_KEY "x86_64 linux g++-7 full-config"
#define QT_BUILD_KEY_COMPAT "x86_64 Linux g++-7 full-config"

I'm not sure how the first one qconfig.h(/usr/include/qt4/QtCore/qconfig.h) was constructed, but I recognize the second one was built manually outside the autoproj. I guess it chooses the first one, so I've tried to modify the #define QT_BUILD_KEY"x86_64 linux g++-4 full-config" to #define QT_BUILD_KEY"x86_64 linux g++-7 full-config" , and so to the QT_BUILD_KEY_COMPAT, but error is still the same. Is there anything I've missed?

I'm not so familiar with setting up environment. And it sticks with me for quite a long time. It would be grateful if anyone could help me out.

Task configure error

Hello, thank you for your project.
However, when I run run_eds_logs.rb, the following error is displayed:
image
How can I check the causes of local errors? Looking forward to your help.

Cannot run the log file.

Hi @jhidalgocarrio ,
I'm having trouble in running the log file, when i follow the command rock-convert --use_sample-time eds.0.log and go back to bundles/eds then run the ruby scripts/gui/eds_visualization.rb --log /tmp/20240726-1942/updated/eds.0.log
i can't replay the log file, only see the empty window (Optical flow ... etc)
and the command window shows:

Resource id: 0x3600027
X Error: BadShmSeg (invalid shared segment parameter) 128
Extension: 130 (MIT-SHM)
Minor opcode: 3 (X_ShmPutImage)
Resource id: 0x3600027
X Error: BadShmSeg (invalid shared segment parameter) 128
Extension: 130 (MIT-SHM)
Minor opcode: 3 (X_ShmPutImage)
Resource id: 0x3600027
X Error: BadShmSeg (invalid shared segment parameter) 128
Extension: 130 (MIT-SHM)
Minor opcode: 3 (X_ShmPutImage)
Resource id: 0x3600027

Seems like the log file is empty? Can you please help? thanks you.

Orocos Load Error

I followed the "Execution" steps and if fails when running the following:
javi@b46bcf1cc0d6:~/rock/dev/bundles/eds$ ruby scripts/slam/eds/run_eds_logs.rb --dataset=atrium --log_type=davis /tmp/atrium.log
Traceback (most recent call last):
2: from scripts/slam/eds/run_eds_logs.rb:3:in <main>' 1: from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in require'
/usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require': cannot load such file -- orocos (LoadError)

rb: cannot connect to X server

Great work! But when I am trying to run the docker image in my docker, there is an error:

rb: cannot connect to X server

I'm following your execution steps, and the error occurs when I run: run_eds_log.rb
Any suggestions will help, Thank you!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.