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 all commits
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
55 changes: 55 additions & 0 deletions proto/gz/msgs/dvl_beam_state.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
/*
* 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, measured along
/// its axis, in meters per second.
DVLKinematicEstimate velocity = 2;

/// \brief Beam range estimate, in meters.
DVLRangeEstimate range = 3;

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

/// \brief Measured background noise spectral density,
/// in watts per hertz.
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 to its target or not.
/// A beam is said to be locked when it can reliably
/// measure signal reflections.
bool locked = 6;
}
53 changes: 53 additions & 0 deletions proto/gz/msgs/dvl_kinematic_estimate.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
/*
* 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
{
/// \brief Frames of reference (incl. conventions)
enum ReferenceType
{
/// \brief Unspecific frame of reference.
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.

/// \brief Earth bound frame of reference (typically ENU).
DVL_REFERENCE_EARTH = 1;
/// \brief Ship bound frame of reference (typically FSK).
DVL_REFERENCE_SHIP = 2;
};
/// \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;
}
52 changes: 52 additions & 0 deletions proto/gz/msgs/dvl_tracking_target.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
/*
* 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
{
/// \brief Target types
enum TargetType
{
/// \brief Unspecific target type.
DVL_TARGET_UNSPECIFIED = 0;
/// \brief Bottom ground (ie. solid) target.
DVL_TARGET_BOTTOM = 1;
/// \brief Water mass layer (ie. fluid) target.
DVL_TARGET_WATER_MASS = 2;
};
/// \brief Type of target used for tracking.
TargetType type = 1;

/// \brief Target range (or distance), in meters
DVLRangeEstimate range = 2;

/// \brief Target position estimate, in meters.
DVLKinematicEstimate position = 3;
}
64 changes: 64 additions & 0 deletions proto/gz/msgs/dvl_velocity_tracking.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
/*
* 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;

/// \brief DVL types.
enum DVLType
{
/// \brief Unspecific DVL type.
DVL_TYPE_UNSPECIFIED = 0;
/// \brief Piston DVLs.
DVL_TYPE_PISTON = 1;
/// \brief Phased array DVLs.
DVL_TYPE_PHASED_ARRAY = 2;
};
/// \brief Type of DVL.
DVLType type = 2;

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

/// \brief Estimated velocity of either target or sensor
/// w.r.t. the specified frame, in meters per second.
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;
}