refactor(custom_robot): Remove unused method calls in destructor and stopTraj

- Deleted the Close method call for the recharge object in the CustomRobot destructor to simplify resource management.
- Removed the Stop method call for the traj_th_ thread in stopTraj, streamlining the stopping process of trajectory control.
This commit is contained in:
2025-09-23 19:25:39 +08:00
parent 9ac38382a3
commit f0e516a1a3

View File

@@ -143,7 +143,6 @@ CustomRobot::~CustomRobot() {
} }
if (recharge_) { if (recharge_) {
recharge_->Close();
recharge_.reset(); recharge_.reset();
} }
@@ -283,7 +282,6 @@ void CustomRobot::stopTraj()
LOG_INFO("Stopping dynamic trajectory control..."); LOG_INFO("Stopping dynamic trajectory control...");
traj_running_ = false; traj_running_ = false;
if (traj_th_) { if (traj_th_) {
traj_th_->Stop();
traj_th_.reset(); traj_th_.reset();
} }
} }