diff --git a/vrx_gz/CMakeLists.txt b/vrx_gz/CMakeLists.txt index 38d20b790..e1948332d 100644 --- a/vrx_gz/CMakeLists.txt +++ b/vrx_gz/CMakeLists.txt @@ -81,6 +81,21 @@ install( TARGETS ScoringPlugin DESTINATION lib) +# Stationkeeping scoring plugin +add_library(StationkeepingScoringPlugin SHARED + src/StationkeepingScoringPlugin.cc + src/WaypointMarkers +) +target_link_libraries(StationkeepingScoringPlugin PUBLIC + gz-common${GZ_COMMON_VER}::gz-common${GZ_COMMON_VER} + gz-sim${GZ_SIM_VER}::core + gz-math${GZ_MATH_VER} + ScoringPlugin +) +install( + TARGETS StationkeepingScoringPlugin + DESTINATION lib) + # Wayfinding scoring plugin add_library(WayfindingScoringPlugin SHARED src/WayfindingScoringPlugin.cc @@ -108,7 +123,6 @@ list(APPEND VRX_GZ_PLUGINS PublisherPlugin ScanDockScoringPlugin SimpleHydrodynamics - StationkeepingScoringPlugin Surface WaveVisual WildlifeScoringPlugin diff --git a/vrx_gz/src/StationkeepingScoringPlugin.cc b/vrx_gz/src/StationkeepingScoringPlugin.cc index 69d63f83f..921cbd476 100644 --- a/vrx_gz/src/StationkeepingScoringPlugin.cc +++ b/vrx_gz/src/StationkeepingScoringPlugin.cc @@ -24,6 +24,7 @@ #include #include "StationkeepingScoringPlugin.hh" +#include "WaypointMarkers.hh" using namespace gz; using namespace vrx; @@ -91,31 +92,12 @@ class StationkeepingScoringPlugin::Implementation /// \brief Vehicle to score. public: sim::Entity vehicleEntity{sim::kNullEntity}; - /// \brief Waypoint visualization markers - public: bool markers = false; - - /// \brief Display goal marker (currently disabled) - public: void AddMarker(); - /// \brief Display or suppress state changes public: bool silent = false; -}; -///////////////////////////////////////////////// -void StationkeepingScoringPlugin::Implementation::AddMarker() -{ - msgs::Marker markerMsg; - markerMsg.set_id(0); - markerMsg.set_action(msgs::Marker::ADD_MODIFY); - markerMsg.set_type(msgs::Marker::TRIANGLE_FAN); - - msgs::Material *matMsg = markerMsg.mutable_material(); - matMsg->mutable_script()->set_name("Gazebo/Red"); - msgs::Set(markerMsg.mutable_pose(), - math::Pose3d(this->goalX, this->goalY, 1, 0, 0, this->goalYaw)); - bool markerRequest = this->node.Request("/marker", markerMsg); - this->markers = markerRequest; -} + /// \brief Waypoint visualization markers + public: WaypointMarkers waypointMarkers{"station_keeping_marker"}; +}; ///////////////////////////////////////////////// StationkeepingScoringPlugin::StationkeepingScoringPlugin() @@ -235,10 +217,15 @@ void StationkeepingScoringPlugin::Configure(const sim::Entity &_entity, if (_sdf->HasElement("head_error_on")) this->dataPtr->headErrorOn = _sdf->Get("head_error_on"); - // if (_sdf->HasElement("markers")) - // { - // this->dataPtr->markers = true; - // } + if (_sdf->HasElement("markers")) + { + this->dataPtr->waypointMarkers.Load(_sdf->Clone()->GetElement("markers")); + if (!this->dataPtr->waypointMarkers.DrawMarker(0, + this->dataPtr->goalX, this->dataPtr->goalY, this->dataPtr->goalYaw)) + { + gzerr << "Error creating visual marker" << std::endl; + } + } } ////////////////////////////////////////////////// @@ -251,12 +238,6 @@ void StationkeepingScoringPlugin::PreUpdate( const sim::UpdateInfo &_info, ScoringPlugin::PreUpdate(_info, _ecm); - // Check to see if we need to publish the marker(s) - // if (this->dataPtr->markers) - // { - // this->dataPtr->AddMarker(); - // } - if (this->TaskState() == "finished") return; diff --git a/vrx_gz/src/WayfindingScoringPlugin.cc b/vrx_gz/src/WayfindingScoringPlugin.cc index a1a9f705c..8319e007d 100644 --- a/vrx_gz/src/WayfindingScoringPlugin.cc +++ b/vrx_gz/src/WayfindingScoringPlugin.cc @@ -200,7 +200,7 @@ void WayfindingScoringPlugin::Configure(const sim::Entity &_entity, for (const auto waypoint : this->dataPtr->localWaypoints) { if (!this->dataPtr->waypointMarkers.DrawMarker(markerId, waypoint.X(), - waypoint.Y(), waypoint.Z(), std::to_string(markerId))) + waypoint.Y(), waypoint.Z())) { gzerr << "Error creating visual marker" << std::endl; } diff --git a/vrx_gz/src/WaypointMarkers.cc b/vrx_gz/src/WaypointMarkers.cc index 50dd6c09a..05c6a7793 100644 --- a/vrx_gz/src/WaypointMarkers.cc +++ b/vrx_gz/src/WaypointMarkers.cc @@ -26,16 +26,13 @@ using namespace vrx; ///////////////////////////////////////////////// WaypointMarkers::WaypointMarkers(const std::string &_namespace) - : ns(_namespace), material("Gazebo/Red"), scaling{0.2, 0.2, 1.5}, height(4.0) + : ns(_namespace), scaling{0.2, 0.2, 1.5}, height(4.0) { } ///////////////////////////////////////////////// void WaypointMarkers::Load(const std::shared_ptr &_sdf) { - if (_sdf->HasElement("material")) - this->material = _sdf->Get("material"); - if (_sdf->HasElement("scaling")) this->scaling = _sdf->Get("scaling"); @@ -47,22 +44,27 @@ void WaypointMarkers::Load(const std::shared_ptr &_sdf) } ///////////////////////////////////////////////// -bool WaypointMarkers::DrawMarker(double _x, double _y, double _yaw, - const std::string &_text) +bool WaypointMarkers::DrawMarker(double _x, double _y, double _yaw) { - return this->DrawMarker(this->id++, _x, _y, _yaw, _text); + return this->DrawMarker(this->id++, _x, _y, _yaw); } ///////////////////////////////////////////////// bool WaypointMarkers::DrawMarker(int _markerId, double _x, double _y, - double _yaw, const std::string &_text) + double _yaw) { - //TODO: Fix below. The markers are not showing up. msgs::Marker markerMsg; markerMsg.set_ns(this->ns); markerMsg.set_action(msgs::Marker_Action_ADD_MODIFY); - msgs::Material *matMsg = markerMsg.mutable_material(); - matMsg->mutable_script()->set_name(this->material); + markerMsg.set_visibility(gz::msgs::Marker::GUI); + markerMsg.mutable_material()->mutable_ambient()->set_r(1); + markerMsg.mutable_material()->mutable_ambient()->set_g(1); + markerMsg.mutable_material()->mutable_ambient()->set_b(1); + markerMsg.mutable_material()->mutable_ambient()->set_a(1); + markerMsg.mutable_material()->mutable_diffuse()->set_r(1); + markerMsg.mutable_material()->mutable_diffuse()->set_g(1); + markerMsg.mutable_material()->mutable_diffuse()->set_b(1); + markerMsg.mutable_material()->mutable_diffuse()->set_a(1); // draw cylinder markerMsg.set_type(msgs::Marker_Type_CYLINDER); @@ -79,25 +81,9 @@ bool WaypointMarkers::DrawMarker(int _markerId, double _x, double _y, msgs::Set(markerMsg.mutable_scale(), this->scaling); msgs::Set(markerMsg.mutable_pose(), math::Pose3d( _x + cos(_yaw), _y + sin(_yaw), this->height + this->scaling.Z() / 2.0, - 0, M_PI/2, _yaw)); + 0, M_PI / 2, _yaw)); markerMsg.set_id((_markerId + 1) * 1000); result = node.Request("/marker", markerMsg); - if (!result) - return false; - // draw text -// if (!_text.empty()) -// { -// markerMsg.set_type(msgs::Marker_Type_TEXT); -// markerMsg.set_text(_text); -// msgs::Set(markerMsg.mutable_scale(), -// math::Vector3d(1.0, 1.0, 1.0)); -// msgs::Set(markerMsg.mutable_pose(), -// math::Pose3d(_x, _y - 0.2, -// this->height + this->scaling.Z() + 0.8, -// 0, 0, 0)); -// markerMsg.set_id((_markerId + 1) * 10000); -// result = node.Request("/marker", markerMsg); -// } return result; } diff --git a/vrx_gz/src/WaypointMarkers.hh b/vrx_gz/src/WaypointMarkers.hh index cd077d653..1a8649a97 100644 --- a/vrx_gz/src/WaypointMarkers.hh +++ b/vrx_gz/src/WaypointMarkers.hh @@ -27,11 +27,8 @@ namespace vrx { /// \brief This class is used to display waypoint markers. - /// Cylindrical Gazebo markers are drawn with text on top /// /// The marker properties can be set using sdf: - /// material: Optional parameter (string type) to specify the material - /// for marker. Default: Gazebo/Green /// scaling: Optional parameter (vector type) to specify marker scaling. /// Default: 0.2 0.2 1.5 /// height: Optional parameter (double type) height of marker above water. @@ -39,7 +36,6 @@ namespace vrx /// drawing markers without explicitly specifying ID. /// E.g. /// - /// Gazebo/Green /// 0.2 0.2 2.0 /// 0.5 /// @@ -59,31 +55,24 @@ namespace vrx /// \param[in] _x X coordinate of waypoint marker /// \param[in] _y Y coordinate of waypoint marker /// \param[in] _yaw orientation of waypoint marker in radians - /// \param[in] _text (optional) Text above waypoint marker /// \return Returns true if marker is successfully sent to Gazebo public: bool DrawMarker(int _markerId, double _x, double _y, - double _yaw, - const std::string &_text = ""); + double _yaw); /// \brief Draw a new waypoint marker in Gazebo /// \param[in] _x X coordinate of waypoint marker /// \param[in] _y Y coordinate of waypoint marker /// \param[in] _yaw orientation of waypoint marker in radians - /// \param[in] _text (optional) Text above waypoint marker /// \return Returns true if marker is successfully sent to Gazebo public: bool DrawMarker(double _x, double _y, - double _yaw, - const std::string &_text = ""); + double _yaw); /// \brief Namespace for Gazebo markers private: std::string ns; - /// \brief Name of Gazebo material for marker - private: std::string material; - /// \brief Scaling factor for cylinder marker private: gz::math::Vector3d scaling; @@ -93,7 +82,7 @@ namespace vrx /// \brief If an ID is not specified, the markers will start using this one. private: int id = 0; - /// \brief gazebo transport node + /// \brief Gazebo transport node private: gz::transport::Node node; }; } diff --git a/vrx_gz/src/vrx_gz/launch.py b/vrx_gz/src/vrx_gz/launch.py index d645a24c9..217c24cda 100644 --- a/vrx_gz/src/vrx_gz/launch.py +++ b/vrx_gz/src/vrx_gz/launch.py @@ -42,7 +42,10 @@ ] STATIONKEEPING_WORLDS = [ - 'stationkeeping_task' + 'stationkeeping_task', + 'practice_2022_stationkeeping0_task', + 'practice_2022_stationkeeping1_task', + 'practice_2022_stationkeeping2_task', ] WAYFINDING_WORLDS = [ diff --git a/vrx_gz/worlds/2022_practice/practice_2022_stationkeeping0_task.sdf b/vrx_gz/worlds/2022_practice/practice_2022_stationkeeping0_task.sdf new file mode 100644 index 000000000..ebc94d58d --- /dev/null +++ b/vrx_gz/worlds/2022_practice/practice_2022_stationkeeping0_task.sdf @@ -0,0 +1,593 @@ + + + + + + + 0.004 + 1.0 + + + + + + + + 3D View + false + docked + + + ogre2 + scene + 0.4 0.4 0.4 + 0.8 0.8 0.8 + -478.1 148.2 13.2 0 0.25 2.94 + + 0.25 + 10000 + + + + + + + floating + 5 + 5 + false + + + + + false + 5 + 5 + floating + false + + + + + false + 5 + 5 + floating + false + + + + + false + 5 + 5 + floating + false + + + + + false + 5 + 5 + floating + false + + + + + + + + + false + 5 + 5 + floating + false + + + + + false + 5 + 5 + floating + false + + + + + + + + + + false + 5 + 5 + floating + false + + + + + + + World control + false + false + 72 + 121 + 1 + + floating + + + + + + + true + true + true + true + + + + + + + World stats + false + false + 110 + 290 + 1 + + floating + + + + + + + true + true + true + true + + + + + + false + 0 + 0 + 250 + 50 + floating + false + #666666 + + + + + + + false + 250 + 0 + 150 + 50 + floating + false + #666666 + + + + + + + false + 0 + 50 + 250 + 50 + floating + false + #777777 + + + + false + + + + + + false + 250 + 50 + 50 + 50 + floating + false + #777777 + + + + + + + false + 300 + 50 + 50 + 50 + floating + false + #777777 + + + + true + true + 4000000 + + + + false + + + + + + docked_collapsed + + + + + + + docked_collapsed + + + + + + + docked_collapsed + + + + false + + + + + + + + + + ogre2 + true + + + + + + + + + + + + + + + + + + + false + 1.0 1.0 1.0 + 0.8 0.8 0.8 + + + + + EARTH_WGS84 + ENU + -33.724223 + 150.679736 + 0.0 + 0.0 + + + + true + 0 0 10 0 0 0 + 0.8 0.8 0.8 1 + 0.2 0.2 0.2 1 + + 1000 + 0.9 + 0.01 + 0.001 + + -0.5 0.1 -0.9 + + + + 0 0 0.2 0 0 0 + https://fuel.gazebosim.org/1.0/openrobotics/models/sydney_regatta + + + + Coast Waves + 0 0 0 0 0 0 + coast_waves + + + + platform + platform + + + + + post_0 + -535.916809 154.362869 0.675884 -0.17182 0.030464 -0.005286 + https://fuel.gazebosim.org/1.0/openrobotics/models/post + + + post_1 + -527.48999 153.854782 0.425844 -0.1365 0 0 + https://fuel.gazebosim.org/1.0/openrobotics/models/post + + + post_2 + -544.832825 156.671951 0.499025 -0.162625 0 0 + https://fuel.gazebosim.org/1.0/openrobotics/models/post + + + + + -531.063721 147.668579 1.59471 -0.068142 0 -0.1 + https://fuel.gazebosim.org/1.0/openrobotics/models/antenna + + + + + ground_station_0 + -540.796448 146.493744 1.671421 -0.00834 0.01824 1.301726 + https://fuel.gazebosim.org/1.0/openrobotics/models/ground_station + + + ground_station_1 + -537.622681 145.827896 1.681931 -0.00603 0.018667 1.301571 + https://fuel.gazebosim.org/1.0/openrobotics/models/ground_station + + + ground_station_2 + -534.550537 144.910400 1.720474 -0.004994 0.020798 1.301492 + https://fuel.gazebosim.org/1.0/openrobotics/models/ground_station + + + + + blue_projectile + -545 60 0.03 0 0 0 + blue_projectile + + 1000 + 0.0 + 25.0 + 2.0 + + link + 0 0 -0.02 0 0 0 + + + 0.0285 + + + + + /vrx/wavefield/parameters + + + + + + 0 0 0 + + + + + 1 + + + 10 + + 0.05 + 60 + + + 0 + 0.0002 + + + + 30 + + 5 + 20 + + + 0 + 0.03 + + + + + + 0 + 0.03 + + + + + + + + params { + key: "amplitude" + value { + type: DOUBLE + double_value: 0 + } + } + params { + key: "angle" + value { + type: DOUBLE + double_value: 0.4 + } + } + params { + key: "cell_count" + value { + type: VECTOR3D + vector3d_value { + x: 300 + y: 300 + } + } + } + params { + key: "direction" + value { + type: VECTOR3D + vector3d_value { + x: 1 + } + } + } + params { + key: "gain" + value { + type: DOUBLE + double_value: 0.2 + } + } + params { + key: "model" + value { + type: STRING + string_value: "PMS" + } + } + params { + key: "number" + value { + type: INT32 + int_value: 3 + } + } + params { + key: "period" + value { + type: DOUBLE + double_value: 5 + } + } + params { + key: "phase" + value { + type: DOUBLE + double_value: 0 + } + } + params { + key: "scale" + value { + type: DOUBLE + double_value: 1.1 + } + } + params { + key: "size" + value { + type: VECTOR3D + vector3d_value { + x: 6000 + y: 6000 + } + } + } + params { + key: "steepness" + value { + type: DOUBLE + double_value: 0 + } + } + params { + key: "tau" + value { + type: DOUBLE + double_value: 2 + } + } + + + + + + wamv + station_keeping + /vrx/task/info + 10 + 10 + 300 + /vrx/release + + -33.722718 150.674031 0 + + 0.2 0.2 2.0 + 0.5 + + + + + diff --git a/vrx_gz/worlds/2022_practice/practice_2022_stationkeeping1_task.sdf b/vrx_gz/worlds/2022_practice/practice_2022_stationkeeping1_task.sdf new file mode 100644 index 000000000..60da52450 --- /dev/null +++ b/vrx_gz/worlds/2022_practice/practice_2022_stationkeeping1_task.sdf @@ -0,0 +1,593 @@ + + + + + + + 0.004 + 1.0 + + + + + + + + 3D View + false + docked + + + ogre2 + scene + 0.4 0.4 0.4 + 0.8 0.8 0.8 + -478.1 148.2 13.2 0 0.25 2.94 + + 0.25 + 10000 + + + + + + + floating + 5 + 5 + false + + + + + false + 5 + 5 + floating + false + + + + + false + 5 + 5 + floating + false + + + + + false + 5 + 5 + floating + false + + + + + false + 5 + 5 + floating + false + + + + + + + + + false + 5 + 5 + floating + false + + + + + false + 5 + 5 + floating + false + + + + + + + + + + false + 5 + 5 + floating + false + + + + + + + World control + false + false + 72 + 121 + 1 + + floating + + + + + + + true + true + true + true + + + + + + + World stats + false + false + 110 + 290 + 1 + + floating + + + + + + + true + true + true + true + + + + + + false + 0 + 0 + 250 + 50 + floating + false + #666666 + + + + + + + false + 250 + 0 + 150 + 50 + floating + false + #666666 + + + + + + + false + 0 + 50 + 250 + 50 + floating + false + #777777 + + + + false + + + + + + false + 250 + 50 + 50 + 50 + floating + false + #777777 + + + + + + + false + 300 + 50 + 50 + 50 + floating + false + #777777 + + + + true + true + 4000000 + + + + false + + + + + + docked_collapsed + + + + + + + docked_collapsed + + + + + + + docked_collapsed + + + + false + + + + + + + + + + ogre2 + true + + + + + + + + + + + + + + + + + + + false + 1.0 1.0 1.0 + 0.8 0.8 0.8 + + + + + EARTH_WGS84 + ENU + -33.724223 + 150.679736 + 0.0 + 0.0 + + + + true + 0 0 10 0 0 0 + 0.8 0.8 0.8 1 + 0.2 0.2 0.2 1 + + 1000 + 0.9 + 0.01 + 0.001 + + -0.5 0.1 -0.9 + + + + 0 0 0.2 0 0 0 + https://fuel.gazebosim.org/1.0/openrobotics/models/sydney_regatta + + + + Coast Waves + 0 0 0 0 0 0 + coast_waves + + + + platform + platform + + + + + post_0 + -535.916809 154.362869 0.675884 -0.17182 0.030464 -0.005286 + https://fuel.gazebosim.org/1.0/openrobotics/models/post + + + post_1 + -527.48999 153.854782 0.425844 -0.1365 0 0 + https://fuel.gazebosim.org/1.0/openrobotics/models/post + + + post_2 + -544.832825 156.671951 0.499025 -0.162625 0 0 + https://fuel.gazebosim.org/1.0/openrobotics/models/post + + + + + -531.063721 147.668579 1.59471 -0.068142 0 -0.1 + https://fuel.gazebosim.org/1.0/openrobotics/models/antenna + + + + + ground_station_0 + -540.796448 146.493744 1.671421 -0.00834 0.01824 1.301726 + https://fuel.gazebosim.org/1.0/openrobotics/models/ground_station + + + ground_station_1 + -537.622681 145.827896 1.681931 -0.00603 0.018667 1.301571 + https://fuel.gazebosim.org/1.0/openrobotics/models/ground_station + + + ground_station_2 + -534.550537 144.910400 1.720474 -0.004994 0.020798 1.301492 + https://fuel.gazebosim.org/1.0/openrobotics/models/ground_station + + + + + blue_projectile + -545 60 0.03 0 0 0 + blue_projectile + + 1000 + 0.0 + 25.0 + 2.0 + + link + 0 0 -0.02 0 0 0 + + + 0.0285 + + + + + /vrx/wavefield/parameters + + + + + + 1 0 0 + + + + + 1 + + + 10 + + 0.05 + 60 + + + 0 + 0.0002 + + + + 30 + + 5 + 20 + + + 0 + 0.03 + + + + + + 0 + 0.03 + + + + + + + + params { + key: "amplitude" + value { + type: DOUBLE + double_value: 0 + } + } + params { + key: "angle" + value { + type: DOUBLE + double_value: 0.4 + } + } + params { + key: "cell_count" + value { + type: VECTOR3D + vector3d_value { + x: 300 + y: 300 + } + } + } + params { + key: "direction" + value { + type: VECTOR3D + vector3d_value { + x: 1 + } + } + } + params { + key: "gain" + value { + type: DOUBLE + double_value: 0.5 + } + } + params { + key: "model" + value { + type: STRING + string_value: "PMS" + } + } + params { + key: "number" + value { + type: INT32 + int_value: 3 + } + } + params { + key: "period" + value { + type: DOUBLE + double_value: 5 + } + } + params { + key: "phase" + value { + type: DOUBLE + double_value: 0 + } + } + params { + key: "scale" + value { + type: DOUBLE + double_value: 1.1 + } + } + params { + key: "size" + value { + type: VECTOR3D + vector3d_value { + x: 6000 + y: 6000 + } + } + } + params { + key: "steepness" + value { + type: DOUBLE + double_value: 0 + } + } + params { + key: "tau" + value { + type: DOUBLE + double_value: 2 + } + } + + + + + + wamv + station_keeping + /vrx/task/info + 10 + 10 + 300 + /vrx/release + + -33.72267 150.67406 2.0 + + 0.2 0.2 2.0 + 0.5 + + + + + diff --git a/vrx_gz/worlds/2022_practice/practice_2022_stationkeeping2_task.sdf b/vrx_gz/worlds/2022_practice/practice_2022_stationkeeping2_task.sdf new file mode 100644 index 000000000..41fce5580 --- /dev/null +++ b/vrx_gz/worlds/2022_practice/practice_2022_stationkeeping2_task.sdf @@ -0,0 +1,593 @@ + + + + + + + 0.004 + 1.0 + + + + + + + + 3D View + false + docked + + + ogre2 + scene + 0.4 0.4 0.4 + 0.8 0.8 0.8 + -478.1 148.2 13.2 0 0.25 2.94 + + 0.25 + 10000 + + + + + + + floating + 5 + 5 + false + + + + + false + 5 + 5 + floating + false + + + + + false + 5 + 5 + floating + false + + + + + false + 5 + 5 + floating + false + + + + + false + 5 + 5 + floating + false + + + + + + + + + false + 5 + 5 + floating + false + + + + + false + 5 + 5 + floating + false + + + + + + + + + + false + 5 + 5 + floating + false + + + + + + + World control + false + false + 72 + 121 + 1 + + floating + + + + + + + true + true + true + true + + + + + + + World stats + false + false + 110 + 290 + 1 + + floating + + + + + + + true + true + true + true + + + + + + false + 0 + 0 + 250 + 50 + floating + false + #666666 + + + + + + + false + 250 + 0 + 150 + 50 + floating + false + #666666 + + + + + + + false + 0 + 50 + 250 + 50 + floating + false + #777777 + + + + false + + + + + + false + 250 + 50 + 50 + 50 + floating + false + #777777 + + + + + + + false + 300 + 50 + 50 + 50 + floating + false + #777777 + + + + true + true + 4000000 + + + + false + + + + + + docked_collapsed + + + + + + + docked_collapsed + + + + + + + docked_collapsed + + + + false + + + + + + + + + + ogre2 + true + + + + + + + + + + + + + + + + + + + false + 1.0 1.0 1.0 + 0.8 0.8 0.8 + + + + + EARTH_WGS84 + ENU + -33.724223 + 150.679736 + 0.0 + 0.0 + + + + true + 0 0 10 0 0 0 + 0.8 0.8 0.8 1 + 0.2 0.2 0.2 1 + + 1000 + 0.9 + 0.01 + 0.001 + + -0.5 0.1 -0.9 + + + + 0 0 0.2 0 0 0 + https://fuel.gazebosim.org/1.0/openrobotics/models/sydney_regatta + + + + Coast Waves + 0 0 0 0 0 0 + coast_waves + + + + platform + platform + + + + + post_0 + -535.916809 154.362869 0.675884 -0.17182 0.030464 -0.005286 + https://fuel.gazebosim.org/1.0/openrobotics/models/post + + + post_1 + -527.48999 153.854782 0.425844 -0.1365 0 0 + https://fuel.gazebosim.org/1.0/openrobotics/models/post + + + post_2 + -544.832825 156.671951 0.499025 -0.162625 0 0 + https://fuel.gazebosim.org/1.0/openrobotics/models/post + + + + + -531.063721 147.668579 1.59471 -0.068142 0 -0.1 + https://fuel.gazebosim.org/1.0/openrobotics/models/antenna + + + + + ground_station_0 + -540.796448 146.493744 1.671421 -0.00834 0.01824 1.301726 + https://fuel.gazebosim.org/1.0/openrobotics/models/ground_station + + + ground_station_1 + -537.622681 145.827896 1.681931 -0.00603 0.018667 1.301571 + https://fuel.gazebosim.org/1.0/openrobotics/models/ground_station + + + ground_station_2 + -534.550537 144.910400 1.720474 -0.004994 0.020798 1.301492 + https://fuel.gazebosim.org/1.0/openrobotics/models/ground_station + + + + + blue_projectile + -545 60 0.03 0 0 0 + blue_projectile + + 1000 + 0.0 + 25.0 + 2.0 + + link + 0 0 -0.02 0 0 0 + + + 0.0285 + + + + + /vrx/wavefield/parameters + + + + + + 0 2 0 + + + + + 1 + + + 10 + + 0.05 + 60 + + + 0 + 0.0002 + + + + 30 + + 5 + 20 + + + 0 + 0.03 + + + + + + 0 + 0.03 + + + + + + + + params { + key: "amplitude" + value { + type: DOUBLE + double_value: 0 + } + } + params { + key: "angle" + value { + type: DOUBLE + double_value: 0.4 + } + } + params { + key: "cell_count" + value { + type: VECTOR3D + vector3d_value { + x: 300 + y: 300 + } + } + } + params { + key: "direction" + value { + type: VECTOR3D + vector3d_value { + x: 1 + } + } + } + params { + key: "gain" + value { + type: DOUBLE + double_value: 0.8 + } + } + params { + key: "model" + value { + type: STRING + string_value: "PMS" + } + } + params { + key: "number" + value { + type: INT32 + int_value: 3 + } + } + params { + key: "period" + value { + type: DOUBLE + double_value: 5 + } + } + params { + key: "phase" + value { + type: DOUBLE + double_value: 0 + } + } + params { + key: "scale" + value { + type: DOUBLE + double_value: 1.1 + } + } + params { + key: "size" + value { + type: VECTOR3D + vector3d_value { + x: 6000 + y: 6000 + } + } + } + params { + key: "steepness" + value { + type: DOUBLE + double_value: 0 + } + } + params { + key: "tau" + value { + type: DOUBLE + double_value: 2 + } + } + + + + + + wamv + station_keeping + /vrx/task/info + 10 + 10 + 300 + /vrx/release + + -33.7226643 150.673947 -1.0 + + 0.2 0.2 2.0 + 0.5 + + + + + diff --git a/vrx_gz/worlds/stationkeeping_task.sdf b/vrx_gz/worlds/stationkeeping_task.sdf index ff46a368d..f944503c3 100644 --- a/vrx_gz/worlds/stationkeeping_task.sdf +++ b/vrx_gz/worlds/stationkeeping_task.sdf @@ -637,8 +637,10 @@ /vrx/release -33.722718 150.674031 0 - - + + 0.2 0.2 2.0 + 0.5 + diff --git a/vrx_gz/worlds/wayfinding_task.sdf b/vrx_gz/worlds/wayfinding_task.sdf index 2075a51fa..9ed7d4f4f 100644 --- a/vrx_gz/worlds/wayfinding_task.sdf +++ b/vrx_gz/worlds/wayfinding_task.sdf @@ -645,8 +645,8 @@ - 0.2 0.2 2.0 - 0.5 + 0.2 0.2 2.0 + 0.5 /vrx/task/info