pcan_topics Documentation

pcan_topics

pcan topics is based on transmi- and receivetest. It consists of two nodes; pcan_transmit and pcan_receive. The pcan_transmit is subscribed to the pcan_transmit topic and sends a CAN message based on the string published. The pcan_receive publishes incomming CAN messages on the pcan_receive topic in string format.

The pcan_topics package is based on the transmi- and receivetest programs. It only supports the PCAN-USB adapter and standard CAN messages. The package contains two nodes. the PCAN_transmit node sends CAN messages based on the strings that are published on the "pcan_transmitted" topic. The PCAN_receive node publishes a string representation of received CAN messages on the "pcan_received" topic. The pcan_topic package depends on the libpcan package. Make sure it is correctly installed. The steps to install the libpcan package can be found here:

http://wiki.ros.org/libpcan

After these steps the nodes can be started. With the -b argument the Baudrate of the adapter can be set. The following values correspond to the following Baudrates:

0x0014 = 1 MBit/s 0x001C = 500 kBit/s 0x011C = 250 kBit/s 0x031C = 125 kBit/s 0x432F = 100 kBit/s 0x472F = 50 kBit/s 0x532F = 20 kBit/s 0x672F = 10 kBit/s 0x7F7F = 5 kBit/s

The default Baudrate is 1MBit/s. With the -f argument the device node can be set. The default device node is "/dev/pcan32". After starting the transmit node the command line can be used to send CAN messages. An example of such a command:

rostopic pub /pcan_transmitted std_msgs/String "0x00B 0x06 0x00 0x06 0x11 0x00 0x11 0x11" -r 100

After starting the receive node incomming can messages are send to the "pcan_received" topic. An example of a string representation of a received CAN message is:

data: 10929481.089 0x00C 0x06 0x05 0xC7 0x15 0xB1 0xA3 0xB8 0x00 0x00



pcan_topics
Author(s):
autogenerated on Thu Jun 6 2019 17:40:04