* Rescale throttle curve to HTE as option
* Add slew rate to hover thrust estimate
* Update docs to reflect changes
Fix formating
* mc_att_control: suggestions for hover thrust slewing
- Slower slew rate
- Move update of hover thrust estimate into main loop
- Make sure dt for slew rate is correct
- Apply parameter updates if hover thrust estimate not used
- Parameter description in metadata files
* fix: Rescaling cases order
* Rescale to HTE estimate by default
* Update src/modules/mc_pos_control/multicopter_position_control_params.c
Co-authored-by: Mathieu Bresciani <brescianimathieu@gmail.com>
* Fix hte sub name
* Update MPC_THR_CURVE description
* Swap thr curve values to make hte rescaling default for value 0
---------
Co-authored-by: Matthias Grob <maetugr@gmail.com>
Co-authored-by: Mathieu Bresciani <brescianimathieu@gmail.com>
The rotational speed threshold on fixed-wing vehicles is triggering easily
if the plane is lifted prior to takeoff (hand-launch), and can cause issues
for the auto takeoff state machine. Thus if either airspeed or groundspeed is valid,
it's better to rely on these for land detection, and only use the rotational
speed if they're invalid.
Signed-off-by: Silvan <silvan@auterion.com>
* gz_plugins: add MovingPlatformController
This plugin moves the entity to which it is attached to simulate moving
platforms (boats, trucks, ...) to takeoff and land on. Updates
Tools/simulation/gz submodule with corresponding dependency. Use with:
PX4_GZ_MODEL_POSE=0,0,2.2,0,0,0 PX4_GZ_WORLD=moving_platform make px4_sitl gz_standard_vtol
more in README.md
* MovingPlatformController: Wrench implementation
Now it works by applying appropriate forces & torques to make the
platform move as desired. Compared to the previous velocity-based
version it introduces no kinematic constraints, keeping it realistic.
Other updates:
- Also make heading configurable by env var in addition to velocity
- Cleaner error handling (runtime error, gzerr, gzwarn)
- Read parameters (gravity, platform mass & height) from model rather than hardcoding
- Update README with new env vars, usage in sdf, etc.
* MovingPlatformController: fix warning message
* MovingPlatformController: fix build
https://github.com/PX4/PX4-Autopilot/pull/24518 changed some variable
names in CMakeLists. This adapts ours to use the new ones.
* MovingPlatformController: format
* MovingPlatformController: address code review
From feedback on PR
- Parameterise low pass filters with cutoff frequency (rather than
filter coefficient directly).
- Add comment with units of feedback gains.
- Scale attitude gains with platform inertia (rather than mass).
Additionally
- Wait 5 seconds before moving the platform so the model has time to
spawn (was quicker before rebasing...)
- Refactor: separate noise generation and force/torque calculation into
two separate functions
- rename updatePlatformState -> getPlatformState to emphasise
difference from other update* functions that update internal state only
- remove unused gz transport node
- README grammar
* MovingPlatformController: format
* MovingPlatformController: remove redundant call
* MovingPlatformController: clarify explanation
* MovingPlatformController: clarify & comment units
* MovingPlatformController: wait for model to spawn
Rather than waiting a fixed 5s, we now only move the platform once the
model is spawned.
For that we construct the model name from the relevant environment
variables, in the same way as done in px4-rc.gzsim.
If attaching to an existing model, do not wait.
* MovingPlatformController: correct substring extraction
---------
Co-authored-by: Jacob Dahl <37091262+dakejahl@users.noreply.github.com>
There is some race condition where in rare cases the topic publication
right after creating the writer did not get received on the ROS side.
This happens even with reliable QoS & reliable transport.
This adds RTL_TYPE 4 which means continue the mission or reverse back to
the takeoff location, whichever is closer in terms of mission items
in-between.
This would be nicer to have on a distance rather than mission item count
basis but that would require access to the dataman and make it more
complex.
* don't constrain airspeed for scaling to maximum airspeed
Signed-off-by: RomanBapst <bapstroman@gmail.com>
* fix max function
Signed-off-by: RomanBapst <bapstroman@gmail.com>
* remove hardcoded max
Signed-off-by: RomanBapst <bapstroman@gmail.com>
---------
Signed-off-by: RomanBapst <bapstroman@gmail.com>