Ask Your Question

ros_canopen PDO mapping (Schneider Motor CiA 402)

asked 2021-04-26 05:19:42 -0500

robertjbush gravatar image

Hey guys,

I'm at a dead-end so in need of some help from the community, please. This question follows on from a closed GitHub issue on ros_canopen. My problem is as follows:

  • I'm unable to do a PDO re-map procedure using ros_canopen_master.
  • If I don't do the PDO re-map procedure the Schneider Lexium 28 controller does enable voltage but halts due to an error message: "PDO packet too long".

Some background data:

  1. Both EDS and DCF formats have been tried. Setting ParameterValue via CANeds, text file or dcf_overlay in driver.yaml makes no difference to the error. Looking at the source code in ros_canopen, the error seems to be that it tries to read an SDO which the package is not setup to do (bubbles up at object dictionary 1800sub1 but this doesn't seem to point to anything useful) but I am not asking it to read an SDO, just write to them in the devices pre-operational state so it can re-map the PDO.
  2. ros_canopen version 0.8.5
  3. TPDO & RPDO mappings as follows:

"1A00sub0": "2"
"1A00sub1": "0x60410010" ---------------- # statusword [2 bytes]
"1A00sub2": "0x60610008" ---------------- # modes of operation display [1 byte]
"1A01sub0": "1"
"1A01sub1": "0x60640020" ---------------- # actual position value [4 bytes]
"1600sub0: "2"
"1600sub1": "0x60400010" ---------------- # controlword [2 bytes]
"1600sub2": "0x60600008" ---------------- # modes of operation [1 byte]
"1601sub0": "1"
"1601sub1": "0x607a0020" ---------------- # target position [4 byte]

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted

answered 2021-04-30 15:00:08 -0500

robertjbush gravatar image

See this github issue (#425) for corrective action. Essentially comment out line 429 sdo.cpp but BEWARE not recommended by maintainer of package. A more permanent fix is being investigated.

edit flag offensive delete link more



miura gravatar image miura  ( 2021-04-30 21:56:50 -0500 )edit

answered 2021-04-27 10:37:15 -0500

The following values in the eds file may be wrong.( L1538 )


I have been able to get ros_canopen to work with the following values, though in a different environment.


( 384 = 0x180 )

edit flag offensive delete link more



Given the fact the linked file is over 8000 lines long, that's some nice sleuthing.

gvdhoorn gravatar image gvdhoorn  ( 2021-04-28 01:53:08 -0500 )edit

Thanks miura; I expect you went straight to 1800sub1. Unfortunately it didn't fix it. I subsequently tried with the value straight from the devices Object Dictionary using CANOpenNode (i.e. not using $NODEID+) but with no success. After yesterdays debugging I am now 100% sure that the issue is ros_canopen.

  • Im running my ros master on another machine in a docker and launching the canopen node via remote machine tags. The ros_canopen package is on both machines.
  • The canopen machine is a raspberry pi running noetic on stretch.

The root cause is compilation, implementation or source code. To be clear there is a closed github issue for this problem and I am currently trying to debug where exactly my question should be answered (here or as a github issue). The maintainers of ros_canopen believe here but I'm not convinced it is an issue from my side.

robertjbush gravatar image robertjbush  ( 2021-04-28 04:15:43 -0500 )edit

@miura: This is definitely an issue. Similar settings can be found for all other PDO. If I am not mistaken, this extra bit means RTR PDO, and I am not sure if this has been implemented (properly)..

Mathias Lüdtke gravatar image Mathias Lüdtke  ( 2021-04-28 05:11:12 -0500 )edit

Update: it means "NO RTR", which is fine as long as the transmission type is set correctly.

Mathias Lüdtke gravatar image Mathias Lüdtke  ( 2021-04-28 05:32:32 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2021-04-26 05:19:42 -0500

Seen: 153 times

Last updated: Apr 30