Quantcast
Channel: ROS Answers: Open Source Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 475

how to sync two ROS topics by adjusting the time stamp

$
0
0
**Actual Issue:** I have a topic published with images from a camera and another topic with details of point cloud. When I plot these two topics, there is a time lag between the two plots. Is there any method to synchronize this time lag by adjusting the time stamp of point cloud message? I am using rosbag play for the above mentioned purpose. **Re-creating the Scenario** I tried to simulate the above scenario using the below mentioned points: i. Created a subscriber node which subscribe to the topic(/point_cloud) with point cloud data. ii. Inside the callback function, I copied the message to a new pointer variable of the same type (sensor_msgs::PointCloud2) and incremented the timestamp by 3sec (The debug print shows that the timestamp has been successfully updated). iii. Then I published the modified point cloud data in a new topic(/point_cloud_new). iv. Created two instances of rviz which subscribes to the two topics, /point_cloud and /point_cloud_new respectively. v. Since the timestamp of /point_cloud_new was incremented by 3sec, I expected a 3sec delay between the two plots in the rviz. But it is not happening. Since I am new to ROS, I am not sure whether it is the correct method to approach this issue. Please comment on the actual issue and the scenario re-created. Please help me to sort out this issue.

Viewing all articles
Browse latest Browse all 475

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>