More realistic than plain constant movement. Implemented with white
noise, low pass filter & feedback term ensuring we stay close enough to
upright.
Tuning knobs maybe not very intuitive at the moment. There are:
- update rates alpha_v, alpha_w (bigger = faster movement)
- amplitudes ampl_v, ampl_w (bigger = larger movement)
- feedback gains pos_gains, attitude_gain (bigger = smaller movement)
maybe we could remove the redundance between the latter two?
Also:
- overload setPlatformVelocity for different inputs
- don't set aircraft pose at all (make sure with environment variable
that it is on platform)
- platform height = 2m defined in sdf file
- rename pose -> navsat to be more precise
- gz submodule update. heavier platform & initial pose.
in Tools/simulation/gz submodule. for now I am pointing it to the PR
branch moving_platform_world which contains the moving_platform world.
The world contains the platform so we remove the platform definition and
the code that added it dynamically.
Also the env var GZ_MOVING_PLATFORM is now gone -- world name can be set
with existing env var PX4_GZ_WORLD.
We now have setPlatformVelocity, which commands a velocity command to
the platform. The platform handles it with the
gz::sim::systems::VelocityControl plugin.
We could also set the velocity once and forget about it (has no effect
if doing it directly after creating it though, need to wait a bit, 2
seconds worked). But by setting it constantly we can easily change to
more realistic boat-like movement.
the good:
- we have a platform in gazebo, created dynamically from GZBridge.
- it has a NavSat sensor, with a working callback on the PX4 side,
GZBridge::platformNavsatCallback. From there we can publish the info
as uOrb and do what we want with it.
the bad:
- the platform doesn't move yet
the ugly:
- the platforms sdf file is currently untracked in the
Tools/simulation/gz submodule. Without this the commit here is
useless. Need to find a sensible spot for it.
- with the addition of the navsat plugin in PR#22638, the callback would
reassign the previous timestamp used in the calculations of the
angular_velocity causing derivative type noise in the groundtruth
measurements
* publish the global groundtruth from the navsat callback and rearrange the local groundtruth as the altitude reference now has a dependency on the global groundtruth being initialized
---------
Signed-off-by: frederik <frederik.anilmarkus@gmail.com>
simulation gazebo: move the gazebo models to submodule, allow for operation with external gazebo instance, independent of startup order. Allows drag an drop of models from gazebo fuel.
* rolled back updates
Signed-off-by: frederik <frederik@auterion.com>
* fixing empy
Signed-off-by: frederik <frederik@auterion.com>
* Update GZBridge.cpp to lower drop position
Dropping from 1m leads to movement in the rc_cessna. Dropping from 0.5m leads to no movement.
* Update STANDALONE env variable.
* Update STANDALONE env_variable on GZBridge
* Update src/modules/simulation/gz_bridge/GZBridge.cpp
Co-authored-by: Daniel Agar <daniel@agar.ca>
* test removal of x500
Signed-off-by: frederik <frederik.anilmarkus@gmail.com>
* removed all models and reworked logic
Signed-off-by: frederik <frederik.anilmarkus@gmail.com>
* remove model path in set_sdf_filename
Signed-off-by: frederik <frederik.anilmarkus@gmail.com>
* filter resource path for world sdf
Signed-off-by: frederik <frederik.anilmarkus@gmail.com>
* updated structure to keep old make px4_sitl
Signed-off-by: frederik <frederik.anilmarkus@gmail.com>
* remove gz tools
Signed-off-by: frederik <frederik.anilmarkus@gmail.com>
* import gz as submodule and reverse rc simulator logic
Signed-off-by: frederik <frederik.anilmarkus@gmail.com>
* [gz-sim]: source GZ_SIM_RESOURCE_PATH only if PX4 starts gz server
Signed-off-by: Beniamino Pozzan <beniamino.pozzan@gmail.com>
* Typo fix
---------
Signed-off-by: frederik <frederik@auterion.com>
Signed-off-by: frederik <frederik.anilmarkus@gmail.com>
Signed-off-by: Beniamino Pozzan <beniamino.pozzan@gmail.com>
Co-authored-by: Daniel Agar <daniel@agar.ca>
Co-authored-by: Beniamino Pozzan <beniamino.pozzan@gmail.com>
* created a Performance Model for fixed wing vehicle
- added compensation for maximum climbrate, minimum sinkrate, minimum airspeed and trim airspeed based on weight ratio and air density
- added atmosphere lib to standard atmosphere calculations
---------
Signed-off-by: RomanBapst <bapstroman@gmail.com>
Co-authored-by: Thomas Stastny <thomas.stastny@auterion.com>
When using ignition SITL simulation with NO_LOCKSTEP, the SITL PX4 fails to update the IMU data from Ignition Gazebo.
The timestamp for the IMU data is taken from the ignition message:
- In LOCKSTEP mode the clock from the ignition simulation and the one from PX4 SITL are synchronized, hence everything works fine
- In NO_LOCKSTEP mode, those clocks are not synchronized anymore, so the timestamp for the IMU data should not be the one from Ignition but the current time in PX4 SITL when receiving the message.