# Offboard low-level control using thrust and torque setpoints

**URL:** <https://discuss.px4.io/t/offboard-low-level-control-using-thrust-and-torque-setpoints/39734>\
**Category:** PX4 Autopilot\
**Created:** [July 17, 2024, 1:39am UTC](https://discuss.px4.io/t/offboard-low-level-control-using-thrust-and-torque-setpoints/39734 "2024-07-17T01:39:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mohammadreza.izadi](https://discuss.px4.io/letter_avatar_proxy/v4/letter/m/cdc98d/32.png) [@mohammadreza.izadi](https://discuss.px4.io/u/mohammadreza.izadi)\
**Post date:** [July 17, 2024, 1:39am UTC](https://discuss.px4.io/t/offboard-low-level-control-using-thrust-and-torque-setpoints/39734/1 "2024-07-17T01:39:01Z")

</div>

Hi everyone,

I want to send thrust and torque set points generated by a geometric controller. I am using ROS2 and the UXRCE protocol. I am utilizing this repository to send commands on topics.

> **[GitHub - SaxionMechatronics/px4\_offboard\_lowlevel: Low-level control of PX4...](https://github.com/SaxionMechatronics/px4_offboard_lowlevel)**
>
> Low-level control of PX4 Multi-rotor vehicles in Offboard mode - SaxionMechatronics/px4\_offboard\_lowlevel

There are two different modes: one of them is thrust + attitude setpoint, and the other is thrust + torque setpoint. When I implement the first mode, the drone is stable and can track any type of trajectory. However, when I switch to the second mode, the drone can fly but has an offset in the trajectory. This means that while the drone can fly and remain stable, it cannot accurately track the trajectory. Additionally, if I send a point setpoint to the drone, it hovers with slight oscillations and has an offset near the desired position setpoint.

I have tested both modes in Gazebo, and they work well, but I face this problem in real implementation. Interestingly, I encounter the same behavior when I implement a NMPC controller. I would really appreciate any help. (My drone is an X500 V2, and I am using firmware v1.14.)

---

<div class="post-metadata">

**Author:** ![mrh](https://discuss.px4.io/letter_avatar_proxy/v4/letter/m/3ab097/32.png) [@mrh](https://discuss.px4.io/u/mrh)\
**Post date:** [December 11, 2024, 9:48am UTC](https://discuss.px4.io/t/offboard-low-level-control-using-thrust-and-torque-setpoints/39734/2 "2024-12-11T09:48:10Z")

</div>

“I found that when I was using thrust and torque for control, I set the thrust to [0, 0, -0.52] and torque = [0, 0, 0]. In the Gazebo simulation, after takeoff, the drone experiences a downward pitch, and after flying for a certain distance, the pitch suddenly increases dramatically until the drone flips. Do you know how to solve this?”
