File tree Expand file tree Collapse file tree 1 file changed +4
-12
lines changed Expand file tree Collapse file tree 1 file changed +4
-12
lines changed Original file line number Diff line number Diff line change @@ -1160,18 +1160,10 @@ bool MujocoSystemInterface::set_override_start_positions(const std::string& over
11601160 return false ;
11611161 }
11621162
1163- for (size_t i = 0 ; i < qpos.size (); i++)
1164- {
1165- mj_data_->qpos [i] = qpos[i];
1166- }
1167- for (size_t i = 0 ; i < qvel.size (); i++)
1168- {
1169- mj_data_->qvel [i] = qvel[i];
1170- }
1171- for (size_t i = 0 ; i < ctrl.size (); i++)
1172- {
1173- mj_data_->ctrl [i] = ctrl[i];
1174- }
1163+ // copy data from the input information into the mj_data_ object
1164+ std::copy (qpos.begin (), qpos.end (), mj_data_->qpos );
1165+ std::copy (qvel.begin (), qvel.end (), mj_data_->qvel );
1166+ std::copy (ctrl.begin (), ctrl.end (), mj_data_->ctrl );
11751167
11761168 return true ;
11771169}
You can’t perform that action at this time.
0 commit comments