diff --git a/mara_gazebo_plugins/src/mara_gazebo_joint_plugin.cpp b/mara_gazebo_plugins/src/mara_gazebo_joint_plugin.cpp index a90a4e8..f22f727 100644 --- a/mara_gazebo_plugins/src/mara_gazebo_joint_plugin.cpp +++ b/mara_gazebo_plugins/src/mara_gazebo_joint_plugin.cpp @@ -401,14 +401,21 @@ void MARAGazeboPluginRos::Load(gazebo::physics::ModelPtr _model, sdf::ElementPtr void MARAGazeboPluginRos::Reset() { - + impl_->trajectories_position_axis1.clear(); + impl_->trajectories_velocities_axis1.clear(); + impl_->trajectories_position_axis2.clear(); + impl_->trajectories_velocities_axis2.clear(); + impl_->executing_axis1 = false; + impl_->executing_axis2 = false; + impl_->index_trajectory_axis1 = 0; + impl_->index_trajectory_axis2 = 0; + impl_->goal_position_axis1_rad = 0; + impl_->goal_position_axis2_rad = 0; } void MARAGazeboPluginRosPrivate::OnUpdate(const gazebo::common::UpdateInfo & _info) { - double seconds_since_last_update = (_info.simTime - last_update_time_).Double(); - if(!executing_axis1 && trajectories_position_axis1.size()>0){ index_trajectory_axis1 = 0; executing_axis1 = true;