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

ros_canopen vel_from_device: (obj606C) issue

asked 2019-08-15 08:05:53 -0500

akosodry gravatar image

updated 2019-08-15 08:12:03 -0500

Hello,

i am using the ros_canopen package to communicate with a BGE 6010 controller manufactured by Dunkermotoren.

My problem is that the manufacturer did not implement 606C object in their controller. (i contacted them and they confirmed)

So in the configuration yaml file the following line gives error:

vel_from_device: "(obj606C)*2*pi/60"

Error string:

abort606c#0, reason: Object does not exist in the object dictionary.

Instead of the 606C object, the controller provides the object: 3A04.01h, which is also the velocity measurement in rpm. Unfortunately, if i put

vel_from_device: "(obj3A04)*2*pi/60"

then i get the error:

[ERROR] [1565873540.254325002]: Could not find variable 'obj3A04', reason: /opt/ros/kinetic/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*] = 3a04

Is there any workaround to solve this issue?

Remark: I map the aforementioned actual velocity to PDO as:

   "1A01sub0": "2" #
    "1A01sub1": "0x60640020" #            
    "1A01sub2": "0x3A040120" #

Thanks in advance.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
2

answered 2019-08-15 10:55:42 -0500

Mathias Lüdtke gravatar image

updated 2019-08-15 16:47:31 -0500

Unfortunately, if i put vel_from_device: "(obj3A04)2pi/60" then i get the error:

It looks like 3A04 is a struct/record. In this case you cannot use it as a variable.

3A04.01h which is also the velocity measurement in rpm

Try something like

vel_from_device: "obj3A04sub1*2*pi/60"

(sub1 corresponds to .01h.)

edit flag offensive delete link more

Comments

@Mathias Lüdtke thank you for the help! I will try it tomorrow and come back here. However i don't get the formula you recommended: 2*pi/obj3A04sub1.

If i understand correctly: obj3A04sub1 gives the velocity in RPM, then it is converted into SI (rad/sec) by multiplying it by 2*pi/60, not? I dont get why did you use the inverse?

akosodry gravatar image akosodry  ( 2019-08-15 12:03:58 -0500 )edit

Yep, you're right, I was somehow mistaken.

Mathias Lüdtke gravatar image Mathias Lüdtke  ( 2019-08-15 16:43:11 -0500 )edit

vel_from_device: "obj3A04sub12pi/60"

works like a charm. Thanks again!

akosodry gravatar image akosodry  ( 2019-08-16 02:26:29 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2019-08-15 08:05:53 -0500

Seen: 226 times

Last updated: Aug 15 '19