ros-industrial/ros_canopen

ROS2 foxy updating can_msg

kamakshijain opened this issue · 1 comments

Screenshot from 2021-01-21 12-40-51

I am trying to publish a can_msg type ros2 topic and monitor it as seen in the screenshot. Everything apart from data is getting updated and I can view it on the topic monitor of rqt and on the terminal but data isn't getting updated. I am not able to publish the topic from my command line as the format is confusing. Please help.

ros2 topic pub /send_message can_msgs/msg/Frame header:\
\ \ stamp:\
\ \ \ \ sec:\ 0\
\ \ \ \ nanosec:\ 0\
\ \ frame_id:\ \'\'\
id:\ 0\
is_rtr:\ false\
is_extended:\ false\
is_error:\ false\
dlc:\ 0\
data:\
-\ 0\
-\ 0\
-\ 0\
-\ 0\
-\ 0\
-\ 0\
-\ 0\
-\ 0\ 

@ipa-mdl (since you have been a major contributor and you released can_msg in foxy)

Thank you

not able to publish the topic from my command line as the format is confusing.

This seems to be a bug ros2/ros2cli#563

For now, you have to publish the command line yourself (no tab), e.g.:

 ros2 topic pub test can_msgs/msg/Frame "{data: [1,2,3,4,5,6,7,8], id: 0x123}"

Everything apart from data is getting updated and I can view it on the topic monitor of rqt and on the terminal but data isn't getting updated.

If I use the above script to publish data, I get the proper output with ros2 topic echo test:

header:
  stamp:
    sec: 0
    nanosec: 0
  frame_id: ''
id: 291
is_rtr: false
is_extended: false
is_error: false
dlc: 0
data:
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
---

Everything works as expected!

I think this is a bug in one of the RQT plugins.