SMACC2
Loading...
Searching...
No Matches
smacc2_client_library
cl_px4_mr
include
cl_px4_mr
client_behaviors
cb_yaw_rotate.hpp
Go to the documentation of this file.
1
// Copyright 2025 Robosoft Inc.
2
//
3
// Licensed under the Apache License, Version 2.0 (the "License");
4
// you may not use this file except in compliance with the License.
5
// You may obtain a copy of the License at
6
//
7
// http://www.apache.org/licenses/LICENSE-2.0
8
//
9
// Unless required by applicable law or agreed to in writing, software
10
// distributed under the License is distributed on an "AS IS" BASIS,
11
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
// See the License for the specific language governing permissions and
13
// limitations under the License.
14
15
#pragma once
16
17
#include <cmath>
18
#include <
smacc2/smacc.hpp
>
19
20
namespace
cl_px4_mr
21
{
22
23
class
CpTrajectorySetpoint;
24
class
CpVehicleLocalPosition;
25
26
class
CbYawRotate
:
public
smacc2::SmaccAsyncClientBehavior
,
public
smacc2::ISmaccUpdatable
27
{
28
public
:
29
CbYawRotate
(
float
targetYawRad,
bool
relative =
false
);
30
31
void
onEntry
()
override
;
32
void
onExit
()
override
;
33
void
update
()
override
;
34
35
private
:
36
float
targetYawRad_
;
37
bool
relative_
;
38
float
absoluteTargetYaw_
= 0.0f;
39
40
CpTrajectorySetpoint
*
trajectorySetpoint_
=
nullptr
;
41
CpVehicleLocalPosition
*
localPosition_
=
nullptr
;
42
};
43
44
}
// namespace cl_px4_mr
cl_px4_mr::CbYawRotate
Definition
cb_yaw_rotate.hpp:27
cl_px4_mr::CbYawRotate::targetYawRad_
float targetYawRad_
Definition
cb_yaw_rotate.hpp:36
cl_px4_mr::CbYawRotate::CbYawRotate
CbYawRotate(float targetYawRad, bool relative=false)
Definition
cb_yaw_rotate.cpp:22
cl_px4_mr::CbYawRotate::localPosition_
CpVehicleLocalPosition * localPosition_
Definition
cb_yaw_rotate.hpp:41
cl_px4_mr::CbYawRotate::onEntry
void onEntry() override
Definition
cb_yaw_rotate.cpp:27
cl_px4_mr::CbYawRotate::update
void update() override
Definition
cb_yaw_rotate.cpp:59
cl_px4_mr::CbYawRotate::relative_
bool relative_
Definition
cb_yaw_rotate.hpp:37
cl_px4_mr::CbYawRotate::absoluteTargetYaw_
float absoluteTargetYaw_
Definition
cb_yaw_rotate.hpp:38
cl_px4_mr::CbYawRotate::onExit
void onExit() override
Definition
cb_yaw_rotate.cpp:57
cl_px4_mr::CbYawRotate::trajectorySetpoint_
CpTrajectorySetpoint * trajectorySetpoint_
Definition
cb_yaw_rotate.hpp:40
cl_px4_mr::CpTrajectorySetpoint
Definition
cp_trajectory_setpoint.hpp:29
cl_px4_mr::CpVehicleLocalPosition
Definition
cp_vehicle_local_position.hpp:26
smacc2::ISmaccUpdatable
Definition
smacc_updatable.hpp:33
smacc2::SmaccAsyncClientBehavior
Definition
smacc_asynchronous_client_behavior.hpp:56
cl_px4_mr
Definition
cl_px4_mr.hpp:29
smacc.hpp
Generated by
1.12.0