ros_canopen: how to change initialization

asked 2019-10-02 08:03:28 -0600

simons gravatar image

Hello, we try to use the ros_canopen package on ros melodic (Ubuntu 18.04) with our nanotec motor (PD4-CB59M024035-E-08). We got the .eds from nanotec (package download here) and checked for mapping errors and that nothing is mapped twice. We are able to roslaunch our motor node without errors. But when we try to rosservice call the init, we are not able to turn the motor. If we change the drive mode manually to velocity mode (2), we are able to bypass that error. After rosservice calling again, the motors turns a bit and shows in the candump that the actual value is changing. After a while we get the error

success: False
message: "Mode switch timed out.; Could not enter homing mode"

We did not define the homing mode at any of our .yaml files. Homing is supported by the motor controller (according to their manual).

Because I still do not understand the initialization process of the service, I'd like to ask you, in which file we can find the procedure of initialization so we can bypass the homing mode and also set our operations mode (0x6060) to velocity mode.,So we don't have to do it manually before initializing. Thanks

edit retag flag offensive close merge delete


Have you solved the problem with the homing function? In your other question you wrote that you are able to initialize the Nanotec driver.

jknip gravatar image jknip  ( 2020-01-15 09:20:51 -0600 )edit

Yes, we solved the problem by changing the Homing Method ("6098": "34") and changing the Supported Drive Modes ("6502": "0x000003CF"). with dcf_overlay in our driver.yaml

We then got the "transition timeout" error, which is solved by manually changing (with canopencomm) the Mode of Operation in 6060h to velocity mode (0x02). So we still don't know how and where to change the initialization, so we don't need to change the Mode of Operation manually.

simons gravatar image simons  ( 2020-01-15 09:52:58 -0600 )edit