Image, Camera Info timestamp mismatch - AR.Drone 2.0 #13

Closed
akarma opened this Issue Oct 9, 2012 · 1 comment

Comments

Projects
None yet
2 participants
@akarma

akarma commented Oct 9, 2012

Attempting to use the ROS package image_proc on the '/ardrone/front/image_raw' or '/ardrone/bottom/image_raw' steams fails to produce any corrected streams when used with the AR.Drone 2.0

The image_proc publishes the corrected streams, but gives an error indicating mismatched timestamps between images and the corresponding camera info when the stream is viewed.

The problem appears to occur due to lines 452-454 in ardrone_driver.cpp:

    image_msg.header.stamp = ros::Time::now();
cinfo_msg_hori.header.stamp = ros::Time::now();
cinfo_msg_vert.header.stamp = ros::Time::now();

This doesn't guarantee the timestamps are matched as ros::Time::now() can change between calls.

The code was changed to:

    image_msg.header.stamp = ros::Time::now();
    cinfo_msg_hori.header.stamp = image_msg.header.stamp;
    cinfo_msg_vert.header.stamp = image_msg.header.stamp;

This ensures timestamps are matched. The change appears to resolve the issue and image_proc is is able to correctly produce streams.

Whether or not this is also an issue for the original AR.Drone has not been tested.

@mani-monaj

This comment has been minimized.

Show comment Hide comment
@mani-monaj

mani-monaj Oct 9, 2012

Member

Thank you for reporting this as well as sharing your solution. I will take a look over all headers' timestamps to make sure all of them are synchronised.

Member

mani-monaj commented Oct 9, 2012

Thank you for reporting this as well as sharing your solution. I will take a look over all headers' timestamps to make sure all of them are synchronised.

mani-monaj pushed a commit that referenced this issue Oct 12, 2012

ardrone_driver.cpp: ensure timestamps are consistent
Calling ros::Time::now() doesn't guarantee timestamps are matched as
ros::Time::now() can change between calls. This fix sets the timestamps to be
equal, to ensure consistency.

This addresses issue #13.

garyservin pushed a commit to garyservin/ardrone_autonomy that referenced this issue Sep 1, 2014

Merge pull request #13 from garyservin/android
Fixed vector value assignment for android
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment