|
12 | 12 | // See the License for the specific language governing permissions and |
13 | 13 | // limitations under the License. |
14 | 14 |
|
15 | | -#include <rclcpp/rclcpp.hpp> |
16 | | -#include <std_msgs/msg/string.hpp> |
17 | 15 | #include <string> |
| 16 | +#include <std_msgs/msg/string.hpp> |
| 17 | +#include <rclcpp/rclcpp.hpp> |
18 | 18 |
|
19 | 19 | int an_unused_variable = (int)3.14; |
20 | 20 |
|
21 | | -int main(int argc, char** argv) { |
22 | | - rclcpp::init(argc, argv); |
23 | | - auto node = rclcpp::Node::make_shared("bad_node"); |
24 | | - auto publisher = node->create_publisher<std_msgs::msg::String>("topic", 10); |
25 | | - rclcpp::Rate loop_rate(1); |
26 | | - |
27 | | - while (rclcpp::ok()) { |
28 | | - std_msgs::msg::String msg; |
29 | | - msg.data = |
30 | | - "This is a very long string designed specifically to make this line exceed the typical " |
31 | | - "80-character limit that linters check for."; |
32 | | - publisher->publish(msg); |
33 | | - rclcpp::spin_some(node); |
34 | | - loop_rate.sleep(); |
35 | | - } |
| 21 | +int main(int argc,char ** argv){ |
| 22 | +rclcpp::init(argc,argv); |
| 23 | +auto node = rclcpp::Node::make_shared("bad_node"); |
| 24 | +auto publisher=node->create_publisher<std_msgs::msg::String>("topic",10); |
| 25 | +rclcpp::Rate loop_rate(1); |
36 | 26 |
|
37 | | - rclcpp::shutdown(); |
38 | | - return 0; |
| 27 | +while(rclcpp::ok()){ |
| 28 | + std_msgs::msg::String msg; |
| 29 | + msg.data="hello world"; |
| 30 | + msg.data = "This is a very long string designed specifically to make this line exceed the typical 80-character limit that linters check for."; |
| 31 | + publisher->publish(msg); |
| 32 | + rclcpp::spin_some(node); |
| 33 | + loop_rate.sleep(); |
39 | 34 | } |
| 35 | +rclcpp::shutdown(); |
| 36 | +return 0;} |
0 commit comments