Fix linting errors
This commit is contained in:
parent
6cce113f04
commit
33f227b772
27 changed files with 668 additions and 563 deletions
|
@ -1,32 +1,34 @@
|
|||
#include <memory>
|
||||
|
||||
#include "rclcpp/rclcpp.hpp"
|
||||
#include "std_msgs/msg/string.hpp"
|
||||
|
||||
|
||||
class PubNode : public rclcpp::Node
|
||||
{
|
||||
public:
|
||||
PubNode(rclcpp::NodeOptions options) : Node("pub_node", options)
|
||||
{
|
||||
pub_ = this->create_publisher<std_msgs::msg::String>(
|
||||
"the_topic",
|
||||
rclcpp::QoS(10));
|
||||
}
|
||||
explicit PubNode(rclcpp::NodeOptions options)
|
||||
: Node("pub_node", options)
|
||||
{
|
||||
pub_ = this->create_publisher<std_msgs::msg::String>(
|
||||
"the_topic",
|
||||
rclcpp::QoS(10));
|
||||
}
|
||||
|
||||
private:
|
||||
rclcpp::Publisher<std_msgs::msg::String>::SharedPtr pub_;
|
||||
rclcpp::Publisher<std_msgs::msg::String>::SharedPtr pub_;
|
||||
};
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
int main(int argc, char * argv[])
|
||||
{
|
||||
rclcpp::init(argc, argv);
|
||||
rclcpp::init(argc, argv);
|
||||
|
||||
rclcpp::executors::SingleThreadedExecutor exec;
|
||||
auto pub_node = std::make_shared<PubNode>(rclcpp::NodeOptions());
|
||||
exec.add_node(pub_node);
|
||||
rclcpp::executors::SingleThreadedExecutor exec;
|
||||
auto pub_node = std::make_shared<PubNode>(rclcpp::NodeOptions());
|
||||
exec.add_node(pub_node);
|
||||
|
||||
printf("spinning once\n");
|
||||
exec.spin_once();
|
||||
printf("spinning once\n");
|
||||
exec.spin_once();
|
||||
|
||||
rclcpp::shutdown();
|
||||
return 0;
|
||||
rclcpp::shutdown();
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue