From 8f7e4961072818d8e6c65588dc331a19efa90e03 Mon Sep 17 00:00:00 2001 From: Sem van der Hoeven Date: Mon, 1 May 2023 15:28:58 +0200 Subject: [PATCH] add placeholders --- src/px4_connection/src/px4_controller.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/px4_connection/src/px4_controller.cpp b/src/px4_connection/src/px4_controller.cpp index 02532700..8fb6813c 100644 --- a/src/px4_connection/src/px4_controller.cpp +++ b/src/px4_connection/src/px4_controller.cpp @@ -25,6 +25,7 @@ https://discuss.px4.io/t/cannot-arm-drone-with-companion-computer-arming-denied- #define D_SPEED(x) -x - 9.81 using namespace std::chrono_literals; +using namespace std::placeholders; class PX4Controller : public rclcpp::Node { @@ -37,7 +38,7 @@ public: trajectory_setpoint_publisher = this->create_publisher("/fmu/in/trajectory_setpoint", 10); // offboard_control_mode_publisher_ = this->create_publisher("/fmu/in/offboard_control_mode", 10); - set_attitude_service_ = this->create_service("set_attitude", std::bind(&PX4Controller::set_setpoint, this)); + set_attitude_service_ = this->create_service("set_attitude", std::bind(&PX4Controller::set_setpoint, this, _1, _2, _3)); // service_ptr_ = this->create_service( // "test_service",