ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
2

Change a device state via "0x6041 Controlword"

asked 2021-11-29 04:25:42 -0600

martinlucan gravatar image

Hello, this question is a follow up of this question. After a successful initialization, the motor jumps to Operation enabled state and immediately transits to Switch On Disabled (transition 9) of unknown cause . The transitions are controllable via 0x6041 Controlword object in float format, for example, sending a command by following rosservice call should perform transition 3,4 and set the device to Operation Enabled.

    rosservice call /artaban_motor/driver/set_object "node: 'front_left_joint_2_skelet_segment_upper'
    object: '6041'
    value: '591'
    cached: true"

Unfortunately, the service with any Controlword value does not actually change a device state and is not reflected in Statusword change. Do I get this service functionality right? Is there any other way, how to force the device to change a state? I use Maxon Epos4 controller with IDX56M motor.

image description

image description

edit retag flag offensive close merge delete

Comments

Would it be possible to document your answer in the first question as it looks you successfully resolved?

osilva gravatar image osilva  ( 2021-11-29 06:42:41 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2021-12-02 11:18:09 -0600

Hi martinlucan, it seems that you try to set the Statusword read-only object. Your idexes are inverted: Controlword is 0x6040 and Statusword 0x6041.

I think something like this should work:

rosservice call /artaban_motor/driver/set_object front_left_joint_2_skelet_segment_upper '!!str 6040' '!!str 591' false
edit flag offensive delete link more

Comments

Thank you, you were actually, I somehow mixed up two objects. While addressing the right 6040 Controlword object, I have managed to reach the Operation enabled state, but just for a very short time period. The motor immediately transits back to its previous state. Do you have any clue what might force the device to do so?

Please find .dcf file in a link

martinlucan gravatar image martinlucan  ( 2021-12-06 08:12:35 -0600 )edit

Hi Martin, Looking at your DCF file, your PDO mapping is different than what ros_canopen expects, so this is most likely the issue. You need to redo the PDO mapping as follows:

RxPDO
- RxPDO1 1st object: Controlword (0x60400010)
- RxPDO1 2nd object: Target Velocity (0x60FF0020)
- RxPDO2 1st object: Target Position (0x607A0020)
- RxPDO2 2nd object: Profile Velocity (0x60810020)
- RxPDO3 1st object: Profile Acceleration (0x60830020)
- RxPDO3 2nd object: Profile Deceleration (0x60840020)
- RxPDO4 1st object: Target Torque  (0x60710010)
- RxPDO4 2nd object: Modes of Operation (0x60600008)
Cyril Jourdan gravatar image Cyril Jourdan  ( 2021-12-23 08:45:44 -0600 )edit

and TxPDO like this:

TxPDO
- TxPDO1 1st object: Statusword (0x60410010)
- TxPDO1 2nd object: Modes of Operation display (0x60610008)
- TxPDO2 1st object: Velocity demand value (0x606B0020)
- TxPDO2 2nd object: Velocity actual value (0x606C0020)
- TxPDO3 1st object: Position Actual value (0x60640020)
- TxPDO3 2nd object: Velocity actual value averaged (0x30D30120)

I made a tutorial and sample code for using maxon EPOS4 with ros_canopen here. Please have a look for further debugging and feel free to open a new question if needed. Let me know if that works.

Cyril Jourdan gravatar image Cyril Jourdan  ( 2021-12-23 08:51:07 -0600 )edit

Question Tools

3 followers

Stats

Asked: 2021-11-29 04:25:42 -0600

Seen: 291 times

Last updated: Dec 02 '21