Skip to content
Snippets Groups Projects
Commit 7c66f044 authored by Sergi Hernandez's avatar Sergi Hernandez
Browse files

Solved a bug when trying to create a group with no servos.

parent 1ab0c27b
No related branches found
No related tags found
No related merge requests found
...@@ -851,7 +851,7 @@ void CDynamixelMotorGroup::load_config(std::string &filename) ...@@ -851,7 +851,7 @@ void CDynamixelMotorGroup::load_config(std::string &filename)
this->set_max_torque(i,motor->max_torque()); this->set_max_torque(i,motor->max_torque());
this->set_limit_torque(i,motor->max_torque()); this->set_limit_torque(i,motor->max_torque());
} }
if(this->config[0].min_angle==-this->info[0].center_angle && this->config[0].max_angle==-this->info[0].center_angle) if(cfg->dyn_motor_config().size()>0 && this->config[0].min_angle==-this->info[0].center_angle && this->config[0].max_angle==-this->info[0].center_angle)
{ {
this->mode=torque_ctrl; this->mode=torque_ctrl;
for(i=1;i<this->servo_id.size();i++) for(i=1;i<this->servo_id.size();i++)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment