ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
The answer to the question you asked is below. However I think there is a hidden question here. What have you tried so far to make a publisher in C++ and what happened when it didn't work?
Take a look at the tutorial for writing a publisher in C++.
You will need to make the following changes:
"gripper_controller"
"gripper_angle"
."std_msgs/UInt16.h"
Publisher
on line 73 to be UInt16
.while
loop and have it just publish data once, with the value you want to publish. If you are trying to make a utility you can call from the command line with an argument, then you should get that value from a command line argument. There are plenty of tutorials on the web about how to parse command line arguments in C++.