Ask Your Question
2

CANopen - Maxon MCD Epos Error 6061sub0

asked 2018-06-08 05:54:45 -0500

jdeleon gravatar image

updated 2018-06-12 04:29:33 -0500

Hi all, I'm trying to control the robot described in q#292882, as that question is more general about how to configure all the robot with canopen + ixxat adapter + maxon mcd. I'm openning this new question to try find solution to an specific error that more users say that they have.

At this point, I have configured the canopen node to launch the configuration for the 6 motors.

allow-hotplug can0
iface can0 can static
    bitrate 1000000
    up ip link set $IFACE txqueuelen 20 # uncomment if more than 4 nodes are used

In my launch file I launch the canopen_motor_node

<node ns="hexapodo" name="driver" pkg="canopen_motor_node" type="canopen_motor_node" output="screen" clear_params="true" launch-prefix="">
    <rosparam command="load" file="$(find canopen_chain_node)/config/canopen.yaml" />
</node>

When I try to init the motors (rosservice call /hexapodo/drive/init) I get the next error:

jorge@jorge-ubuntu:~$ rosservice call /hexapodo/driver/init 
success: False
message: "/home/jorge/WS/epos_ws/src/ros_canopen/canopen_master/src/pdo.cpp(359): Throw in\
  \ function void canopen::PDOMapper::Buffer::read(const canopen::ObjectDict::Entry&,\
  \ canopen::String&)\nDynamic exception type: boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<std::bad_cast>\
  \ >\nstd::exception::what: std::bad_cast\n[canopen::tag_objectdict_key*] = 6061sub0\n"

The 6061 code is refer to the "Modes of Operation Display"

I try to modify the register [6502] as @Edgar Carrasco told me here and @Mathias Lüdtke adding the default value:

[6502]
ParameterName=Supported Drive Modes
DataType=0x0007
AccessType=const
DefaultValue=0x003F0025
PDOMapping=0
ObjFlags=0x1
ParameterValue=0x003F0025

But the error persist.

Many thanks, Jorge


- - - Edit: I have generate a new DCF file from EPOS_UserInterface and paste @Mathias Lüdtke code, but now, the error is also in the service call:

success: False
message: "/home/jorge/WS/epos_ws/src/ros_canopen/canopen_master/src/pdo.cpp(359): Throw in\
  \ function void canopen::PDOMapper::Buffer::read(const canopen::ObjectDict::Entry&,\
  \ canopen::String&)\nDynamic exception type: boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<std::bad_cast>\
  \ >\nstd::exception::what: std::bad_cast\n[canopen::tag_objectdict_key*] = 6061sub0\n\
  ; Transition timeout"

And in the launch terminal:

[ERROR] [1528463248.261114363]: /home/jorge/WS/epos_ws/src/ros_canopen/canopen_master/src/pdo.cpp(359): Throw in function void canopen::PDOMapper::Buffer::read(const canopen::ObjectDict::Entry&, canopen::String&)
Dynamic exception type: boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<std::bad_cast> >
std::exception::what: std::bad_cast
[canopen::tag_objectdict_key*] = 6061sub0

If someone wnats to see the DCF files are in this repository. This is the chronology:

  1. MCDEpos_node_1.dcf
  2. motor_1_old.dcf
  3. motor_1.dcf
  4. Node_1.dcf

- - - Edit 2:

As @Mathias Lüdtke recommended me, I check the file with CANeds.

The result is 499 Errors and 41 Warnings detected.

I have upload the errors to the git.

Now, I will try to find how to solve all this errors and warnings.


- - - Edit 3:

I have compared my DCF file with this one.

And also try to copy the 6061sub0 paremeters. But when I launch the node, I have this error:

[ERROR] [1528795391.251278454]: /home/jorge/WS/epos_ws/src/ros_canopen/canopen_master/include/canopen_master/objdict.h(224): Throw in function const EntryConstSharedPtr& canopen::ObjectDict ...
(more)
edit retag flag offensive close merge delete

Comments

Your DCF contains a lot of objects with wrong object types, especially the PDO settings. Please fix all of them with CANeds.

Mathias Lüdtke gravatar imageMathias Lüdtke ( 2018-06-08 08:50:08 -0500 )edit

Thank you for your comment @Mathias Lüdtke. Which program for CANeds do you recommend? I used Vector CANeds, because it only shows a warning for:

[202E]
ParameterName=Trajectory Profile Time
DataType=7
AccessType=ro
PDOMapping=1
ObjFlags=3

Thank you

jdeleon gravatar imagejdeleon ( 2018-06-08 10:36:34 -0500 )edit

I am using CANeds 3.6 (works with wine) and your Node_1.dcf results in plenty of warnings (looks like one warning for each object). I am not sure if these are responsible for the problems.

Mathias Lüdtke gravatar imageMathias Lüdtke ( 2018-06-08 11:53:18 -0500 )edit

Thank you for the program @Mathias Lütke, the are a lot of errors and warnings!! I haveuploaded to git. Do you know if there is any template to try to solve the problems to the CANopen standard?

jdeleon gravatar imagejdeleon ( 2018-06-11 02:43:27 -0500 )edit

Hi jdeleon thx for your updates! I see a lot of differences between files MCDepos_node_1.dcf and Node_1.dcf, are you sure you haven't removed something that has propagated hundreds of errors ? I have a DCF file from an EPOS2 24/2 (made in EPOS Studio) and I get only 6 erros and 1 warning with CANeds

Cyril_J gravatar imageCyril_J ( 2018-06-12 05:24:29 -0500 )edit

6061sub0 should not exist in the EDS at all. (it is printed in the error message, but this is just an implementation detail)

Mathias Lüdtke gravatar imageMathias Lüdtke ( 2018-06-12 06:38:07 -0500 )edit

Hi @Cyril_J, I have talk with Maxon and generate a EDS file for just one motor. Here is the new file.

I check it with CANeds. When it open the file I have a lot of warning, but when I check the file I only have one warning the parameter 202E.

jdeleon gravatar imagejdeleon ( 2018-06-12 07:45:13 -0500 )edit

jedeleon, when I open your original DCF file MCDepos_node_1.dcf with CANeds, the only errors that exist are that many objects from the dictionary are set to mappable where they should not. I tried to go through all of them and uncheck the box "Object is mappable", and that solves all the errors.

Cyril_J gravatar imageCyril_J ( 2018-06-12 07:55:11 -0500 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2018-06-08 06:42:42 -0500

Mathias Lüdtke gravatar image

According to the error message

std::exception::what: std::bad_cast\n[canopen::tag_objectdict_key*] = 6061sub0

there is a problem with object 6061. As I have written somewhere else your EDS seems to list the wrong datatype. ros_canopen enforces strict typing. The CANopen 402 standard lists datatype "Integer8", so the EDS should look like

[6061]
ParameterName=modes_of_operation_display
ObjectType=0x7
DataType=0x0002
AccessType=ro
PDOMapping=1
edit flag offensive delete link more

Comments

Hi @Mathis Lüdtke, I copy your modification, but still the same error.

I don't know if there is any other option to generate a EDS/DCF file from a Maxon motor.

jdeleon gravatar imagejdeleon ( 2018-06-08 07:32:50 -0500 )edit

I don't have any experience with maxon. Are you getting the very same error? This should not happen with the updated EDS.

Mathias Lüdtke gravatar imageMathias Lüdtke ( 2018-06-08 08:06:33 -0500 )edit

I don't know if all the document has a different format of EDS files...

jdeleon gravatar imagejdeleon ( 2018-06-08 08:20:33 -0500 )edit

Your config looks okay, but there is a size mismatch. Please check PDO message in the candump.

Mathias Lüdtke gravatar imageMathias Lüdtke ( 2018-06-08 08:29:42 -0500 )edit

Could you explain me how to check it? I run candump can0, and I receive: can0 704 [1] 7F But when I try to connect there are a los of sequences, should be any specific? Thank you

jdeleon gravatar imagejdeleon ( 2018-06-08 08:33:59 -0500 )edit

You could upload the can log to gist.

Mathias Lüdtke gravatar imageMathias Lüdtke ( 2018-06-08 11:54:43 -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

2 followers

Stats

Asked: 2018-06-08 05:54:45 -0500

Seen: 208 times

Last updated: Jun 12 '18