|
PX4 ROS 2 Interface Library
Library to interface with PX4 from a companion computer using ROS 2
|
Setpoint type for surface vehicle thrust and attitude control. More...
#include <px4_ros2/control/setpoint_types/experimental/surface_vehicle/thrust_attitude.hpp>
Public Member Functions | |
| SurfaceVehicleThrustAttitudeSetpointType (Context &context) | |
| SetpointType | getSetpointType () override |
| float | desiredUpdateRateHz () override |
| void | update (float thrust_body_x, float yaw_setpoint, std::optional< float > thrust_body_y={}) |
| Send a thrust setpoint and an attitude setpoint to the flight controller. | |
Public Member Functions inherited from px4_ros2::SetpointBase | |
| SetpointBase (Context &context) | |
| std::shared_ptr< SetpointBase > | getSharedPtr () |
| virtual void | clearOptionalRequirements (px4_msgs::msg::SetpointConfigReply &setpoint_config_reply) |
| void | setShouldActivateCallback (const ShouldActivateCB &should_activate_cb) |
| void | setActive (bool active) |
Additional Inherited Members | |
Public Types inherited from px4_ros2::SetpointBase | |
| using | ShouldActivateCB = std::function< void()> |
| using | SetpointType = decltype(px4_msgs::msg::SetpointConfig::type) |
Protected Member Functions inherited from px4_ros2::SetpointBase | |
| void | onUpdate () |
Setpoint type for surface vehicle thrust and attitude control.
Can be used for surface vehicles, i.e. rovers and boats.
|
inlineoverridevirtual |
Reimplemented from px4_ros2::SetpointBase.
|
inlineoverridevirtual |
Returns one of px4_msgs::msg::SetpointType::TYPE_*
Implements px4_ros2::SetpointBase.
| void px4_ros2::SurfaceVehicleThrustAttitudeSetpointType::update | ( | float | thrust_body_x, |
| float | yaw_setpoint, | ||
| std::optional< float > | thrust_body_y = {} |
||
| ) |
Send a thrust setpoint and an attitude setpoint to the flight controller.
| thrust_body_x | [-] Normalized thrust setpoint along body X axis. Takes values in [-1 (Backwards), 1 (Forwards)]. |
| yaw_setpoint | [rad] Yaw setpoint in NED frame. Takes values in [-pi, pi]. |
| thrust_body_y | [-] Normalized thrust setpoint along body Y axis (Optional, only relevant for omnidirectional vehicles, ignored by all other vehicles). Takes values in [-1 (Left), 1 (Right)]. |