HKUST-Aerial-Robotics/VINS-Mono

ROS 2 compatible & What should be the ideal frequency for IMU and camera?

serkanMzlm opened this issue · 26 comments

1 - Will it be made compatible with ROS2?
2 - What should be the ideal frequency for IMU and camera?

As I converted the code to ROS 2, I conducted experiments with the 'V1_01_easy' bag file, and the output turned out to be different from ROS 1. Upon inspecting the output data, I noticed that the data published from the feature_tracker part remains the same, while the position data published from the VINS estimator part appears to be significantly larger, despite the orientation data being similar.

ROS:

  • /imu0 hz: 200
  • /cam0/image_raw hz: 19.9

ROS2:

  • /imu0 hz: 134
  • /cam0/image_raw hz: 19.9

image

rviz2:
image

@serkanMzlm I wanted to ask that you converted it for which ubuntu and ros2 versions? Was it for ubuntu 20.04 and ros2 foxy or some other?

@YasheerahYaqoot
System:
Ubuntu: 22.04
ROS2: Humble

@serkanMzlm Thank you!.
Also, can you tell me what libraries did you install? Ceres 2.1.0? Did you install opencv with CUDA or Eigen 3.3.9?

@YasheerahYaqoot Ceres, opencv and Eigen are installed, but I don't know their versions, but it is most likely the latest version.

@serkanMzlm I m having problem in installing opencv. It gives error when i run this command : make -j8. Can you tell me how did you install it?

@YasheerahYaqoot Why are you trying to install from source?
Can you post a screenshot of the error?
After all the requirements are met, the packages need to be built using colcon build

sudo apt-get install -y libopencv-dev

@YasheerahYaqoot System: Ubuntu: 22.04 ROS2: Humble

I also want to convert this code to ROS2 hubmble in ubuntu22.04,I don‘’t know if we can discuss with each other. and my e-mail:347913076@qq.com

@serkanMzlm I did install every package and when I build the packages it gives me error. I removed everything for now. Will post a screenshot after doing it again. I m cloning your repo and installing all the dependencies and libraries and then building the package.

@DMUZhangXianglong Yes that would be great! I will email you my process and my problems and then we can try doing it together.

@serkanMzlm I get this error
image

@YasheerahYaqoot Your error is due to performing the build sequence incorrectly. First, the camodocal package needs to be built. To do this, run the command colcon build --packages-select camodocal. After building this package, you need to source it into the system. To do this, run . install/setup.bash Then, you need to build the required packages.

@YasheerahYaqoot and @DMUZhangXianglong , if you want, I can show you the build part on Sunday. Then, we can work together to resolve the errors causing issues in the system.

@serkanMzlm Yes please, that would be very helpful. I think the issue is in the building of packages. I have tried several times but I am unable to do it. Let me know when you are available.

@serkanMzlmBu hatayı alıyorum görüntü

The cause of this error is the build order. First, please build the camodocal package.

Maybe on Sunday you can help me with the necessary libraries and correct installing, building and sourcing since I m very new to this.

Ok so, I was able to build camodocal. And now when I finally build the worskpace it gives me error.
image

@YasheerahYaqoot Installation steps:
1- Download the ROS2 branch on the GitHub page

git clone git@github.com:serkanMzlm/VINS-Mono.git -b ros2

2-

cd VINS-Mono
colcon build --packages-select camodocal config
. install/setup.bash
colcon build --packages-select feature_tracker vins_estimator pose_graph

If you have followed these steps, it should build without any issues.

I am trying to do it on orangepi 5. The package is built but it does not launch rviz.

@YasheerahYaqoot The RViz part is still for ROS1; I haven't adapted it for ROS2. Running it manually and selecting the necessary packages should be sufficient.

Will you use KITTI or do you have intel realsense?

@DMUZhangXianglong Yes that would be great! I will email you my process and my problems and then we can try doing it together.

Is it possible to use instant messaging software for communication, such as WeChat

@YasheerahYaqoot and @DMUZhangXianglong , if you want, I can show you the build part on Sunday. Then, we can work together to resolve the errors causing issues in the system.

Is it possible to use instant messaging software for communication, such as WeChat

@serkanMzlm I have a simple USB camera. But first I want to test it on the existing dataset. What should I run to know that the package is installed correctly and working fine.

@DMUZhangXianglong I am available on Telegram.

@YasheerahYaqoot The reason for opening this topic is that I converted all ROS1 code to ROS2 and ensured it builds without errors. However, there is an issue with one package. I run the code, and it works without any problems, but the resulting mapping is not the same as the graph in ROS1. I opened this topic so that the developers can review the ROS2 code and identify the error.

Additionally, I recommend trying the OpenVINS code because OpenVINS uses resources more efficiently and has support for ROS2

@DMUZhangXianglong I am available on Telegram.

I can only use wechat