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
......@@ -851,7 +851,7 @@ void CDynamixelMotorGroup::load_config(std::string &filename)
this->set_max_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;
for(i=1;i<this->servo_id.size();i++)
......
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