ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
There were actually two issues with what you were trying
UInt16
rostopic pub
saw the negative value as command line optionSolution:
UInt16
values makes no sense. Unsigned numbers cannot be negative. Please read up on them.Using a -
when using the command
line usually signals that you're
using a flag (option). As the error
rostopic: error: no such option: -8
tells you, it thinks that you're
trying to use 8
as an option
(which isn't what you want). You can
either publish it like you said in
the comment to @mig 's answer or use
rostopic pub servo std_msgs/Int16 -- -8
Note: in the future, you can use Google to help you find the answer by entering the following as your search term:
rostopic pub no such option site:answers.ros.org
which will limit your search to Google's index of ROS Answers. Next time, just replace rostopic pub no such option
with whatever error you have. This time the first result would have led you to the solution for #2.
2 | No.2 Revision |
There were actually two issues with what you were trying
UInt16
rostopic pub
saw the negative value as command line optionSolution:
UInt16
values makes no sense. Unsigned numbers cannot be negative. Please read up on them.Using a -
when using the command
line usually signals that you're
using a flag (option). As the error
rostopic: error: no such option: -8
tells you, it thinks that you're
trying to use 8
as an option
(which isn't what you want). You can
either publish it like you said in
the comment to @mig 's answer or use
rostopic pub servo std_msgs/Int16 -- -8
Note: in the future, you can use Google to help you find the answer by entering the following as your search term:
rostopic pub no such option site:answers.ros.org
which will limit your search to Google's index of ROS Answers. Next time, just replace rostopic pub no such option
with whatever error you have. This time the first result would have led you to the solution for #2.