Commit Graph

343 Commits

Author SHA1 Message Date
Eric Katzfey f07eeaa776 Added special muorb startup ordering in px4_init for posix platform 2024-02-21 11:52:24 -05:00
Eric Katzfey 2b69a3d290
VOXL2 specific drivers, modules, and miscellaneous support files (#22588) 2024-01-18 12:14:17 -05:00
Daniel Agar b0566cd8aa posix: cmake INSTALL make new GZ models/worlds optional for now
- the entire posix install package needs to be reviewed and tested
2023-12-18 11:49:53 -05:00
Daniel Honies 476b5d5594
fix macos compile issues (#22173)
* fix macos compile issues

* remove unused variable
2023-10-12 09:13:19 +13:00
Patrick José Pereira 724f5a97a9 platform: posix: px4: Add missing `ctsdint` include for `uint8_t`
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2023-07-06 08:24:33 +02:00
Beat Küng 1bfca24fa9 refactor param: move autosave to px4::wq_configurations::lp_default work queue
Changes initialization order as param_init now depends on wq manager
2023-05-31 07:45:20 +02:00
Beniamino Pozzan 636dfdec6a VScode: fix tasks.json and launch_sitl.json after ign -> gazebo renaming
PX4_SIM model need the simulator (gz_) prefix
Fix post debug task
Add x500_depth, rc_cessna, standard_vtol

Signed-off-by: Beniamino Pozzan <beniamino.pozzan@phd.unipd.it>
2023-03-07 21:28:39 -05:00
Eric Katzfey 21c7f8ad74
posix server: changed the method of checking and setting the server file lock (#21243)
* Changed the method of checking and setting the server file lock on Posix to avoid conditions where the server can indicate that it is running but still hasn't finished it's initialization
2023-03-06 09:55:57 -05:00
Beat Küng 0687fd2689 lockstep_scheduler: avoid pthread_cond_destroy on at_exit
The static object is destroyed on at_exit while threads might still be
inside a CS. This can lead to a hanging process.
Cleaner would be to gracefully stop the threads.

According to https://linux.die.net/man/3/pthread_cond_destroy:
Attempting to destroy a condition variable upon which other threads are
currently blocked results in undefined behavior.
2023-01-30 11:45:02 +01:00
Daniel Agar 2b5722786b cmake: fix and update packaging 2023-01-18 22:51:12 -05:00
Daniel Agar 6991ac014c
rename 'gazebo' simulation to 'gazebo-classic' (#20936)
- use `gazebo-classic` everywhere consistently referring to the original Gazebo (eg version 9,10,11)
   - additional `gazebo_*` helper targets added for compatibility, but warn about deprecation and tell you the new target naming
 - use `gz` everywhere when referring to Gazebo (aka Ignition Gazebo or new Gazebo)
2023-01-15 11:36:12 -05:00
Daniel Agar 618288cca9 SITL Gazebo classic make airframes simulator specific 2023-01-07 17:00:35 -05:00
Daniel Agar 75125da34c SITL sihsim make airframes simulator specific 2023-01-07 17:00:35 -05:00
Daniel Agar 95a6eba36c SITL jmavsim make airframes simulator specific
-cleanup and simplify jmavsim SITL launch and debug
2023-01-07 17:00:35 -05:00
Daniel Agar 8114aad983
initial minimal PX4_ROS2 platform and px4_ros2_default build (#20689)
- new ROS2 platform in PX4 intended for creating configs that build and run entirely in ROS2
 - PX4_CONFIG defaults to px4_ros2_default if no config specified and in a colcon workspace with ROS_VERSION=2
 - currently doesn't do much other than allow you to build px4 msgs interface package
2022-12-08 23:03:44 -05:00
Daniel Agar 72cb4bee01
SITL gz fixes and init cleanup (#20725)
- remove broken gz version handling and remove x500-legacy
 - fix all shellcheck warnings
 - prepare for Gazebo Garden compatibility (needs more work)
2022-12-07 15:41:13 -05:00
Eric Katzfey 796fa8bd72
boards/modalai: separate voxl2 builds into two board builds instead of single board build with different variants
* Made voxl2 apps processor and slpi dsp processor builds into separate board builds so that they can
more easily be configured independently.

* Removed board specific link library command from px4_config.cmake and moved it to a more generic
board specific solution that can be used by any board that needs custom link libraries.

* Removed redundant cmake command for Qurt

* Removed unused definition from Qurt cmake file

* Removed unnecessary QURT_LIB cmake function

* Reorganized the voxl2 build structure to avoid 4 level board directories.

* Reverted cmake files to remove 4 level board naming code

* Updated documentation
2022-11-15 13:09:04 -05:00
Zachary Lowell bcae7e550b
Qurt platform/common dependency fixes 2022-10-25 21:06:00 -04:00
Eric Katzfey 4afd19f037 Moved the bad-function-cast compiler warning option out of the common flags and into
the nuttx and posix specific options files since this option cannot be used with
the qurt platform. There are header files in the hexagon sdk that fail this check.
2022-10-20 18:18:40 -04:00
Beat Küng 31dfdea12e commander: remove state_machine_helper tests 2022-10-11 22:31:20 -04:00
Benjamin Perseghetti f9522e831c
Gazebo Simulation Enablement (#20319) 2022-09-29 13:49:31 -04:00
Ville Juven 59e86c490d Remove include <log.h> from defines.h
The reason for this is that log.h includes drv_hrt.h which sucks in
half the project's include files with it, which causes strange build
issues
2022-09-29 07:56:24 +02:00
Daniel Agar e58275e6f5 platforms/posix: restore none SITL helper target for replay 2022-09-23 19:20:01 -04:00
Eric Katzfey d30ccb2b1d
initial board and platform support for the ModalAI VOXL 2 (POSIX + QuRT) 2022-09-23 12:03:05 -04:00
Beat Küng c707997b9e
lockstep_scheduler: use PRIu64 for timestamp printf 2022-09-19 10:04:31 -04:00
Daniel Agar 3440f543f1 simulator_ignition_bridge: wait for first clock set before returning successfully 2022-09-16 21:37:09 -04:00
Daniel Agar b8fb5dfa51
merge px4_sitl_ign into px4_sitl_default (#20188)
- for convenience merge px4_sitl_ign into px4_sitl_default, but allow simulator_ignition_bridge to quietly skip inclusion if ignition-transport isn't available
 - simulator_ignition_bridge only try setting the system clock in
lockstep builds
 - this simplifies usage and CI system dependencies
2022-09-10 16:18:02 -04:00
Daniel Agar 9d1aeb6aa7 platforms/posix: cleanup macos legacy 2022-09-09 13:05:06 -04:00
Daniel Agar 5dd1e5a018 delete systemcmds/mixer 2022-09-09 09:14:09 -04:00
Daniel Agar f66b5ce204
simulation: ignition bridge allow IMU or pose callbacks to update system time if newer than clock
* requires HRT lockstep changes to eliminate offset (PR #20146)
2022-09-01 20:42:21 -04:00
Daniel Agar c52f2143d2 posix lockstep remove HRT offset and use full sim time 2022-09-01 20:40:37 -04:00
Beat Küng ad222760dd platforms: move CONFIG_FS_PROCFS_MAX_TASKS definition to cpuload.h
So it's used for both cases
2022-08-25 22:02:15 -04:00
Daniel Agar 4040e4cdf2 simulation organization and cleanup
- new modules/simulation directory to collect all simulators and related modules
 - new Tools/simulation directory to collect and organize scattered simulation submodules, scripts, etc
 - simulation module renamed to simulator_mavlink
 - sih renamed to simulator_sih (not a great name, but I wanted to be clear it was a simulator)
 - ignition_simulator renamed to simulator_ignition_bridge
 - large sitl_target.cmake split by simulation option and in some cases pushed to appropriate modules
 - sitl targets broken down to what's actually available (eg jmavsim only has 1 model and 1 world)
 - new Gazebo consistently referred to as Ignition for now (probably the least confusing thing until we fully drop Gazebo classic support someday)
2022-08-25 09:10:03 -04:00
Daniel Agar cfc579542e
new Ignition Gazebo simulation interface architecture (#20057)
- much simpler direct interface using Ignition Transport 
 - in tree models and worlds
 - control allocation output configuration, no more magic actuator mapping to mavlink and back
 - currently requires no custom Gazebo plugins (keeping things as lightweight and simple as possible)

Co-authored-by: Jaeyoung-Lim <jalim@ethz.ch>
2022-08-22 10:58:19 -04:00
Beat Küng 4d60fadc05 ROMFS: set control allocation parameters for sitl airframes
Removes some airframes:
- if750a
- solo
- iris_ctrlalloc
- typhoon_h480_ctrlalloc
2022-08-12 09:43:12 +02:00
Hamish Willee e6eed43648
Spelling errors (#19935) 2022-07-27 14:33:16 +10:00
Beat Küng f22dc80ecc system: add missing includes (added indirectly via visibility.h for normal builds) 2022-07-20 01:14:04 -04:00
Roman Dvořák ed14151734
Update Flight-gear bridge, Add support of TF-G2 autogyro flight-gear model (#19122)
* Add Transfer of RPM from FG to PX4,
	-switch FG_bridge module to ThudnderFlyaerospace

* Add TF-G2 flightgear sim target

* Add simulator support, fix astyle

* Update SITL TF-G2 airframe, update fg bridge

Co-authored-by: Vit Hanousek <vithanousek@seznam.cz>
2022-07-19 09:11:44 +02:00
Bruce Meagher 714234ca90
posix: add mavlink shell for posix targets (#19800) 2022-06-20 11:51:47 +02:00
Thomas Debrunner 46c9d1e288
SIH in SITL with lockstep (#19028)
* sih: Move sih out of work queue
This reverts commit bb7dd0cf00.

* sih-sim: Enable sih in sitl, together with lockstep

* sih-sim: new files for sih: quadx and airplane

* sih: Added tailsitter for sih-sitl simulation

* sitl_target: Added seperate target loop for sih

* jmavsim_run: Allow jmavsim to run in UDP mode

* lockstep: Post semaphore on last lockstep component removed

* sih-sim: Added display for effectively achieved speed

* sih: increase stack size

* sih-sim: Improved sleep time computation, fixes bug of running too fast

* sitl_target: place omnicopter in alphabethic order

Co-authored-by: romain-chiap <romain.chiap@gmail.com>
Co-authored-by: Matthias Grob <maetugr@gmail.com>
2022-06-09 09:52:34 +02:00
Jaeyoung-Lim bf68d3433e Add omnicopter SITL model
F
2022-06-04 07:40:29 +02:00
Daniel Agar 1d66f2cf83 posix: HRT hrt_lock() sem_wait try again if error returned 2022-04-12 12:46:29 -04:00
Thomas Debrunner 5b0fc8f507 print_load: Removed unused variable to fix compilation on macos 2022-03-18 10:42:19 +01:00
Jukka Laitinen 9f049b4dca Inline ts_to_abstime and abstime_to_ts
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-02-25 13:35:14 +01:00
Jukka Laitinen 705171eb53 Fix linking for posix targets
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-01-27 12:42:40 -05:00
Julian Oes be9385ef06 cmake: use at least 1 core to build SITL
If we use -j 0, ninja fails with invalid argument.
2022-01-17 17:07:31 -05:00
Julian Oes 9eda5b373c posix: add fuzz testing using MAVLink messages
This adds the env option PX4_FUZZ which runs the LLVM libFuzzer which
throws random bytes at mavlink_receiver using MAVLink messages over UDP.

The MAVLink messages that are being sent are valid, so the CRC is
calculated but the payload and msgid, etc. are generally garbage, unless
the fuzzing gets a msgid right by chance.

As I understand it, libFuzzer watches the test coverage and will try to
execute as much of the code as possible.
2022-01-07 10:17:12 -05:00
Daniel Agar 7b7b7acd36 i2c_spi_buses: respect CONFIG_I2C and CONFIG_SPI
- bmp280, dps310, and ms5611 barometers support boards without I2C
2021-11-15 15:57:33 -05:00
Jukka Laitinen 39c0c68167 print_load: Remove reference to CONFIG_MAX_TASKS
This is already removed from nuttx, and in posix the size of s->last_times
can be just checked with sizeof()

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-11-09 21:25:10 -05:00
Guilherme Lawless 47a191489e
cmake: sitl_gazebo build use memory information from the system to estimate the parallel jobs
Using cmake_host_system_information, grabs AVAILABLE_PHYSICAL_MEMORY and adds another job for every 1.5GB of available memory.

This is tested on a single system with 16 logical cores and 16GB RAM (~11.5GB available, reported correctly by cmake).
2021-11-07 15:37:48 -05:00