Skip to content
Draft
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
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ class GazeboSimROS2ControlPlugin
: public sim::System,
public sim::ISystemConfigure,
public sim::ISystemPreUpdate,
public sim::ISystemPostUpdate
public sim::ISystemPostUpdate,
public sim::ISystemReset
{
public:
/// \brief Constructor
Expand All @@ -54,6 +55,10 @@ class GazeboSimROS2ControlPlugin
const sim::UpdateInfo & _info,
const sim::EntityComponentManager & _ecm) override;

void Reset(
const gz::sim::UpdateInfo & _info,
gz::sim::EntityComponentManager & _ecm) override;

private:
/// \brief Private data pointer.
std::unique_ptr<GazeboSimROS2ControlPluginPrivate> dataPtr;
Expand Down
11 changes: 11 additions & 0 deletions gz_ros2_control/src/gz_ros2_control_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,16 @@ GazeboSimROS2ControlPlugin::~GazeboSimROS2ControlPlugin()
this->dataPtr->thread_executor_spin_.join();
}

//////////////////////////////////////////////////
void GazeboSimROS2ControlPlugin::Reset(
const gz::sim::UpdateInfo &/*_info*/,
gz::sim::EntityComponentManager &/*_ecm*/)
{
RCLCPP_ERROR(
this->dataPtr->node_->get_logger(),
"Resetting gz_ros2_control plugin");
}

//////////////////////////////////////////////////
void GazeboSimROS2ControlPlugin::Configure(
const sim::Entity & _entity,
Expand Down Expand Up @@ -541,4 +551,5 @@ GZ_ADD_PLUGIN(
gz::sim::System,
gz_ros2_control::GazeboSimROS2ControlPlugin::ISystemConfigure,
gz_ros2_control::GazeboSimROS2ControlPlugin::ISystemPreUpdate,
gz_ros2_control::GazeboSimROS2ControlPlugin::ISystemReset,
gz_ros2_control::GazeboSimROS2ControlPlugin::ISystemPostUpdate)
Loading