Skip to content

jaku-jaku/vins-research-pkg

Repository files navigation

Table of Contents

[Last generated: Wed 08 Nov 2023 05:19:35 AM UTC]


VIO

1. VINS

  • Require Ceres 2.0.0

1.1 Ceres 2.0.0

1.1.a One bash install:

./UWARL_catkin_ws/src/vins-research-pkg/scripts/install_ceres.sh

1.1.b Manual Installation

  • $ cd ~/JX_Linux
    $ wget http://ceres-solver.org/ceres-solver-2.0.0.tar.gz
    $ tar zxf ceres-solver-2.0.0.tar.gz
    $ mkdir ceres-bin
    $ cd ceres-bin
    $ cmake ../ceres-solver-2.0.0
    $ make -j6
    $ make test
    $ sudo make install

1.2 Perform VINS Demo on Recorded bag files (dependency on jack's private repo):

$ cd_ws
## Base camera:
$ ./waterloo_steel/waterloo_steel_demo/waterloo_steel_analyzer/shortcuts/tmux_vins.sh base
## EE camera:
$ ./waterloo_steel/waterloo_steel_demo/waterloo_steel_analyzer/shortcuts/tmux_vins.sh EE

### options:
$ ./waterloo_steel/waterloo_steel_demo/waterloo_steel_analyzer/shortcuts/tmux_vins.sh EE <bag_file_path>
$ ./waterloo_steel/waterloo_steel_demo/waterloo_steel_analyzer/shortcuts/tmux_vins.sh EE bagfiles/waterloo_steel_demo/session_0/0_DEMO_12_recording_2023-02-03-10-05-10.bag
  • You may live view the plot with Live Player above

1.3 Bag Live Player (Plotter):

$ roslaunch waterloo_steel_analyzer main.launch 
### option:
$ roslaunch waterloo_steel_analyzer main.launch bag_file:=bagfiles/waterloo_steel_demo/session_0/0_DEMO_12_recording_2023-02-03-10-05-10.bag

Example

2. Calibration

2,1 How to use Kalibr

  1. Prepare Files:
     $ vim april_grid.yaml
     # Content:
     target_type: 'aprilgrid' #gridtype
     tagCols: 6               #number of apriltags
     tagRows: 6               #number of apriltags
     tagSize: 0.088           #size of apriltag, edge to edge [m]
     tagSpacing: 0.3          #ratio of space between tags to tagSize
    and
    $ vim imu.yaml
    # Content:
    accelerometer_noise_density: 1.86e-03   #Noise density (continuous-time)
    accelerometer_random_walk:   4.33e-04   #Bias random walk
    
    gyroscope_noise_density:     1.87e-04   #Noise density (continuous-time)
    gyroscope_random_walk:       2.66e-05   #Bias random walk
    
    rostopic:                    /cam_base/imu      #the IMU ROS topic
    update_rate:                 100.0      #Hz (for discretization of the values above)
  2. Calibrate camera:
    # parallels @ parallel-ubuntu-20 in ~/.ros/bagfiles/waterloo_steel_demo/session_0 [13:12:18]
    $ rosrun kalibr kalibr_calibrate_cameras --models pinhole-radtan --target april_grid.yaml --bag 5_DEMO_14_recording_2023-02-03-10-10-44.bag --topics /cam_base/color/image_raw --bag-from-to 0 10
  3. Calibrate camera with imu:
    # parallels @ parallel-ubuntu-20 in ~/.ros/bagfiles/waterloo_steel_demo/session_0 [13:12:18]
    $ rosrun kalibr kalibr_calibrate_imu_camera --imu imu.yaml --target april_grid.yaml --bag 5_DEMO_14_recording_2023-02-03-10-10-44.bag  --cam 5_DEMO_14_recording_2023-02-03-10-10-44-camchain.yaml --bag-from-to 0 10

2.1.0 Kalibr Dependency

$ sudo apt-get install python3-catkin-tools python3-osrf-pycommon # ubuntu 20.04
$ sudo apt-get install -y \
    git wget autoconf automake nano \
    libeigen3-dev libboost-all-dev libsuitesparse-dev \
    doxygen libopencv-dev \
    libpoco-dev libtbb-dev libblas-dev liblapack-dev libv4l-dev
# Ubuntu 20.04
$ sudo apt-get install -y python3-dev python3-pip python3-scipy \
    python3-matplotlib ipython3 python3-wxgtk4.0 python3-tk python3-igraph python3-pyx

2.2 How to calibrate IMU (Allan Variance):

2.1.a Useful Related Links:

  1. cook the bag:

    $ rosrun allan_variance_ros cookbag.py --input imu_2023-02-27-12-20-36.bag --output data/cook_imu_2023-02-27-12-20-36.bag
  2. allan variance compute

    $ vim config/l515.yaml
    # create `config/l515.yaml` with:
    imu_topic: "/cam_base/imu"
    imu_rate: 400
    measure_rate: 100 # Rate to which imu data is subsampled
    sequence_time: 10800 # 3 hours in seconds
    
    # compute:
    $ rosrun allan_variance_ros allan_variance data config/l515.yaml
  3. Analysis:

    $ rosrun allan_variance_ros analysis.py --data data/allan_variance.csv
    accelerometer_noise_density: 0.0011772     # [(m/s^2))(1/sqrt(Hz))] = 120 x e-6 x 9.81 m/s^2/sqrt(Hz)
    accelerometer_random_walk:   0.001            # [(m/s^3))(1/sqrt(Hz))] from {Allan standard deviation (AD)}
    
    gyroscope_noise_density:     0.0002443461  # [(rad/s))(1/sqrt(Hz))] = 0.014^deg/s/sqrt(Hz)
    gyroscope_random_walk:       0.0002     # [(rad/s^2))(1/sqrt(Hz))] from {Allan standard deviation (AD)}
    
    rostopic:                    /cam_base/imu # the IMU ROS topic
    update_rate:                 100.0         # [Hz] (for discretization of the values above)
    • calibrate from https://github.com/ori-drs/allan_variance_ros [2023/02/28]

    • $ cat ../../imu_static/imu.yaml 
      #Accelerometer
      accelerometer_noise_density: 0.0019979963400731035 
      accelerometer_random_walk: 0.0001510591826346053 
      
      #Gyroscope
      gyroscope_noise_density: 0.00015066033240221485 
      gyroscope_random_walk: 7.126058907243516e-06 
      
      rostopic: /cam_base/imu #Make sure this is correct
      update_rate: 100.0 #Make sure this is correct
/home/jx/UWARL_catkin_ws/src/waterloo_steel/waterloo_steel_demo/waterloo_steel_analyzer/shortcuts/batch_tmux_vins.sh waterloo_steel_demo_0519 mono_rgb_imu EE d455 all all accurate_T_ic -1 -1 && /home/jx/UWARL_catkin_ws/src/waterloo_steel/waterloo_steel_demo/waterloo_steel_analyzer/shortcuts/batch_tmux_vins.sh waterloo_steel_demo_0519 mono_rgb_imu base d455 all all accurate_T_ic -1 -1 

> Back To Top <

About

A package for vins

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages