-
Notifications
You must be signed in to change notification settings - Fork 45
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
Adds a message that allows loading environments via a topic #320
Merged
Merged
Changes from 9 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
f4b43a5
Adds a message that allows loading environments via a topic
arjo129 56b157a
style
arjo129 303df10
Address PR feedback.
arjo129 2475c08
Style
arjo129 9b39a6d
coverage
arjo129 cc4ce08
style
arjo129 940b2db
Merge remote-tracking branch 'origin/gz-msgs9' into arjo/feat/environ…
arjo129 4c60886
Bump copyright
arjo129 e4129c9
Merge branch 'gz-msgs9' into arjo/feat/environment_data_messages
arjo129 8c0e400
Address PR feedback
arjo129 c1766cf
Coverage
arjo129 101a723
Get rid of compiler
arjo129 bc90bd5
Style
arjo129 97531a0
Merge branch 'gz-msgs9' into arjo/feat/environment_data_messages
mjcarroll File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
/* | ||
* Copyright (C) 2023 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 = "DataLoadPathOptions"; | ||
|
||
import "gz/msgs/spherical_coordinates.proto"; | ||
|
||
/// \brief Used for specifying how to load environmental data | ||
message DataLoadPathOptions | ||
{ | ||
/// \brief Units used by spherical coordinates | ||
enum DataAngularUnits | ||
{ | ||
RADIANS = 0; | ||
DEGREES = 1; | ||
} | ||
|
||
/// \brief File path to load | ||
string path = 1; | ||
|
||
/// \brief Name of time axis | ||
string time = 2; | ||
|
||
/// \brief Is the data static in time | ||
bool static_time = 3; | ||
|
||
/// \brief Name of x axis | ||
string x = 4; | ||
|
||
/// \brief Name of y axis | ||
string y = 5; | ||
|
||
/// \brief Name of z axis | ||
string z = 6; | ||
|
||
/// Units | ||
DataAngularUnits units = 7; | ||
|
||
/// Spherical Coodinate type | ||
gz.msgs.SphericalCoordinatesType coordinate_type = 8; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -183,6 +183,25 @@ namespace gz | |
return out; | ||
} | ||
|
||
///////////////////////////////////////////// | ||
math::SphericalCoordinates::CoordinateType Convert( | ||
const msgs::SphericalCoordinatesType &_sc) | ||
{ | ||
switch (_sc) | ||
{ | ||
case msgs::SphericalCoordinatesType::ECEF: | ||
return math::SphericalCoordinates::CoordinateType::ECEF; | ||
case msgs::SphericalCoordinatesType::GLOBAL: | ||
return math::SphericalCoordinates::CoordinateType::GLOBAL; | ||
case msgs::SphericalCoordinatesType::SPHERICAL: | ||
return math::SphericalCoordinates::CoordinateType::SPHERICAL; | ||
case msgs::SphericalCoordinatesType::LOCAL: | ||
return math::SphericalCoordinates::CoordinateType::LOCAL; | ||
default: | ||
return math::SphericalCoordinates::CoordinateType::LOCAL2; | ||
arjo129 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} | ||
} | ||
|
||
///////////////////////////////////////////// | ||
math::AxisAlignedBox Convert(const msgs::AxisAlignedBox &_b) | ||
{ | ||
|
@@ -349,6 +368,25 @@ namespace gz | |
return result; | ||
} | ||
|
||
///////////////////////////////////////////// | ||
msgs::SphericalCoordinatesType ConvertCoord( | ||
const math::SphericalCoordinates::CoordinateType &_sc) | ||
{ | ||
switch (_sc) | ||
{ | ||
case math::SphericalCoordinates::CoordinateType::ECEF: | ||
return msgs::SphericalCoordinatesType::ECEF; | ||
case math::SphericalCoordinates::CoordinateType::GLOBAL: | ||
return msgs::SphericalCoordinatesType::GLOBAL; | ||
case math::SphericalCoordinates::CoordinateType::SPHERICAL: | ||
return msgs::SphericalCoordinatesType::SPHERICAL; | ||
case math::SphericalCoordinates::CoordinateType::LOCAL: | ||
return msgs::SphericalCoordinatesType::LOCAL; | ||
default: | ||
return msgs::SphericalCoordinatesType::LOCAL2; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This block returns a warning as we don't return anything if none of the previous conditions are met. |
||
} | ||
} | ||
|
||
///////////////////////////////////////////// | ||
msgs::PlaneGeom Convert(const gz::math::Planed &_p) | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The spherical coordinate type ...