Interpolated Position mode not producing motion
Hello all. I am attempting to run my controller in IP mode using ros-canopen but the motor fails to start motion. I am using a joint_trajectory_controller to command the controller. The controller works as expected in PP and PV modes.
I am troubleshooting by publishing the object 60C1sub1 (interpolation data record) and 6062 (Position demand value).
In PP mode, object 607A updates and 6062 updates to reflect the commanded postion shortly after. The motor moves, as expected.
In IP mode, 60C1sub1 updates as expected when a trajectory is commanded via the joint_trajectory_controller topic interface, however, 6062 does not update, and consequently, the motor never moves.
I attempted to change the RPDO transmission type of 60C1sub1 from FF to 01. Both produce the same result however.
I am using a SYNC interval of 10 ms, and i have the interpolation time period set to 10 ms as well. I tried raising it to 50 ms, but that does not change the result.
To add, i am publishing the control word and status words using the SDO troubleshooting mechanism provided by ros-canopen (6040! and 6041!). Bit 4 in the control word, which activaltes the interpolation seems to be set. Bit 12 in the status word, which indicates interpolation active/inactive, is never set. So it seems that setting the interpolation to active is being a problem. Interestingly, the target reached bit is always set... Would this be preventing motion? Also, i tried running it through the action interface, via the terminal by publishing to /goal topic, and the goal status reported is 1 active, then 3 succeeded... but the motor never moves as the position demand value never changes. how can the trajectory controller report success if the joint_states never indicated that? that seems weird. could it be transmission types of PDO's?
I am able to run IP Mode via the software of the manufacturer. The only difference i perceive is that in that software, i am writing 1 value to the data record that is very far from the current value, the controller does the interpolation and goes there. However, through ROS, i am writing the values on a ramp via the traj controller and so overwriting the value constantly. This shouldn't be a problem tho, could it be...?
The maximum buffer size of the controller i am using is 1. Could this be an issue?
Essentially, when the drive initializes, it sets bit4 in control word, which is correct, but bit 12 in status word,which indicates that ip mode is active, is never set ...
See below the terminal output of the statusword, control word, and mode display, as printed using the periodic printing provided by ros-canopen for debugging. The init service is called, and the following is outputted:
Status Control Mode Display
data: 38455 data: 271 data: 6 #Operation Enabled, Interpolation active
data: 38455 data: 271 data: 6
data: 38455 data: 271 data: 6
data: 38455 data: 271 data: 6
data: 38455 data: 271 data: 6
data ...