Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Camera meta information #7164

Closed
wants to merge 3 commits into from
Closed

Camera meta information #7164

wants to merge 3 commits into from

Conversation

LorenzMeier
Copy link
Member

@LorenzMeier LorenzMeier commented May 1, 2017

@mhkabir This is just the architectural foundation for you to complete. This changes the whole approach to geo-tagging: Instead of doing this using the log file we resort to storing the trigger events in the GCS (@bkueng, @DonLakeFlyer your help might be needed) during the flight. The Geotagging then should just use that hash map to tag the images.

@julianoes Can you help with the quaternion definition of the camera message? What is 0 roll, 0 pitch, 0 yaw? Facing level to north or facing down to north?

MAVLink message: http://mavlink.org/messages/common#CAMERA_IMAGE_CAPTURED

@LorenzMeier
Copy link
Member Author

@mhkabir I've added http://mavlink.org/messages/common#MAV_CMD_REQUEST_CAMERA_IMAGE_CAPTURE for the re-request command. Please add to vehicle_command.msg with the same ID / meta info.

@LorenzMeier
Copy link
Member Author

Related QGC issue: mavlink/qgroundcontrol#4230

@DonLakeFlyer Note that this is gating the v1.6 release, so reasonably high prio if you can fit it in somewhere.

@LorenzMeier
Copy link
Member Author

@dagar Would be fantastic if you could review and potentially help on the QGC side.

@LorenzMeier
Copy link
Member Author

Complete communication spec updated here:
mavlink/qgroundcontrol#4230 (comment)

In particular the bit on http://mavlink.org/messages/common#FLIGHT_INFORMATION

This was referenced May 1, 2017
@julianoes
Copy link
Contributor

@LorenzMeier I don't know anything about the Quaternion definition. It should just be the same as the vehicle.

The Euler angles are in the same frame as we describe the vehicle, facing level to North.

@mhkabir
Copy link
Member

mhkabir commented May 1, 2017

@julianoes OK, got it.

@@ -41,6 +41,7 @@ set(msg_file_names
att_pos_mocap.msg
battery_status.msg
camera_trigger.msg
camera_image.msg
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the name camera_image_captured would better describe this.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made it camera_capture.msg

float64 lon # Longitude in degrees (WGS84)
float32 alt # Altitude (AMSL)
float32 relative_alt # Altitude relative to home
float32[4] q # Attitude of the camera, pointing down is XXX
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As said, pointing level to North should be the frame, same as the vehicle.


msg.time_boot_ms = image.timestamp / 1000;
msg.time_utc = image.timestamp_utc;
msg.camera_id = 1;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably be 0 for all camera IDs, unless the trigger is specifically sent to camera ID 1 only.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is from a camera, not to.

// efficient retransmission logic.

if (static_cast<int>(cmd.param1) == 0 /*_prev_image.seq*/) {
// Send prev image again
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So you just have a "queue" of one message before the current one to retransmit? That's doesn't sound very robust.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The robustness judgement should be made on timing, not on queue size. You want to allow for ~50-250 ms retransmission requests for the GCS before it gets overwritten. Taking into account that we realistically will not exceed 3 Hz with current systems that means we 250 / 333 ms = 0.75 messages queue size, rounding up to 1.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can think of cases where we miss one message and likely miss a couple more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

e.g when the data link goes out of range briefly.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are currently using a similar mechanism to get the tags to the GCS. And I can confirm that it happens every now and then that you lose the mavlink connection for a longer time. Especially when you start to fly further away and BVLOS.

We found a workaround to store the tags using the datamanager during the flight. Then only after the flight we transmit the full set of tags. As the tags are only little data and we don't save them in junks this proofed to work reliably.

@mhkabir
Copy link
Member

mhkabir commented May 12, 2017

Superseded by #7201

@mhkabir mhkabir closed this May 12, 2017
@julianoes julianoes deleted the pr-camera-meta branch May 12, 2017 07:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants