resibots / libdynamixel

C++ interface to the dynamixel actuators
GNU General Public License v2.0
9 stars 15 forks source link

How to use bulk_read in dynamixel_control_hw? #50

Open naoki-mizuno opened 6 years ago

naoki-mizuno commented 6 years ago

I've been trying to implement bulk_read in dynamixel_control_hw, but couldn't figure out how to use the newly implemented methods.

I'm trying to create a BulkRead instruction packet (somewhere in read_joints) using get_##Name, but since DynamixelHardwareInterface only has access to its member variables of type BaseServo, I'm not sure if it's possible to use get_present_position(std::vector<id_t>) and get_present_speed(std::vector<id_t>), which are defined in Servo<Model>, the derived class of BaseServo.

If you could give me some pointers on how I can work this around, it would be great!

dogoepp commented 6 years ago

I'm working on it. I think I should add the virtual method to BaseServo.