ros_canopen icon indicating copy to clipboard operation
ros_canopen copied to clipboard

socketcan_bridge support for DBC files

Open reinzor opened this issue 9 years ago • 8 comments

Add encoding/decoding step to the socketcan_bridge:

  • Load DBC Files that contain Frame/Signal specification (http://vector.com/vi_candb_en.html)
  • Create pub and sub for DecodedCANFrames

reinzor avatar Feb 13 '16 18:02 reinzor

Do you plan to work on this or is it just a feature request?

mathias-luedtke avatar Feb 17 '16 09:02 mathias-luedtke

This is a feature request. If somebody is interested, I can help developing this feature.

-Rein

On Wed, Feb 17, 2016 at 10:49 AM, Mathias Lüdtke [email protected] wrote:

Do you plan to work on this or is it just a feature request?

— Reply to this email directly or view it on GitHub https://github.com/ros-industrial/ros_canopen/issues/160#issuecomment-185123683 .

reinzor avatar Feb 17 '16 10:02 reinzor

I don't really see how you envision the DecodedCANFrames message to work or what it benefits will be. Of course, for some CAN messages such a conversion node would be useful for example CAN enabled encoders could be conveniently converted to sensor_msgs/JointState. I guess you could make a node which converts specific CAN messages to specific ROS messages. Should be an additional package in my opinion though.

iwanders avatar Feb 17 '16 10:02 iwanders

I have done something similar for canopen_chain_node: each object can be published as a single topic with one of the std_msgs types.

mathias-luedtke avatar Feb 17 '16 10:02 mathias-luedtke

@ipa-mdl,This indeed could be an option; however then you loose the relation between signals of the same CAN Frame. @iwanders, you might be right, maybe a more nice way is developing an abstract base class with a decodedframe callback that maps the decoded can frames on ROS messages ...

reinzor avatar Feb 17 '16 12:02 reinzor

If you really want to publishe complex messages then you should go for a python-can implementation or a converter node that listens to the socketcan_bridge output.

mathias-luedtke avatar Feb 18 '16 10:02 mathias-luedtke

I don't think support for DBC files should be added to socketcan_bridge package.

Example: https://github.com/NewEagleRaptor/pacifica-dbw-ros dbc is a package for supporting DBC files dbw_pacifica_can is a package that reads/writes CAN messages from/to socketcan_bridge topics using the above dbc library

It's really hard to generalize this implementation IMHO.

ZHOUYue67 avatar Jul 16 '18 07:07 ZHOUYue67

Hello Mike, Suppose I have a .dbc file and if I need to visualize the data in a human readable format, what we shall do? Do we have some documentation for proceeding further?

melvinpmanuel avatar Aug 09 '22 16:08 melvinpmanuel