This ROS package automates the process of:
- Launching VINS-Mono (
vins_estimator/android.launch) - Starting an odometry recorder node or activity predictor node
- Playing a specified ROS bag file
- Automatically launch vins-mono and start prediction of the activity in real-time with pre built ML model.
Odometry or activity prediction data is saved or published as appropriate.
- ROS Melodic (tested on Ubuntu 18.04, Python 2.7)
- VINS-Mono installed in your
catkin_ws/src rosbaginstalled (comes with ROS by default)joblib,numpy(for predictor node, install viapipif needed)
cd ~/catkin_ws/src
git clone https://github.com/sajjad-hm/vins-auto-launcher.git
cd ..
catkin_make
source devel/setup.bashRun the full process to record the raw_data feature (VINS-Mono → Bag playback → Feature Recorder):
roslaunch vins_auto_launcher full_pipeline.launch bag_file:=/absolute/path/to/your_file.bagExample:
roslaunch vins_auto_launcher full_pipeline.launch bag_file:=/home/user/data/sample.bagRun the full process with activity prediction (VINS-Mono → Bag playback → Activity Prediction):
roslaunch vins_auto_launcher full_pipeline_predict.launch bag_file:=/absolute/path/to/your_file.bagExample:
roslaunch vins_auto_launcher full_pipeline_predict.launch bag_file:=/home/user/data/sample.bag- Launches VINS-Mono (
vins_estimator/android.launch) - Waits 3 seconds
- Starts
vins_odom_recorder.py:- Saves odometry from
/vins_estimator/odometry - Stores CSV in the same folder as the
.bagfile - CSV filename:
<bag_name>_<timestamp>.csv
- Saves odometry from
- Waits 3 seconds
- Plays the provided
.bagfile
- Launches VINS-Mono (
vins_estimator/android.launch) - Waits 3 seconds
- Starts
predictor_node.py:- Loads ML model and scaler from
models/ - Listens to
/vins_estimator/odometry - Publishes activity prediction to
/activity_prediction
- Loads ML model and scaler from
- Waits 6 seconds
- Plays the provided
.bagfile
rostopic echo /activity_predictionThe CSV file contains:
| Position_x | Position_y | Position_z | Orientation_x | Orientation_y | Orientation_z | Orientation_w |
|---|
Example:
0.123, -0.456, 1.789, 0.0, 0.0, 0.707, 0.707
vins_auto_launcher/
├── CMakeLists.txt
├── package.xml
├── launch/
│ ├── full_pipeline.launch
│ └── full_pipeline_predict.launch
├── scripts/
│ ├── vins_odom_recorder.py
│ └── predictor_node.py
- You must provide an absolute path for
bag_filein the launch command. - The package will not overwrite CSV files from previous runs — each has a unique timestamp.
- Ensure
vins_estimatoris built and link the location of vins_eastimator in the launch file and can runandroid.launchindependently before using this package. - For activity prediction, ensure the required model and scaler files are present in the
models/directory.
This project is licensed under the MIT License - see the LICENSE file for details.