Socketcan_bridge : Error when publishing on sent_messages topic

asked 2019-09-23 16:37:06 -0500

prj1508 gravatar image

updated 2019-09-23 19:24:39 -0500

jayess gravatar image

Hi I am running socketcan_bridge package and trying to publish a can_msgs/Frame type message to a rostopic using the command

rostopic pub -r 10 /sent_messages can_msgs/Frame 'header:
  seq: 0
  stamp: {secs: 0, nsecs: 0}
  frame_id: ''
id: 0x29F
is_rtr: false
is_extended: false
is_error: false
dlc: 8
data: [53,70,40,00,00,00,40,6a]

' from terminal, but it is throwing an error as follows

ERROR: Unable to publish message. One of the fields has an incorrect type:
  field data[] must be unsigned integer type

msg file:
std_msgs/Header header
  uint32 seq
  time stamp
  string frame_id
uint32 id
bool is_rtr
bool is_extended
bool is_error
uint8 dlc
uint8[8] data

The problem is due to '6a' which is not uint8. Should I change the data type in .msg to account for this? If so, what should it be to accommodate hex values. Is there any way I can change data field in the command itself without changing .msg? thanks

edit retag flag offensive close merge delete