ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Publishers and subscribers must use the same message type.

A std_msgs::Float64 and a double are different c++ types. Your publishing code must create a `std_msgs::Float64 object, set the value, then pass that msg to publish().

Publishers The publisher declaration and subscribers publish method must use the same message type.

A std_msgs::Float64 and a double are different c++ types. Your publishing code must create a `std_msgs::Float64 object, set the value, then pass that msg to publish().