PX4 ROS 2 Interface Library
Library to interface with PX4 from a companion computer using ROS 2
px4_ros2::RoverThrottleAttitudeSetpointType Class Reference

Setpoint type for rover throttle and attitude control. More...

#include <px4_ros2/control/setpoint_types/experimental/rover/throttle_attitude.hpp>

Inheritance diagram for px4_ros2::RoverThrottleAttitudeSetpointType:
px4_ros2::SetpointBase

Public Member Functions

 RoverThrottleAttitudeSetpointType (Context &context)
 
Configuration getConfiguration () override
 
float desiredUpdateRateHz () override
 
void update (float throttle_body_x, float yaw_setpoint, std::optional< float > throttle_body_y={})
 Send a rover throttle setpoint and a rover attitude setpoint to the flight controller. More...
 
- Public Member Functions inherited from px4_ros2::SetpointBase
 SetpointBase (Context &context)
 
std::shared_ptr< SetpointBasegetSharedPtr ()
 
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()>
 
- Protected Member Functions inherited from px4_ros2::SetpointBase
void onUpdate ()
 

Detailed Description

Setpoint type for rover throttle and attitude control.

Member Function Documentation

◆ update()

void px4_ros2::RoverThrottleAttitudeSetpointType::update ( float  throttle_body_x,
float  yaw_setpoint,
std::optional< float >  throttle_body_y = {} 
)

Send a rover throttle setpoint and a rover attitude setpoint to the flight controller.

Parameters
throttle_body_x[-] Throttle 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].
throttle_body_y[-] Mecanum only: Throttle setpoint along body Y axis (Only relevant for mecanum rovers). Takes values in [-1 (Left), 1 (Right)].

The documentation for this class was generated from the following file: