add bind and fix typo
This commit is contained in:
@@ -24,9 +24,9 @@ public:
|
|||||||
HeartBeat() : Node("heartbeat")
|
HeartBeat() : Node("heartbeat")
|
||||||
{
|
{
|
||||||
// disarm_service_ = this->create_service<std_srvs::srv::Empty>("drone/disarm", std::bind(&PX4Controller::handle_disarm_request, this, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3));
|
// disarm_service_ = this->create_service<std_srvs::srv::Empty>("drone/disarm", std::bind(&PX4Controller::handle_disarm_request, this, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3));
|
||||||
vehicle_control_mode_service_ = this->create_service<drone_services::srv::SetVehicleControl>("drone/set_vehicle_control", std::bind())
|
vehicle_control_mode_service_ = this->create_service<drone_services::srv::SetVehicleControl>("drone/set_vehicle_control", std::bind(&Heartbeat::handle_vehicle_control_change, this, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3));
|
||||||
// create a publisher on the offboard control mode topic
|
// create a publisher on the offboard control mode topic
|
||||||
offboard_control_mode_publisher_ = this->create_publisher<px4_msgs::msg::OffboardControlMode>("/fmu/in/offboard_control_mode", 10);
|
offboard_control_mode_publisher_ = this->create_publisher<px4_msgs::msg::OffboardControlMode>("/fmu/in/offboard_control_mode", 10);
|
||||||
// create timer to send heartbeat messages (offboard control) every 100ms
|
// create timer to send heartbeat messages (offboard control) every 100ms
|
||||||
timer_ = this->create_wall_timer(100ms, std::bind(&HeartBeat::send_heartbeat, this));
|
timer_ = this->create_wall_timer(100ms, std::bind(&HeartBeat::send_heartbeat, this));
|
||||||
start_time = this->get_clock()->now().seconds();
|
start_time = this->get_clock()->now().seconds();
|
||||||
@@ -66,7 +66,7 @@ private:
|
|||||||
}
|
}
|
||||||
|
|
||||||
void handle_vehicle_control_change(
|
void handle_vehicle_control_change(
|
||||||
const std::shared_ptr<rmw_request_id> request_header,
|
const std::shared_ptr<rmw_request_id_t> request_header,
|
||||||
const std::shared_ptr<drone_services::srv::SetVehicleControl::Request> request,
|
const std::shared_ptr<drone_services::srv::SetVehicleControl::Request> request,
|
||||||
const std::shared_ptr<drone_services::srv::SetVehicleControl::Response> response)
|
const std::shared_ptr<drone_services::srv::SetVehicleControl::Response> response)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user