dynamixel_hardware icon indicating copy to clipboard operation
dynamixel_hardware copied to clipboard

Understanding why you copy the joint_ids

Open brennand opened this issue 1 year ago • 1 comments

Just wondering why you have this code throughout this code:

  std::vector<uint8_t> ids(info_.joints.size(), 0);

  std::copy(joint_ids_.begin(), joint_ids_.end(), ids.begin());

As the joint_ids are assigned on the init and then not modified any where else in the code base?

brennand avatar Jul 25 '24 19:07 brennand

I had a look and I think you're right, there is no point in copying and we can use joint_ids_ directly. Would you be able to submit a PR with the changes?

ijnek avatar Aug 03 '24 21:08 ijnek