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

Add DVL specific messages #317

Merged
merged 2 commits into from
Nov 23, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions proto/gz/msgs/dvl_beam_state.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
/*
* Copyright (C) 2022 Open Source Robotics Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/

syntax = "proto3";
package gz.msgs;
option java_package = "com.gz.msgs";
option java_outer_classname = "DVLBeamStateProtos";

/// \ingroup gz.msgs
/// \interface DVLBeamState
/// \brief State of some acoustic beam in a Doppler Velocity Log sensor. Each beam, when locked,
/// estimates the distance to the reflecting target as well as its velocity in some reference
/// frame. Some additional attributes may also be available.

import "gz/msgs/dvl_kinematic_estimate.proto";
import "gz/msgs/dvl_range_estimate.proto";

message DVLBeamState
{
/// \brief Beam ID.
int32 id = 1;

/// \brief Beam velocity estimate.
DVLKinematicEstimate velocity = 2;

/// \brief Beam range estimate.
DVLRangeEstimate range = 3;

/// \brief Beam signal strength indicator.
double rssi = 4;

/// \brief Measured background noise spectral density.
double nsd = 5;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Not familiar with this term, does it have units?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added units in d27b90f. Noise power spectral density characterize how much noise power is there per unit bandwidth.


/// \brief Whether beam is locked or not.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe this is obvious if you're familiar with DVLs but I don't have a good intuition about what does it mean "locked" in this context. It's OK to also include a link to some reference.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done in d27b90f.

bool locked = 6;
}
50 changes: 50 additions & 0 deletions proto/gz/msgs/dvl_kinematic_estimate.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
/*
* Copyright (C) 2022 Open Source Robotics Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/

syntax = "proto3";
package gz.msgs;
option java_package = "com.gz.msgs";
option java_outer_classname = "DVLKinematicEstimateProtos";

/// \ingroup gz.msgs
/// \interface DVLKinematicEstimate
/// \brief Kinematic quantity (e.g. position, velocity, etc.) estimate in some reference
/// frame, as reported by a Doppler Velocity Log sensor. This estimate is characterized by
/// mean and covariance of some implicit multivariate distribution (typically a multivariate
/// normal distribution).

import "gz/msgs/vector3d.proto";

message DVLKinematicEstimate
{
enum ReferenceType
{
DVL_REFERENCE_UNSPECIFIED = 0;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could you document each element of the enum?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done in d27b90f.

DVL_REFERENCE_EARTH = 1;
DVL_REFERENCE_SHIP = 2;
DVL_REFERENCE_BEAM = 3;
};
/// \brief Estimate frame of reference (incl. conventions).
ReferenceType reference = 1;

/// \brief Estimate mean.
Vector3d mean = 2;

/// \brief Estimate covariance matrix.
/// A 3 x 3 row-major matrix using a flat contiguous layout.
repeated double covariance = 3;
}
36 changes: 36 additions & 0 deletions proto/gz/msgs/dvl_range_estimate.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*
* Copyright (C) 2022 Open Source Robotics Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/

syntax = "proto3";
package gz.msgs;
option java_package = "com.gz.msgs";
option java_outer_classname = "DVLRangeEstimateProtos";

/// \ingroup gz.msgs
/// \interface DVLRangeEstimate
/// \brief Range estimate as reported by a Doppler Velocity Log sensor. This estimate is
/// characterized by mean and variance of some implicit scalar distribution (typically a
/// normal distribution).

message DVLRangeEstimate
{
/// \brief Estimate mean.
double mean = 1;

/// \brief Estimate variance.
double variance = 2;
}
48 changes: 48 additions & 0 deletions proto/gz/msgs/dvl_tracking_target.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/*
* Copyright (C) 2022 Open Source Robotics Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/

syntax = "proto3";
package gz.msgs;
option java_package = "com.gz.msgs";
option java_outer_classname = "DVLTrackingTargetProtos";

/// \ingroup gz.msgs
/// \interface DVLTrackingTarget
/// \brief Target used for tracking by a Doppler Velocity Log sensor. Either a bottom ground
/// or a water mass target. Estimates of target range and position in some reference frame
/// may be provided.

import "gz/msgs/dvl_kinematic_estimate.proto";
import "gz/msgs/dvl_range_estimate.proto";

message DVLTrackingTarget
{
enum TargetType
{
DVL_TARGET_UNSPECIFIED = 0;
DVL_TARGET_BOTTOM = 1;
DVL_TARGET_WATER_MASS = 2;
};
/// \brief Type of target used for tracking.
TargetType type = 1;

/// \brief Target range (or distance).
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'd recommend to mention the units here and in the position fields

Copy link
Contributor Author

@hidmic hidmic Nov 23, 2022

Choose a reason for hiding this comment

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

Are there units other than SI units? :) Done in d27b90f.

DVLRangeEstimate range = 3;

/// \brief Target position estimate.
DVLKinematicEstimate position = 2;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Any reason for placing the position = 2 after range = 3?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No reason. Fixed in d27b90f.

}
59 changes: 59 additions & 0 deletions proto/gz/msgs/dvl_velocity_tracking.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
/*
* Copyright (C) 2022 Open Source Robotics Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/

syntax = "proto3";
package gz.msgs;
option java_package = "com.gz.msgs";
option java_outer_classname = "DVLVelocityTrackingProtos";

/// \ingroup gz.msgs
/// \interface DVLVelocityTracking
/// \brief Velocity tracking estimates from a Doppler Velocity Log sensor.
/// Doppler velocity logs are used by the maritime community to track the velocity
/// of a vessel with respect to some (reflecting) target.

import "gz/msgs/header.proto";
import "gz/msgs/dvl_beam_state.proto";
import "gz/msgs/dvl_tracking_target.proto";
import "gz/msgs/dvl_kinematic_estimate.proto";

message DVLVelocityTracking
{
/// \brief Message header.
Header header = 1;

enum DVLType
{
DVL_TYPE_UNSPECIFIED = 0;
DVL_TYPE_PISTON = 1;
DVL_TYPE_PHASED_ARRAY = 2;
};
/// \brief Type of DVL.
DVLType type = 2;

/// \brief Locked on target.
DVLTrackingTarget target = 3;

/// \brief Estimated velocity.
DVLKinematicEstimate velocity = 4;
Copy link
Collaborator

Choose a reason for hiding this comment

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

What is the difference between this velocity field and the velocity of each beam?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added clarification in d27b90f.


/// \brief Tracking beams' state.
repeated DVLBeamState beams = 5;

/// \brief Vendor-specific status (e.g. bitmask, error code).
int32 status = 6;
}