This is the script to convert the JHU recored data from rosbag format to video RGB images(.jpg) and kinematics files(.txt).
ffmpeg is needed and can be installed on Ubuntu with:
sudo apt install ffmpeg
ros and other stuff
sudo apt install python3-roslib python3-sensor-msgs python3-opencv
save_root = {path_to_save_folder}
bag_name = {rosbag_name}
(other setting please refer to the code)
roscore
python recieve_data.py
rosbag play {rosbag_name}.bag
Code modified from rosbag2video. Thanks for contributions
@inproceedings{
long2021relational,
title={Relational graph learning on visual and kinematics embeddings for accurate gesture recognition in robotic surgery},
author={Long, Yonghao and Wu, Jie Ying and Lu, Bo and Jin, Yueming and Unberath, Mathias and Liu, Yun-Hui and Heng, Pheng Ann and Dou, Qi},
booktitle={2021 IEEE International Conference on Robotics and Automation (ICRA)},
pages={13346--13353},
year={2021},
organization={IEEE}
}