neobotix / neo_kinematics_omnidrive2

ROS 2 packages for kinematics of MPO-700
3 stars 4 forks source link

Wrong usage of CANopen protocol #20

Open neojaw opened 1 year ago

neojaw commented 1 year ago

The current code will not work with strictly CANopen compliant devices, e.g. Elmo Gold controllers.

padhupradheep commented 9 months ago

The CAN id should be 0x700 + node_id where node_id

That means, we are right now sending the heartbeat only to one motor controller right?

the PDO message must be disabled at the beginning and enabled at the end:

to avoid interruptions?

neojaw commented 9 months ago

The CAN id should be 0x700 + node_id where node_id

That means, we are right now sending the heartbeat only to one motor controller right?

No, right now we are not sending a valid heartbeat at all. A heartbeat message is always a broadcast message that is received and processed by all the nodes ("Hey everybody, I am node X and I am fine!"). The CAN ID has to be 0x700 + node_id so that the receivers know which node it came from. Right now we use CAN ID 0x700 which would mean a node ID of 0 which does not exist in CANopen.

the PDO message must be disabled at the beginning and enabled at the end:

to avoid interruptions?

No, because the protocol says so. It only worked all this time because the motor controllers we were using didn't care much about protocol compliance.