neurobionics / TMotorCANControl

A python API to control AK-series TMotors over the CAN bus.
25 stars 21 forks source link

Does the servo mode work? #7

Open well-robotics opened 1 year ago

well-robotics commented 1 year ago

Hi, I have been running this repo using the MIT mode for AK 2.1 firmware motors. There were some small glitches but everything worked fine. I now switch to the servo mode. But it seems the current repo does not have the right servo_can.py file. Many functions are not implemented correctly. For example, def buffer_append_int16( buffer,number) has only two arguments, but when it is been called in comm_can_set_pos_spd, there arguments are put there. Would you update this repo? or are there something else I am missing?

omerts commented 1 year ago

We are also running into errors such as:

 line 414, in comm_can_set_duty
    self.send_servo_message(controller_id|(Servo_Params['CAN_PACKET_ID']['CAN_PACKET_SET_DUTY'] << 8), buffer, send_index)
NameError: name 'send_index' is not defined

Also, looked at the code itself it is missing the send_index definition.

jacknoahcaldwell commented 9 months ago

Am getting the same 'send_index' error, did you ever resolve this?

amanpereira9 commented 6 months ago

has anyone figured out the send_index error ? i am getting it as well

isuckatengineering commented 6 months ago

any updates ? Still trying to get this to work...