Commit 2b86e0f6 authored by Paul Rouanet's avatar Paul Rouanet
Browse files

Delete t and dt from stop()

parent 16edfe1e
...@@ -536,16 +536,12 @@ return_type SystemBoltHardware::stop() ...@@ -536,16 +536,12 @@ return_type SystemBoltHardware::stop()
// Put torques to 0.0 // Put torques to 0.0
Eigen::Vector6d torques; Eigen::Vector6d torques;
double t = 0.0;
double dt = 0.001;
std::chrono::time_point<std::chrono::system_clock> last = std::chrono::system_clock::now(); std::chrono::time_point<std::chrono::system_clock> last = std::chrono::system_clock::now();
while (!robot_->IsTimeout()) { while (!robot_->IsTimeout()) {
last = std::chrono::system_clock::now(); // last+dt would be better last = std::chrono::system_clock::now(); // last+dt would be better
t += dt;
for (const hardware_interface::ComponentInfo & joint : info_.joints) { for (const hardware_interface::ComponentInfo & joint : info_.joints) {
torques[joint_name_to_motor_nb_[joint.name]] = 0.0; torques[joint_name_to_motor_nb_[joint.name]] = 0.0;
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment