Robotics StackExchange | Archived questions

CANopen - Maxon MCD Epos Error 6061sub0

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 canopenmotornode

<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


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. MCDEposnode1.dcf
  2. motor1old.dcf
  3. motor_1.dcf
  4. Node_1.dcf

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.


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::at(const canopen::ObjectDict::Key&) const
Dynamic exception type: boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<std::out_of_range> >
std::exception::what: Unable to find key in unordered_map.
[canopen::tag_objectdict_key*] = 6061

[hexapodo/driver-2] process has died [pid 30493, exit code 1, cmd /home/jorge/WS/epos_ws/devel/lib/canopen_motor_node/canopen_motor_node __name:=driver __log:=/home/jorge/.ros/log/395043b8-6e22-11e8-a3a3-4ccc6a639f77/hexapodo-driver-2.log].
log file: /home/jorge/.ros/log/395043b8-6e22-11e8-a3a3-4ccc6a639f77/hexapodo-driver-2*.log

I don't know, if my motor doesn't accept this mode or action...

Asked by jdeleon on 2018-06-08 05:54:45 UTC

Comments

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

Asked by Mathias Lüdtke on 2018-06-08 08:50:08 UTC

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

Asked by jdeleon on 2018-06-08 10:36:34 UTC

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.

Asked by Mathias Lüdtke on 2018-06-08 11:53:18 UTC

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?

Asked by jdeleon on 2018-06-11 02:43:27 UTC

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

Asked by Cyril Jourdan on 2018-06-12 05:24:29 UTC

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

Asked by Mathias Lüdtke on 2018-06-12 06:38:07 UTC

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.

Asked by jdeleon on 2018-06-12 07:45:13 UTC

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.

Asked by Cyril Jourdan on 2018-06-12 07:55:11 UTC

@jdeleon, if you add it by hand at the [ManufacturerObjects], that is setting the SupportedObjects to 50 and adding at the end after the 49: 50=0x202E, it gets rid of the warning. Otherwise it is classified as unknown object.

Asked by Cyril Jourdan on 2018-06-12 08:19:33 UTC

Answers

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

Asked by Mathias Lüdtke on 2018-06-08 06:42:42 UTC

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.

Asked by jdeleon on 2018-06-08 07:32:50 UTC

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

Asked by Mathias Lüdtke on 2018-06-08 08:06:33 UTC

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

Asked by jdeleon on 2018-06-08 08:20:33 UTC

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

Asked by Mathias Lüdtke on 2018-06-08 08:29:42 UTC

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

Asked by jdeleon on 2018-06-08 08:33:59 UTC

You could upload the can log to gist.

Asked by Mathias Lüdtke on 2018-06-08 11:54:43 UTC