Analyzing CAN-messages
Hi,
When we try to view the can-messages the output from Apollo is just zeroes. Is there a way for Apollo to publish the can-messages so that they can be analyzed. We're running both bag-files and sim_control with can bus-module active when trying to view the messages.
Thanks in advance.
Hi @Trelsmo , the sim_control one simulation does not have the control/canbus in the loop, so you would not see the can bus messages.
Which CAN 2 USB devices Apollo support:
- https://www.kvaser.com/product/kvaser-leaf-light-hs-v2/
- https://www.peak-system.com/PCAN-USB.199.0.html
- ...
?
@ubercool2 not exactly sure about your question, kvaser and PCAN are just two UBS-DB9 CAN analyzing tools. Technically you can see CAN messages via both
@Capri2014:
@ubercool2 not exactly sure about your question, kvaser and PCAN are just two UBS-DB9 CAN analyzing tools. Technically you can see CAN messages via both
This is absolutely wrong. The 2 products I linked above are CAN-2-USB converters and are used to receive and send CAN data via USB port. It seems to me that you are confusing them with the https://vector.com/vi_canalyzer_en.html.
Please have a look at this diagram if you are unsure what it takes to support one of the above devices: https://en.wikipedia.org/wiki/SocketCAN#/media/File:Socketcan.png.
- you need to enable the kernel support (e.g. https://github.com/JWhitleyAStuff/linuxcan-dkms)
- you need to install the right CAN lib: https://github.com/astuff/kvaser_interface
- you need to abstract the calls to CAN bus to e.g. ROS topics
This is what I meant by which CAN 2 USB device Apollo supports.
@ubercool2 Sorry for that, and thanks for pointing this out. In that case, then no, we do not have support for Kvaser nor PCAN.
@ubercool2 Let me know if you have further questions, otherwise I will close this one for now
@Capri2014 in hindsight it is actually better if you do not support CAN-2-USB since usb is a polling protocol and thus not real time.
The question still remains how do you then connect to CAN (over which physical device) and how do you convert your CAN messages to ROS messages (it is just too much code here in apollo for me to be able to understand everything immediately)?
@ubercool2 It is true that usbcan is no real time nor safe. But it actually provides a good way for people to visualize the can messages and way easier for people to debug OFFLINE.
For the actual in vehicle test, we use ESD with PCI connections, as config in default here: https://github.com/ApolloAuto/apollo/blob/master/modules/canbus/conf/canbus_conf.pb.txt
Closing this issue as there has been no communication in a while.