Control trinamic servo drive using ros_canopen, error: Could not set transition

asked 2023-04-11 08:38:14 -0500

nigelbrucekhan gravatar image

updated 2023-05-02 08:09:19 -0500

Hi, I am trying to use the following tutorial (http://wiki.ros.org/ros_canopen/Tutor...) to run a motor(QMot QBL4208 family - BLDC) using Trinamic TMCM-1636 servo drive(link: https://www.trinamic.com/products/mod...). To keep things simple I didnt change the name of the package and left it as "epos4_canopen" and left the name "maxon" as it was. I am not using a maxon motor drive.

my rosdistro is: noetic, rosversion: 1.15.15

My files, including the candump and dcf files, are located here: https://github.com/nigel-bruce-khan/r...

I used the following guide to edit the eds file: https://www.trinamic.com/fileadmin/as....

From the tutorial at the top, when I run the following line, rosservice call /maxon/driver/init I get the error below:

success: False
message: "/home/nigel/catkin_ws/src/ros_canopen-noetic/canopen_master/include/canopen_master/objdict.h(496):\
\ Throw in function canopen::ObjectStorage::Entry<T> canopen::ObjectStorage::entry(const\
\ canopen::ObjectDict::Key&) [with T = short int]\nDynamic exception type: boost::wrapexcept<std::bad_cast>\n\
std::exception::what: std::bad_cast\n[canopen::tag_objectdict_key*] = 6071\n; Could\
\ not set transition"

And on the terminal with roslaunch epos4_canopen maxon_epos4.launch running, I see the error below when I run the rosservice call /maxon/driver/init command, seen above already:

auto-starting new master process[master]: started with pid [14675] ROS_MASTER_URI=http://localhost:11311 setting /run_id to 0e274dba-d864-11ed-95b4-9ff592fd9d67 process[rosout-1]: started with pid [14685] started core service [/rosout] process[maxon/canopen_motor-2]: started with pid [14693] process[maxon/controller_spawner-3]: started with pid [14694] 
[ INFO] [1681215977.260201393]: Using fixed control period: 1.000000000
[ INFO] [1681215983.927060334]: Initializing... 
[ INFO] [1681215983.927414235]: Current state: 1 device error: system:0 internal_error: 0 (OK)
[ INFO] [1681215983.927684087]: Current state: 2 device error: system:0 internal_error: 0 (OK)
[ WARN] [1681215986.033700874]: illegal transition 0 -> 2
[ INFO] [1681215986.034045603]: Current state: 2 device error: system:125 internal_error: 0 (OK)
[ INFO] [1681215986.034199377]: Current state: 0 device error: system:125 internal_error: 0 (OK)
[ INFO] [1681215986.034399236]: Current state: 0 device error: system:0 internal_error: 0 (OK)
[ INFO] [1681215986.034741540]: Current state: 0 device error: system:0 internal_error: 0 (OK)
[ERROR] [1681215986.035052640]: Initializing failed: /home/nigel/catkin_ws/src/ros_canopen-noetic/canopen_master/include/canopen_master/objdict.h(496): Throw in function canopen::ObjectStorage::Entry<T> canopen::ObjectStorage::entry(const canopen::ObjectDict::Key&) [with T = short int]
Dynamic exception type: boost::wrapexcept<std::bad_cast>
std::exception::what: std::bad_cast
[canopen::tag_objectdict_key*] = 6071
; Could not set transition

I have tried not mapping object 6071( Target torque ) in RxPDO 4. That results in the error below:

success: False
message: "/home/nigel/catkin_ws/src/ros_canopen-noetic/canopen_master/include/canopen_master/objdict.h(88):\
\ Throw in function const T& canopen::HoldAny::get() const [with T = canopen::NodeIdOffset<short\
\ int>]\nDynamic exception type: boost::wrapexcept<std::bad_cast>\nstd::exception::what:\
\ std::bad_cast\n; Could not set transition"

I tried changing the data type as suggested here (https://answers.ros.org/question/4063...) that resulted in the same error as the first one above. I could not find CANeds or something equivalent to check my ... (more)

edit retag flag offensive close merge delete