fix: Fix identation 2 -> 4 spaces
This commit is contained in:
@@ -69,7 +69,7 @@ cpp_space_pointer_reference_alignment=left
|
||||
cpp_space_around_ternary_operator=insert
|
||||
cpp_wrap_preserve_blocks=one_liners
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
indent_size = 4
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
*/
|
||||
|
||||
#include <cstdlib>
|
||||
|
||||
#include "rclcpp/rclcpp.hpp"
|
||||
|
||||
namespace lessons::one::clock {
|
||||
|
||||
@@ -47,7 +47,8 @@ public:
|
||||
"Received HW status: version=%ld, temp=%.2f, motors_ready=%s, msg=%s",
|
||||
msg->version, msg->temperature,
|
||||
msg->are_motors_ready ? "true" : "false",
|
||||
msg->debug_message.c_str());
|
||||
msg->debug_message.c_str()
|
||||
);
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
@@ -43,9 +43,17 @@ private:
|
||||
request->y = rand() % 100;
|
||||
request->z = rand() % 100;
|
||||
|
||||
auto future = client_->async_send_request(request,
|
||||
std::bind(&NodeClient::handle_response, this, std::placeholders::_1)
|
||||
);
|
||||
auto future = client_->async_send_request(request);
|
||||
auto result = rclcpp::spin_until_future_complete(this->shared_from_this(), future, std::chrono::seconds(2));
|
||||
|
||||
if (result == rclcpp::FutureReturnCode::SUCCESS) {
|
||||
auto response = future.get();
|
||||
RCLCPP_INFO(this->get_logger(), "Received vec len: %.6lf", response->vec_len);
|
||||
} else if (result == rclcpp::FutureReturnCode::TIMEOUT) {
|
||||
RCLCPP_WARN(this->get_logger(), "Service call timed out");
|
||||
} else {
|
||||
RCLCPP_ERROR(this->get_logger(), "Service call failed");
|
||||
}
|
||||
}
|
||||
|
||||
void handle_response(rclcpp::Client<ServiceVec>::SharedFuture future) {
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
/* node_template.cpp
|
||||
* Basic node template for ROS2
|
||||
* Action server node template for ROS2
|
||||
*
|
||||
* Node description:
|
||||
* Template action server that demonstrates action server implementation
|
||||
* with goal handling, feedback publishing, and cancellation support
|
||||
*
|
||||
* Reviewed by: <x>
|
||||
* Changelog:
|
||||
@@ -7,6 +11,7 @@
|
||||
*/
|
||||
|
||||
#include <cstdlib>
|
||||
|
||||
#include "rclcpp/rclcpp.hpp"
|
||||
|
||||
namespace lessons::zero::template {
|
||||
|
||||
Reference in New Issue
Block a user