Closed salvamarce closed 1 year ago
I don't know if that is the main issue, but you are missing a step when disabling the lockstep https://docs.px4.io/main/en/simulation/#disable-lockstep-simulation
How did you fill the OffboardControlMode message?
while you are in offboard mode and the drone should respond to your vehicle_thrust_setpoint and vehicle_torque_setpoints, what is the output of listener vehicle_thrust_setpoint
and listener vehicle_torque_setpoints
?
I don't know if that is the main issue, but you are missing a step when disabling the lockstep https://docs.px4.io/main/en/simulation/#disable-lockstep-simulation
Yes, I've also done that. I forgot to put that in the steps
How did you fill the OffboardControlMode message?
This is my message
OffboardControlMode msg{};
msg.timestamp = timestamp_.load();
msg.position = false;
msg.velocity = false;
msg.acceleration = false;
msg.attitude = false;
msg.body_rate = false;
msg.actuator = true;
offboard_control_mode_publisher_->publish(msg);
While you are in offboard mode and the drone should respond to your vehicle_thrust_setpoint and vehicle_torque_setpoints, what is the output of listener vehicle_thrust_setpoint and listener vehicle_torque_setpoints?
While the drone is arming I set everything to 0.0 and after it is armed, I sent full thrust /fmu/vehicle_torque_setpoint/in:
timestamp: 1682701663360937
timestamp_sample: 0
xyz:
- 0.0
- 0.0
- 0.0
---
/fmu/vehicle_thrust_setpoint/in
timestamp: 1682701663360937
timestamp_sample: 0
xyz:
- 0.0
- 0.0
- 1.0
---
I've also tried to send -1
on the Z, thinking that it was the problem but nothing changed.
@salvamarce , please fill timestamp_sample
too and give it another try.
FYI, for standard quadrotors vehicle_thrust_setpoint.xyz[3] (the z) is negative as the frame is FRD
I should have asked this earlier, but you have the control allocation module active, right?
I found the error. The problem was with the configuration of the control allocation parameters that were not all set (I forgot the PWM_MAIN_FUNC). Actually, it seems that is not mandatory to change the boardconfig if the lockstep is disabled in the URDF.
Is there a documentation section about the offboard flight mode with torque and thrust setpoints? because I struggled a bit these days, just to reach pieces of information here and there.
Anyway, thanks for your kind help, and sorry if I opened a silly issue
Great!
The documentation for main is here: https://docs.px4.io/main/en/flight_modes/offboard.html#copter
FYI, as you may have noticed, it is very hard to solve issues about offboard control as PX4 is not the only component involved, therefore just reproducing the issue itself can be very problematic.
Ok thanks. I was using the documentation for the version v1.13, because I'm using the v1.13.3.
Hello all, I was wondering if offboard with thrust and torque setpoint will work with fixed wing or with VTOL ?
Describe the bug
v1.13.3
I am trying to control the iris in Offboard flight mode, sending the thrust and torque setpoints with ROS 2 and the micrortps agent. The drone gets armed but the propellers don't spin, even if the setpoints are present on the topic.
To Reproduce
Steps to reproduce the behavior:
into
msg/tools/urtps_bridge_topics.yaml
and generate the topic by launching the script.px4_ros_com
<enable_lockstep>0</enable_lockstep>
in the.sdf.jinja
file of the desired drone (iris)make px4_sitl_rtps gazebo
micrortps_agent -t UDP
Expected behavior
The drone should arm and then the propellers should spin
Log Files and Screenshots
https://review.px4.io/plot_app?log=ebfc4251-ef61-4a8a-b592-deee7df20a88
Drone
Additional context
Is there an example of offboard with thrust and torque setpoints?