21 #include <std_msgs/Byte.h> 22 #include <std_msgs/UInt8.h> 23 #include <std_msgs/String.h> 24 #include <std_msgs/Empty.h> 33 int main (
int argc,
char** argv){
34 ros::init(argc, argv,
"serial_example_node");
70 std_msgs::String result;
74 const char* read_data = result.data.c_str();
void write_callback(const std_msgs::String::ConstPtr &msg)
void publish(const boost::shared_ptr< M > &message) const
Subscriber subscribe(const std::string &topic, uint32_t queue_size, void(T::*fp)(M), T *obj, const TransportHints &transport_hints=TransportHints())
int main(int argc, char **argv)
void setTimeout(Timeout &timeout)
ROSCPP_DECL void init(int &argc, char **argv, const std::string &name, uint32_t options=0)
void setBaudrate(uint32_t baudrate)
void setStopbits(stopbits_t stopbits)
void setBytesize(bytesize_t bytesize)
static Timeout simpleTimeout(uint32_t timeout)
Publisher advertise(const std::string &topic, uint32_t queue_size, bool latch=false)
void setPort(const std::string &port)
#define ROS_INFO_STREAM(args)
size_t read(uint8_t *buffer, size_t size)
#define ROS_ERROR_STREAM(args)
ROSCPP_DECL void spinOnce()
void setParity(parity_t parity)
size_t write(const uint8_t *data, size_t size)