Open Leon-Redfield opened 2 years ago
Hello, How did you get around this problem? @Leon-Redfield
Hello, How did you get around this problem? @Leon-Redfield
Sorry but I didn't solve this problem.
I ran into the same issue, causing the lidar timestamp to be out of sync with the Imu timestamp. Can I use all ros::Time::now()?
Bug report
Hi! I'm using multirotor SimMode to simulate a drone flying in the village. And I'm using "Airsim_ROS_wrapper" to receive the messages from Airsim. There are two main problems:
You can see, whatever value between 1-2 I use, the actual clock speed is always around 0.95. But when I modify this value to 2.0, the actual clock speed jumps to 1.76 like this:
What I really want is to make the actual clock speed just at 1.0000 but I have no idea. My CPU is i7-10700, graphic card is RTX3070Ti. So just because of the problem above, I have the second problem.
airsim_timestamp_to_ros(msg)
andros::Time::now()
. So I print the timestamps in the terminal, and the code is as below:lidar_msg.header.stamp = airsim_timestamp_to_ros(lidar_data.time_stamp);
ROS_WARN("Compare the two kinds of timestamp");
std::cout << " The lidar timestamp is : " << lidar_msg.header.stamp << std::endl;
std::cout << " The ros timestamp is : " << ros::Time::now() << std::endl;
And the final result is that the difference between this two kinds of timestamps is bigger and bigger. I guess it is because of the clock speed of Airsim is not synchronous with that in ROS.So all above, I want to solve these two problems, hope to get the solutions, thank you!