Closed stevedanomodolor closed 2 years ago
From your printout, it looks like there is an issue with the camera and IMU timestamps. I suggest you take a look at those and see if they are reasonable if you plot them (relative to the start time). It looks like the IMU is off by 1649928076.969715
seconds from the camera times. Looking at the PX4 message I think getting the timestamp is a bit more complicated:
uint64 timestamp # time since system start (microseconds)
int32 RELATIVE_TIMESTAMP_INVALID = 2147483647 # (0x7fffffff) If one of the relative timestamps is set to this value, it means the associated sensor values are invalid
You might want to try this VehicleImu which seems to have the sample timestamp which should be the raw time? Not sure, as I have never directly interfaced with PX4 sensor data.
uint64 timestamp # time since system start (microseconds)
uint64 timestamp_sample # the timestamp of the raw data (microseconds)?
Another option you can try is to just use the current ROS timestamp if you are running it on an actual robot. This means that both the camera and IMU are all using ROS time, and OpenVINS would just need to calibrate the delay between PX4 sending and the node receiving the IMU reading. This solution wouldn't work for rosbag playback through...
I plot the two timestamp relattve to its starting point and I get this plot. Now I am using the timestamp_sample from the vehicleimu, this plot makes sense right?
From the axis it looks like there is still a 2 second difference? Is this time_camera_relative
what is on the camera image topic headers that you are subscribing to?
The relative time is the time from when I subscribed to the topic. Time_xxxx_relative = current timestamp -xxxx_suscribe_start_time
You can try writing a small node that just takes the px4 custom message, and then re-published a sensor_msgs/IMU
topic. You could then just directly timestamp it with ros::Time::now()
(or whatever the ros2 version of this is) in this node, and see how that performs. OpenVINS would then subscribe to this new topic and the existing camera topics you have.
I was not able to fix, so I added a new imu to the simulation and used that instead.
``System ros2 foxy Problem: I am trying to run the open_vis to estimate VIO for a simulation I made with the iris drone with a front camera. Given that the message type is not sensor_msg::msg but px4_msgs::sensorCombined, I modified the code in the ros2visualiser, specifically the imu subscirber. This is the modification I made.
Eveytime i run the simulation I get this error
This is the configuaration files: I do not know what the problem is, can someone help me please.