Closed clm330 closed 4 years ago
See the graph
Are you sure that the motor does not just drive into the wrong direction? Could you prepare a graph that steps the position up?
I try to set a delay at the rising delay
If you add a delay to handleWrite
, you prolong the communication cycle. These function should never block like this.
@ipa-mdl
Are you sure that the motor does not just drive into the wrong direction? Could you prepare a graph that steps the position up?
See this gragp.
I sent the position first time, but nothing happened.
It can prove that the driver always goes to the previous position.
This graph is candump -td about 401(mapping 0x607A
), I sent 3.3(1487) to 0x607A
.
Does time affect the program??
This is graph is candump -ta about 401.
This graph show sent control_word(201) less than one millisecond after sending position msg.
According to the figure above, the total time to send the position is 98 ms.
Can the driver receive the position correctly msg before running the command?
If you add a delay to handleWrite, you prolong the communication cycle. These function should never block like this.
About delay.
Sometime I found 0x6040
rising delay before position cmd 0x607A
changed.
I think it may be that when the position information is rising delay(0x6064), 0x607A has not received the latest location information, so the driver always runs to the previous position. Can I add a delay to control_word (0x6040) for bebug ? If can add, where I should add a delay in source code?
In velocity mode, I find similar phenomenon. I set interval_ms to 500. See the graph.
The actual velocity 0x606C
begen to change from 0 after two time interval_ms, even if set interval_ms to shorter time interval.
Is this problem same with the above?
Set the Transmission type to 255, it works normally.
When I sent position command to driver in position mode, the motor always rotate to previous position set on 0x607A.
ros-canopen version: kinetic
controller:joint_state_controller/JointStateController
Graph: See the graph. When 0x6040 rising delay, the driver always run to previous position.![Screenshot from 2019-12-22 16-14-15](https://user-images.githubusercontent.com/6710845/71319331-dc406e00-24d7-11ea-8b2f-98084cd6ce51.png)
It seems when rising delay, the 0x607A still not update. I try to set a delay at the rising delay to solve this problem but it seems no effect.
cpp file: canopen_402/src/motor.cpp function: Motor402::handleWrite(LayerStatus &status, const LayerState ¤t_state)
Maybe I added the delay in the wrong place, can tell me where to add the delay. It may help debug. Thanks.