0
$\begingroup$

Rosanswers logo

hey community, im a ROS beginner, and my question is how can i publish a char manualy in a rostopic? i have published a string with

rostopic pub -1 my_topic std_msgs/String x

but the comand

rostopic pub -1 my_topic std_msgs/Char x

fails

edit:

when i try:

fhduser@fhduser:~/catkin_ws/src/sekuria$ rostopic pub -1 my_topic std_msgs/Char a

i get: [WARN] [WallTime: 1391591690.683859] Inbound TCP/IP connection failed: global name '_x' is not defined

when i try:

fhduser@fhduser:~/catkin_ws/src/sekuria$ rostopic pub -1 my_topic std_msgs/Char data: a

i get:

ERROR: Too many arguments:

  • Given: [{'data': None}, 'a']

  • Expected: ['data']

Args are: [data]


Originally posted by sonyfuchs on ROS Answers with karma: 5 on 2014-02-04

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

This looks like a bug with how std_msgs/msg/_Char.py is generated. Indeed, _x is never defined, whereas in std_msgs/msg/_String.py, it is defined in the serialize function. I would suggest submitting a bug report against ros_comm.


Originally posted by Dan Lazewatsky with karma: 9115 on 2014-02-05

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.