Giter VIP home page Giter VIP logo

versavis's Introduction

VersaVIS -- An Open Versatile Multi-Camera Visual-Inertial Sensor Suite

Build Test

https://youtu.be/bsvSZJq76Mc

VersaVIS provides a complete, open-source hardware, firmware and software bundle to perform time synchronization of multiple cameras with an IMU featuring exposure compensation, host clock translation and independent and stereo camera triggering.

News

  • Enjoy our new trailer video explaining the main conecpt behind VersaVIS.
  • VersaVIS runs on Ubuntu 20.04 focal fossa / ROS Noetic now, look at this issue.

Supported camera drivers

Citing

Please cite the following paper when using VersaVIS for your research:

@article{Tschopp2020,
author = {Tschopp, Florian and Riner, Michael and Fehr, Marius and Bernreiter, Lukas and Furrer, Fadri and Novkovic, Tonci and Pfrunder, Andreas and Cadena, Cesar and Siegwart, Roland and Nieto, Juan},
doi = {10.3390/s20051439},
journal = {Sensors},
number = {5},
pages = {1439},
publisher = {Multidisciplinary Digital Publishing Institute},
title = {{VersaVIS—An Open Versatile Multi-Camera Visual-Inertial Sensor Suite}},
url = {https://www.mdpi.com/1424-8220/20/5/1439},
volume = {20},
year = {2020}
}

Additional information can be found here.

Install

Clone and build

cd ~/catkin_ws/src/
git clone [email protected]:ethz-asl/versavis.git --recursive
catkin build versavis
cd versavis/firmware
./setup.sh

Setup udev rule

Add yourself to dialout group

sudo adduser <username> dialout

Copy udev rule file to your system:

sudo cp firmware/98-versa-vis.rules /etc/udev/rules.d/98-versa-vis.rules

Afterwards, use the following commands to reload the rules

sudo udevadm control --reload-rules
sudo udevadm trigger
sudo ldconfig

Note: You might have to reboot your computer for this to take effect. You can check by see whether a /dev/versavis is available and pointing to the correct device.

Configure

Adapt the configuration file to your setup needs. Also check the datasheet for how to configure the hardware switches.

Flash firmware on the VersaVIS board

  • Install the arduino IDE from here. Use version 1.8.2!
    • Note that a small modification of the install script (install.sh) might be required. In particular you may need to change the line RESOURCE_NAME=cc.arduino.arduinoide to RESOURCE_NAME=arduino-arduinoide as per the issue here.
  • Open firmware/versavis/versavis.ino in the IDE
  • Go to File -> Preferences
  • Change Sketchbook location to versavis/firmware/
  • Install board support:
    • For AVI 2.1 (the green one): Tools -> Boards -> Boards Manager -> Arduino SAMD Boards (32-bits ARM Cortex-M0+) -> Use version 1.6.20!
    • For VersaVIS 1.0 (the black one): Check here
  • Set Tools -> Port -> tty/ACM0 (Arduino Zero), and Tools -> Board -> VersaVIS.
  • Compile using the Verify menu option
  • Flash using the Upload menu option

Calibration

Typically, a VI Setup needs to be carefully calibrated for camera intrinsics and camera-camera extrinsics and camera-imu extrinsics. Refer to Kalibr for a good calibration framework. Note: To enable a good calibration, a high-quality calibration target needs to be available. Furthermore, a good and uniform light source is needed in order to reduce motion blur, especially during camera-imu calibration.

Usage

  • Adapt versavis/launch/run_versavis.launch to your needs.
  • Run with
roslaunch versavis run_versavis.launch
  • Wait for successfull initialization.

Troubleshooting

My sensor is stuck at initialization

Main symptoms are:

  • No IMU message published.
  • Cameras are not triggered or only very slowly (e.g. 1 Hz).

Troubleshooting steps:

  • Check that your camera receives a triggering signal by checking the trigger LED (Note: As the trigger pulse is very short, look for a dim flicker.).
  • Check that all topics are correctly set up and connected.
  • If the USB3 blackfly is powered over the Hirose plug, there seems to be a longer delay (0.2s+) until the image arrives on the host computer. Initialization does not succeed because it only allows successful synchronization if the image message is not older than 0.1s compared to the time message coming from the triggering board. With power over USB things seem to work fine. One can increase the threshold kMaxImageDelayThreshold but keep in mind that kMaxImageDelayThreshold >> 1/f_init. Decrease initialization frequency f_init if necessairy.

The board is not doing what I expect / How can I enter debug mode

Easiest way to debug is to enable DEBUG mode in firmware/libraries/versavis/versavis_configuration.h and check the debug output using the Arduino Serial Monitor or screen /dev/versavis. Note: In debug mode, ROS/rosserial communication is deactivated!

I don't get any IMU messages on /versavis/imu

This is normal during initialization as no IMU messages are published. Check Inintialization issues for further info.

After uploading a new firmware, I am unable to communicate with the VersaVIS board

This is most likely due to an infinite loop in the code in an error case. Reset the board by double clicking the reset button and upload your code in DEBUG mode. Then check your debug output.

IMU shows strange data or spikes

To decrease the bandwidth between VersaVIS and host but keep all information, only the IMu raw data is transferred and later scaled. If there is a scale offset, adapt the scale/sensitivity parameters in your launch file.

Depending on the IMU, recursive data grabbing is implemented with a CRC or temperature check. If this fails multiple time, the latest message is used. Check your IMU if this persists.

It looks like my exposure time is not correctly compensated

Check whether your board can correctly detect your exposure time in the debug output. Troubleshooting steps:

  • Enable exposure/strobe output on your camera.
  • Check that all dip switches are set according to the datasheet.
  • Check that the exposure LED on the board flashes with exposure time.

I receive errors on the host computer

Time candidate overflow

[ WARN] [1619791310.834852014]: /versavis/camO/tmage_raw: Time candidates buffer overflow at 1025.
...

Means that the synchronizer receives more timestamps than images. Double check if the camera is actually triggering with every pulse it receives. A typical problem is when the exposure time is higher than the measurement period.

Image candidate overflow

[ WARN] [1619791310.834852014]: /versavis/camO/tmage_raw: Image candidates buffer overflow at 1025.
...

Means that the synchronizer receives more iamges than timestamps. Double check if the camera is actually triggering and not free running.

versavis's People

Contributors

alexmillane avatar floriantschopp avatar jaeyoung-lim avatar lbern avatar mfehr avatar rikba 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  avatar  avatar  avatar  avatar  avatar

Watchers

 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

versavis's Issues

Board Support

Minor Bug:

Additionally to the VersaVIS Board Support, I still had to install Arduino SAMD Boards for the compilation to succeed. Probably this can be fixed, or corrected in the instructions.

Timing issue with nh.now() offset

Hi @floriantschopp, I'm not sure if this project is still maintained but I would love some help debugging a timing issue.

I have multiple cameras and an IMU connected with versavis. All data streams have been verified and triggering is working perfectly. However, when the timestamps are retrieved with nh.now(), they get worse with time. For example, when Versavis starts running, the timestamp offset between the MCU and our host computer is 0. Afterwards, roughly every 30-40 seconds (measured with a stopwatch), the offset increments by 4294 seconds (measured with rostopic echo topic --offset).

Any idea of what is going on?

board support

thanks for your work. I want to build this borad to test lidar and camera sync. I find gerber file in versavis_hw,i give this file to manufacturer. They told me i should provide the BOM file. How can i get bom file?

[enhancement] Noetic / python3 support

I recently naively tried to get a versavis running under Noetic.
It turned out that the rosserial dependency of versavis in this bundle is not yet capable to handle python3.
However, in the meantime, rosserial should be able to cope with noetic/python3 thanks to this and this.
I tried to update the dependency with a newer version, but that did unfortunately not work out of the box...so I guess there might be a little bit (much?) more work involved. What is your guesstimate on that? Thx!

Board Support

This is a great job. I also want to build the same board to test the synchronization of lidar and IMU. Could you export the coordinate file for the SMT placement machine from Altium Designer? Need to perform a "Gernerates pick and place files" setting in Altium Designer.This will help me immensely. Thank you!

Board Support

This is a great job. I also want to build the same board to test the synchronization of lidar and camera. I find gerber file in versavis_hw,i give this file to manufacturer. They told me i should provide pick and place file. How can i get pick and place file?

Dont find ImuMikro.h

Hi,
I have tried to run the Versivis. I have done the steps so far, but when i verify, he gave me the error handle "versavis/ImuMicro.h: No such file or directory". So i checked the folder and can't find this header. Did i miss anything?

I use Ubunto 18.04 for that.

about IMU

Hello, @floriantschopp. Thank you for your open source work. I see that the PPT of VersaVIS shows that the trigger board can be compatible with Xsens. I will use Xsens and Basler to observe the synchronization effect of trigger board. May I ask you what suggestions are you can use Xsens on VersaVIS

generated 1hz trigger pulse is not stable

Hi, this question actually not directly to your project. If you have time, please check it.

Because my microstrain IMU only have PPS time sync option. I am using your project to generate 1Hz PPS, I use the code like camera does. I am using Arduino Zero and tried pin 16 and pin 13 as the output separately. I tried all the timer, they all have same issues.

The issue:
When I disable the actually trigger(like:Sensor::trigger(trigger_pin_, TRIGGER_PULSE_US*10000, type_)), the timer is stable interrupt every 1s. But when I enable the trigger to generate 100ms High and 900ms Low PPS. I record the time when the trigger is processed:

stamp:
secs: 1617982338
nsecs: 583847082

stamp:
secs: 1617982339
nsecs: 484847082

stamp:
secs: 1617982340
nsecs: 385847082

stamp:
secs: 1617982341
nsecs: 583608999

stamp:
secs: 1617982342
nsecs: 484608999

stamp:
secs: 1617982343
nsecs: 385608999

So the timer is seems like interrupt as 900ms, 900ms, 1200ms, 900ms, 900ms... It's definitely related to my generated plus which is about 100ms.

My questions: Is this normal performance? Timer is just not accuracy enough. Or I didn't implement the code right? Could you give me some suggestions. Thanks for your time.

Versavis seems to crash when using with ADIS16448AMLZ

Problem Description
Versavis seems to lose connection when running with the ADIS16448AMLZ IMU

Steps to Reproduce

  • Plugin the ADIS16448AMLZ IMU to the versavis board on SPI1
  • Plugin the FIR BlackFlyS to CAM_0 and set the dip switch to 3V3
    run the following command
roslaunch versavis run_versavis.launch

Log as the following

started roslaunch server http://jaeyoung-ThinkPad-T480:34997/

SUMMARY
========

PARAMETERS
 * /BFS_camera_manager/num_worker_threads: 4
 * /BFS_usb_0/camera_nodelet/acquisition_frame_rate_enable: False
 * /BFS_usb_0/camera_nodelet/acquisition_mode: Continuous
 * /BFS_usb_0/camera_nodelet/auto_exposure_time_lower_limit: 300
 * /BFS_usb_0/camera_nodelet/auto_exposure_time_upper_limit: 5000
 * /BFS_usb_0/camera_nodelet/auto_gain: Continuous
 * /BFS_usb_0/camera_nodelet/auto_white_balance: Continuous
 * /BFS_usb_0/camera_nodelet/enable_trigger: On
 * /BFS_usb_0/camera_nodelet/exposure_auto: Continuous
 * /BFS_usb_0/camera_nodelet/exposure_mode: Timed
 * /BFS_usb_0/camera_nodelet/frame_id: cam0
 * /BFS_usb_0/camera_nodelet/line_inverter: False
 * /BFS_usb_0/camera_nodelet/line_mode: Output
 * /BFS_usb_0/camera_nodelet/line_selector: Line2
 * /BFS_usb_0/camera_nodelet/line_source: ExposureActive
 * /BFS_usb_0/camera_nodelet/serial: 18575595
 * /BFS_usb_0/camera_nodelet/trigger_activation_mode: RisingEdge
 * /BFS_usb_0/camera_nodelet/trigger_source: Line0
 * /BFS_usb_0/compile_nodelet_cam0/driver_topic: /BFS_usb_0/image_...
 * /BFS_usb_0/compile_nodelet_cam0/imu_offset_us: 0
 * /BFS_usb_0/compile_nodelet_cam0/versavis_topic: /versavis/cam0/
 * /rosdistro: melodic
 * /rosversion: 1.14.10
 * /versavis_imu_receiver/imu_acceleration_covariance: 0.043864908
 * /versavis_imu_receiver/imu_accelerator_sensitivity: 0.000833
 * /versavis_imu_receiver/imu_gyro_covariance: 6e-9
 * /versavis_imu_receiver/imu_gyro_sensitivity: 0.04
 * /versavis_imu_receiver/imu_sub_topic: /versavis/imu_micro

NODES
  /
    BFS_camera_manager (nodelet/nodelet)
    relay0 (topic_tools/relay)
    resetter (rostopic/rostopic)
    rosserial_python (rosserial_python/serial_node.py)
    versavis_imu_receiver (versavis/versavis_imu_receiver)
  /BFS_usb_0/
    camera_nodelet (nodelet/nodelet)
    compile_nodelet_cam0 (nodelet/nodelet)

auto-starting new master
process[master]: started with pid [6362]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to c2447b08-9651-11eb-a116-002315d18521
process[rosout-1]: started with pid [6380]
started core service [/rosout]
process[BFS_camera_manager-2]: started with pid [6384]
process[BFS_usb_0/camera_nodelet-3]: started with pid [6388]
process[BFS_usb_0/compile_nodelet_cam0-4]: started with pid [6390]
process[relay0-5]: started with pid [6392]
[ INFO] [1617656347.016581675]: Initializing nodelet with 4 worker threads.
[ INFO] [1617656347.033562872]: Loading nodelet /BFS_usb_0/compile_nodelet_cam0 of type versavis/VersaVISSynchronizerNodelet to manager /BFS_camera_manager with the following remappings:
process[rosserial_python-6]: started with pid [6398]
[ INFO] [1617656347.055795615]: Versavis message compiler started. Version 1.0
[ INFO] [1617656347.055875956]: Read ROS parameters.
process[resetter-7]: started with pid [6414]
[ INFO] [1617656347.061453682]: IMU has a calibrated dalay of 0 us.
[ INFO] [1617656347.064707698]: Subscribing to /BFS_usb_0/image_numbered.
[ INFO] [1617656347.072515383]: Subscribing to /versavis/cam0/image_time.
[ INFO] [1617656347.076129950]: Publishing initialization status to /versavis/cam0/init.
process[versavis_imu_receiver-8]: started with pid [6416]
[ INFO] [1617656347.130865596]: Versavis IMU message reciever. Version 1.0
[ INFO] [1617656347.134407073]: Read ROS parameters.
[ INFO] [1617656347.307204289]: Publishing image to /versavis/cam0/image_raw.
[INFO] [1617656347.523487]: ROS Serial Python Node
[INFO] [1617656347.527039]: Connecting to /dev/versavis at 250000 baud
publishing and latching message for 3.0 seconds
[INFO] [1617656349.633758]: Requesting topics...
[INFO] [1617656349.922941]: Note: publish buffer size is 512 bytes
[INFO] [1617656349.926894]: Setup publisher on /versavis/imu_micro [versavis/ImuMicro]
[INFO] [1617656349.936089]: Setup publisher on /versavis/cam0/image_time [versavis/TimeNumbered]
[INFO] [1617656349.951349]: Note: subscribe buffer size is 512 bytes
[INFO] [1617656349.954603]: Setup subscriber on /versavis/reset [std_msgs/Bool]
[INFO] [1617656349.962829]: Setup subscriber on /versavis/cam0/init [std_msgs/Bool]
[resetter-7] process has finished cleanly
log file: /home/jaeyoung/.ros/log/c2447b08-9651-11eb-a116-002315d18521/resetter-7*.log
[WARN] [1617656350.920592]: Last read step: data checksum
[WARN] [1617656350.923768]: Run loop error: [Errno 5] Input/output error
Traceback (most recent call last):
  File "/home/jaeyoung/catkin_ws/src/versavis/dependencies/rosserial/rosserial_python/nodes/serial_node.py", line 89, in <module>
    client.run()
  File "/home/jaeyoung/catkin_ws/src/versavis/dependencies/rosserial/rosserial_python/src/rosserial_python/SerialClient.py", line 554, in run
    self.port.flushInput()
  File "/usr/local/lib/python2.7/dist-packages/serial/serialutil.py", line 588, in flushInput
    self.reset_input_buffer()
  File "/usr/local/lib/python2.7/dist-packages/serial/serialposix.py", line 683, in reset_input_buffer
    self._reset_input_buffer()
  File "/usr/local/lib/python2.7/dist-packages/serial/serialposix.py", line 677, in _reset_input_buffer
    termios.tcflush(self.fd, termios.TCIFLUSH)
termios.error: (5, 'Input/output error')
[rosserial_python-6] process has died [pid 6398, exit code 1, cmd /home/jaeyoung/catkin_ws/src/versavis/dependencies/rosserial/rosserial_python/nodes/serial_node.py _port:=/dev/versavis _baud:=250000 __name:=rosserial_python __log:=/home/jaeyoung/.ros/log/c2447b08-9651-11eb-a116-002315d18521/rosserial_python-6.log].
log file: /home/jaeyoung/.ros/log/c2447b08-9651-11eb-a116-002315d18521/rosserial_python-6*.log
[rosserial_python-6] restarting process
process[rosserial_python-6]: started with pid [6502]
[INFO] [1617656351.996729]: ROS Serial Python Node
[INFO] [1617656352.005338]: Connecting to /dev/versavis at 250000 baud


host computer time synchronization

Hi, thanks for sharing this awesome project. I have a question about host computer time synchronization.

In your paper Fig.2, it's seems the host computer is time sync with MCU. Also, in page 8, Ouster OS-1 64-beam LiDAR is time sync with PTP by host computer. All of this seems to say, host computer is time synchronized. (maybe be using gpsd, pps and fake GPS time).

Could you confirm it !!

I am working on time sync for multi-sensor project. But my sonar can't do time sync by external trigger or PPS. Only to software trigger, which means my host computer has to time sync with MCU which used time sync for cameras and IMU. I know host computer can be time sync with gps and PPS, but not sure with fake gps message and PPS.

Thanks for your help.

RGB IMU calibration

Hi,

I have been trying to calibrate an RGB and IMU sensor using Kalibr. I am using the same camera and IMU as you do in your project. Camera is BFS-U3-04S2M and I believe the lens is also the same as yours (as much as I can say from the image of your setup in the paper). The problem is that my reprojection errors are quite higher than what you have achieved in the paper.
Could you please let me know what kind of settings you are using in the camera and if there is something about the lens like getting the right focus, etc?
Attached, please find the Kalibr report and also a sample image of the camera.
91678652000
2020_03_10_17_33_19_481.pdf

Unable to build firmware

Problem Description
I was following the instructions, but was unable to build the firmware through Arduino IDE (1.8.2)

The sketchbook is set as ~/catkin_ws/src/versavis/firmware

The error log is as the following.

Arduino: 1.8.2 (Linux), Board: "VersaVIS"

Build options changed, rebuilding all
In file included from /home/jaeyoung/catkin_ws/src/versavis/firmware/libraries/versavis/src/Imu.h:17:0,
                 from /home/jaeyoung/catkin_ws/src/versavis/firmware/libraries/versavis/src/ADIS16448BMLZ.h:33,
                 from /home/jaeyoung/catkin_ws/src/versavis/firmware/versavis/versavis.ino:15:
/home/jaeyoung/catkin_ws/src/versavis/firmware/libraries/versavis/src/Sensor.h:19:10: fatal error: versavis/ImuMicro.h: No such file or directory
 #include <versavis/ImuMicro.h>
          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
exit status 1
Error compiling for board VersaVIS.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

ImuMicro.h seems to be something that is built afterwards and added into the catkin_ws/devel/versavis, but arduinoIDE is unable to find it

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.