zauberflote1 / voxlSyncVINS

VOXL Stuff and ROS for VINS
BSD 3-Clause "New" or "Revised" License
1 stars 0 forks source link

voxlSyncVINS

VOXL2 Package Edits for proper external VINS usage (ROS)

This a modified fork from the original ModalAI Gitlab. Please refer to their repo for proper documentation.

Modifications

Building, Running, and Considerations

Currently this repo has 2 ROS packages and 1 "VOXL" package, which are the following:

VOXL_IMU_ROS

I recommend building this natively on your QRB powered drone, but the qrb-emulator should work if you have the patience to set it up. Additionally, you cannot run voxl-imu-server and the voxl_imu_ros at the same time, so make sure to stop one before starting the other. Finally, because this has a custom priority so the kernel scheduler prioritizes the read SPI operations, you WILL need to kill the process via terminal (see below...)

#IMU_ROS IS ALREADY A CATKIN_WS-LIKE, SO DRAG IT TO A DIRECTORY SUCH AS /HOME
cd imu_ros
catkin_make ##assuming you sourced ROS already...
source devel/setup.bash
rosrun voxl_imu_ros server_node_node ##MAKE SURE ROSCORE IS RUNNING BEFORE THIS LINE

Check if it is working (another terminal):

rostopic echo /imu_data

Killing the node:

top ##grab PID for the imu_ros, then ctrl+c
kill -9 $PID #substitute $PID by the PID in top

Locking thread to a core and IMU ODR:

VOXL_MPA_ROS_MOD

Follow the same building process as the IMU_ROS package, without the hassles of killing the process via terminal

cd voxl_mpa_ros_mod_ws
catkin_make
source devel/setup.bash
roslaunch voxl_mpa_to_ros_mod voxl_mpa_to_ros.launch 

VOXL-CAMERA-SERVER

I recommend building via VOXL-Docker (VOXL-CROSS) and deploying the .deb via ssh or adb. Although, this is a single line modification from the original code. The most important modifications for VINS are in the .conf file (stereo global shutter exposure, gain, dimensions settings) -- you can check my configurations and substitute as you please in /etc/modalai/ (QRB)

Clone the repo from ModalAI

Make sure to pick the one that aligns with your SDK version

##CHANGE THIS LINE IN hal3_camera_mgr.cpp

#define MAX_STEREO_DISCREPENCY_NS ((1000000000/configInfo.fps)*0.9)

##TO THIS

#define MAX_STEREO_DISCREPENCY_NS (5000000)