Commit Graph

55 Commits

Author SHA1 Message Date
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 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 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
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
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
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 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
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 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
AuroraRAS 62dd38fe35 Prepare for Android NDK build
Modify CMakeList.txt prepare for Android NDK build

Signed-off-by: AuroraRAS <chplee@gmail.com>
2021-10-18 14:55:56 -04:00
Daniel Agar 65745a3676 purge broken qurt support and atlflight boards 2021-07-16 08:53:36 -04:00
Daniel Agar ab0d0fd0be
uORB move to PX4 platform layer 2021-02-17 11:25:56 -05:00
Dan George 051bcf75b3
Fix PX4_CMAKE_BUILD_TYPE=Debug configuration
Set CMAKE_RUNTIME_OUTPUT_DIR_DEBUG & _RELEASE to match
CMAKE_RUNTIME_OUTPUT_DIR as is already done in top level CMakeLists.txt.

Fixes Issue 16445 - px4-alias.sh: not found

Co-authored-by: Dan George <dgeorge@anduril.com>
2020-12-24 19:02:07 -05:00
Daniel Agar 38fbb452da vscode add navio2 variant and native debug launch 2020-11-10 10:38:46 -05:00
Daniel Agar 0e9a4cc65f boards: px4/sitl sync all build variants and fix none default package 2020-09-15 21:13:04 -04:00
Beat Küng 809d05053b posix: add support for ROMFSROOT
- add missing ROMFS files to CMakeLists.txt
- rename genromfs to etc, so that it's clearer for SITL use
2020-09-15 09:30:16 +02:00
Daniel Agar de4f594937 DriverFramework purge
The bulk of this change was tightly coupled and needed to be deleted in one pass. Some of the smaller changes were things that broke as a result of the initial purge and subsequently fixed by further eradicating unnecessary platform differences. Finally, I deleted any dead code I came across in the related files I touched while going through everything.

 - DriverFramework (src/lib/DriverFramework submodule) completely removed
 - added dspal submodule in qurt platform (was brought in via DriverFramework)
 - all df wrapper drivers removed
 - all boards using df wrapper drivers updated to use in tree equivalents
 - unused empty arch/board.h on posix and qurt removed
 - unused IOCTLs removed (pub block, priv, etc)
 - Integrator delete methods only used from df wrapper drivers
 - commander: sensor calibration use "NuttX version" everywhere for now
 - sensors: update to px4_{open, read, close} instead of DevMgr wrapper (adc open for analog differential pressure)
 - battery_status: update to px4_{open, read, close} instead of DevMgr wrapper (adc open for analog differential pressure)
 - cdev cleanup conflicting typedefs and names with actual OS (pollevent_t, etc)
 - load_mon and top remove from linux boards (unused)
 - delete unused PX4_MAIN_FUNCTION
 - delete unused getreg32 macro
 - delete unused SIOCDEVPRIVATE define
 - named each platform tasks consistently
 - posix list_devices and list_topics removed (list_files now shows all virtual files)
2020-01-13 14:07:03 -05:00
Julian Oes fc9df31653 platforms: link libatomic only on emlid navio2 (raspberry pi)
Linking to libatomic is only required for targets such as Raspberry Pi but not on for normal x86/x86_64 Linux builds.
2020-01-06 20:15:39 -05:00
Daniel Agar aaf5670e7d
deprecate df_bmp280_wrapper and replace with in tree bmp280
- deprecate DriverFramework bmp280 driver (df_bmp280_wrapper)
 - update beaglebone blue and snapdragon flight eagle boards to use in tree bmp280
 - update posix (really just linux) and qurt I2C wrappers
 - tested on beaglebone blue
2020-01-05 13:33:12 -05:00
Daniel Agar b292b04ac1 platforms posix link atomic 2020-01-04 22:03:43 -05:00
Daniel Agar cc7a0cd69d beaglebone blue: build librobotcontrol with cmake 2019-12-29 17:32:06 -05:00
Beat Küng fa8165a1c3 platforms/posix/src: move to platforms/posix/src/px4/common 2019-08-30 07:59:44 +02:00
Daniel Agar e9ca5d5aba PX4 general work queue 2019-05-24 12:58:55 -04:00
Daniel Agar 320d2e9383
create PX4 platform layer initialization helper (#11269)
- starts requirements for PX4 modules (hrt, param, etc)
2019-01-22 14:13:20 -05:00
TSC21 870c513aad readd CMAKE_RUNTIME_OUTPUT_DIRECTORY install for the posix build 2018-12-13 02:09:31 +00:00
TSC21 a6121e1655 Cmake build: do not change CMAKE_RUNTIME_OUTPUT_DIRECTORY if building with catkin 2018-12-13 02:09:31 +00:00
James Goppert c7eb21be86 Fix catkin/ROS build paths. 2018-12-13 02:09:31 +00:00
Daniel Agar dbee6380ee cmake move custom upload helpers to boards/ 2018-12-04 19:45:46 -05:00
Daniel Agar 1efad64f0c bebop move flow driver to board directory 2018-12-04 01:06:54 -05:00
Daniel Agar 3e0a3559a9 cmake use standard mechanisms for settings flags 2018-11-26 14:40:14 -08:00
Daniel Agar abb3817d31 boards new split VENDOR_MODEL naming convention 2018-11-26 14:40:14 -08:00
Daniel Agar f692ad04d0 boards organization 2018-11-26 14:40:14 -08:00
Beat Küng b972651a06 posix shell: use /bin/sh instead of bash
This uses the systems default shell:
- Ubuntu: dash
- Fedora: bash

Since bash is invoked via /bin/sh, it operates in POSIX mode:
  https://tiswww.case.edu/php/chet/bash/POSIX

- remove '# Ignore the expand_aliases command in zshell.'
  Not needed because the shell operates in POSIX mode
- [[ is bashism -> use [
- autostart_files=( $autostart_file_match )
  is not supported in dash, so use 'ls'
- shellcheck runs the dash flavor, since dash is a minimalistic shell.

Tested on dash & bash.
2018-09-27 23:39:20 +02:00
Bart Slinger ea96501e8c bebop 2: upload entire bin directory content 2018-09-26 21:34:22 +02:00
Daniel Agar 060463e8a7
parameters lib convert to c++ (#10267) 2018-09-04 09:18:28 -04:00
Bram Strack van Schijndel 918c397ae7 fixup! [Bebop 2] don't strip and upload to /data/ftp/internal_000 2018-08-30 09:48:26 +02:00
Bram Strack van Schijndel b678f8bc5b [Bebop 2] don't strip and upload to /data/ftp/internal_000 2018-08-30 09:48:26 +02:00
Daniel Agar 658b957888
Jenkins build and archive all packages (#10332) 2018-08-29 12:31:14 -04:00
Beat Küng ffffcaeb0f px4-alias.sh_in: move to platforms/posix/src/px4-alias.sh_in 2018-08-08 21:09:39 +02:00
Beat Küng 23b12f02e7 cmake: fix install target (add bin dir which includes the symlinks and px4-alias.sh) 2018-08-08 21:09:39 +02:00
Beat Küng efb202106f bbblue: required changes for posix shell 2018-08-08 21:09:39 +02:00
Beat Küng d90ac975a7 posix shell: required updates for RPi, bepob, ocpoc, eagle & exxcelsior
- RPi works
- the rest is not tested, and requires a bit more
  (such as uploading the bin/ directory)
2018-08-08 21:09:39 +02:00
Beat Küng 7822e5b5c3 posix shell: lots of cleanup and fixes
- move posix-configs/SITL/init/{rcS,10016_iris,6011_typhoon_h480} to ROMFS/px4fmu_common/init.d-posix
  allows for easier unification, only one symlink is required.
  - rcS: add AUTOCNF support. Update scripts to match with behavior of PX4
    master (parameter values, some sitl driver got removed)
- add alias to allow 'set variable value' syntax in scripts to px4-alias.sh
- use px4_getopt
- use separate argument for the test_data directory
- append PATH from within the px4 binary: this simplifies the usage
  w/o the sitl_run.sh script.
- add 'source px4-alias.sh' to all existing sitl startup scripts
- move sitl mixers to ROMFS/px4fmu_common/mixers-sitl
  makes it easier to use existing mixers and sitl-specific ones.
- remove unused rcS_gazebo_delta_wing
2018-08-08 21:09:39 +02:00
Julian Oes 0c5c741b1a add posix shell
squashed & rebased version, not including:
- listener changes
- src/firmware renaming

Commits:

tag_to_version.py: fix Python3 error

subprocess.communicate returns bytes instead of a str which is not the
same for Python3. Therefore, we need to decode the bytes.

cmake: remove folder src/firmware

The folder src/firmware was not intuitive. Why would the binaries for
SITL be inside a src and why even inside a src/firmware folder. Also,
the rootfs was put there which made it even more confusing.

The CMakeLists.txt files are moved into cmake/ and get now called from
the main CMakeLists.txt.

qshell: support for return value

Instead of just sending commands, qshell will now also wait until
the command has finished on QURT and sent back a return value. This will
allow all modules on the DSP side to be spawned from the Linux side
meaning that we only need one config/startup file instead of two.

adb_upload: create folders before pushing

Previously the script failed if the folder on the destination was not
already existing. This therefore makes pushing easier.

posix: spawn PX4 modules in bash

This adds the possibility to spawn PX4 modules out of bash. Basically,
the main executable can now be started as a server/daemon or as a
client.
The server replaces the existing functionality of the main exe with
the pxh shell, however, it also opens a pipe that clients can talk to.

Clients can run or spawn PX4 modules or commands by connecting to the
server over the pipe. They clients will get the stdout and return value
of their commands via a client specific pipe back.

This work will allow to start all modules using a bash script similar to
the way it is done in NuttX where the NuttShell scripts the startup
scripts and starts the modules.

SITL: use new client shell in SITL

This is a first step to use the new shell capabilities for SITL.
The new startup bash script rcS merges (and therefore replaces) the two
existing scripts rcS_gazebo_iris and rcS_jmavsim_iris.

More cleanup will be necessary for the rest of the SITL startup scripts.

Snapdragon: use new shell to start all modules

Instead of different mainapp.config and px4.config files, we can now use
a unified rcS bash script which starts all the modules based on
parameters, mainly the SYS_AUTOSTART param.

Snapdragon: fix the airframe description

pxh: argv needs to end with a nullptr

The comment was wrong that argv needs an additional 0 termination.
Instead it needs a nullptr at the end.

px4_posix_tasks: variable cleanup

The px4_task_spawn_cmd function got a cleanup while debugging, however,
no functional changes.

Snapdragon: move some drivers to 4100 config

These drivers are supported by the community, so they go into the 4100
config.

Snapdragon: update 210qc platform

px4_daemon: use doxygen comments

apps.h_in: fix string printf: use .c_str()

px4_daemon: \b -> \n in printf

px4_daemon: handle error in generate_uuid (close the file on error)

posix main: some clarifications in comment (it's the symlinks not the script aliases)

cmake: remove new install command again

This one was probably wrong and untested. Installing needs revisiting.

POSIX: remove argument USES_TERMINAL

POSIX: copy init and mixer files for SITL

Instead of using non-working install commands, the mixer and startup
files are now copied as part of the build in cmake.

adb_upload.sh: remove leftover commented printf

POSIX main: just the pointer instead of memmove

POSIX main: remove chroot

chroot is removed because it hasn't been used anywhere and seems
untested.

px4_daemon: remove client pipe when cleaning up

px4_daemon: fail if the client pipe already exists

The client pipe is supposed to be specific (by UUID), so the path
shouldn't exist already.

history: limit the number of history entries

This is a protection to avoid filling the memory if we are entering a
lot of commands (e.g. auto-generated).

px4_daemon: add a threadsafe map and use it

px4_daemon: whitespace

px4_daemon: fix client parsing

Sometimes the client ends up reading more than one packet in one read.
The parsing is not made for this and would require a (ring)buffer for
it.

The solution of this commit just reads as much as needed from the pipe
which avoids having to do buffering and parsing.

posix: changes sitl_run.sh and main.cpp cleanup

This changes the paths in sitl_run.sh quite a bit to allow the px4
binary to run in the rootfs directory which should make it convenient
and very close to the NuttX variant.

Also main.cpp got a big cleanup after the big rebase with some
conflicts. Quite some functionality was removed but it has yet to be
seen if it needs to be re-added.

px4_log: cleanup log levels, now they make sense

Before DEBUG and INFO log levels where inverted which didn't make much
sense in my eyes.

dataman: fix path for bash shell

logger: fix paths for bash shell

mavlink: fix paths for bash shell

param: fix path for bash shell

inav: fix paths for bash shell

sdlog2: fix paths for bash shell

ROMFS: add forgotten mixer to list

SITL init: more models, more options

- Support for different models using the unified startup
script rcS.
- Support to choose the estimator by setting the environment variable
  PX4_ESTIMATOR.
- Support to choose the logger by setting the environment variable
  PX4_LOGGER.

rcS: fix string comparison

listener: use template file

Instead of having all of the C++ code inside the Python file it is
nicer to have a separate template file with the C++ headers, etc.

px4_log: add PX4_INFO_RAW for raw printfs

This allows to do custom formatting but is still transported over
sockets to clients.

topic_listener: use PX4_INFO_RAW instead of printf

commander: use PX4_INFO_RAW for status

listener: rewrite to classes and factory

posix: fix some argument warnings

generate_listener.py: by accident changed shebang

listener: big refactor of the generator

Hopefully this makes it easier to read and change in the future.

rcS: manually take over rebase changes

listener: remove leftover try

listener: properly clean up topic instance

rcS: take over some vehicle specific changes

posix-configs: vehicle specifics to separate files

posix-configs: remove leftover lines

uORBDevices: new PX4_INFO_RAW instead of printf

px4_log: just use printf on NuttX

listener: use less binary space, strip on NuttX

generate_listener.py: remove commented code

cmake: fix syntax error from merge

px4_daemon: fixes after rebase of apps.h/cpp fix

px4_daemon: namespace missing

posix: only create stub for fsync on QURT

unitests: reduce dependencies of param test

This makes the unit test compile and link again after the bash changes.

QURT: some compile fixes after a rebase

SITL: arg change for sitl_run.sh to use rcS_test

This allows to use a custom startup file for testing.

SITL: add the folder test_data

SITL: implement shutdown command as systemcmd

The shutdown command needs to be a proper systemcmd, otherwise the alias
and symlink generation doesn't work and we end up calling shutdown of
the host computer which is to be avoided.

px4fmu_test: same IO_pass mixer as px4fmu_default

px4fmu_test: use normal quad x mixer

There is no good reason to use a specific test mixer, except more cmake
code around it. Therefore just use the same mixer as default, and at
some point px4fmu_test and px4fmu_default can get merged

POSIX: cleanup, dir and symlink fixes

This cleans up the logic behind the symlinking and creating directories.

POSIX: correct arg order in usage info

tests: fix paths for SITL tests

POSIX: printf fix

sitl_run.sh: try to make this run on Mac as well

cmake: try to make jenkins happier

Path cleanup, the bin is no longer in src/firmware

POSIX: fix symlink logic

SITL: prefix all exported env variables

cmake: fix path for ROS tests

integrationtests: fix log path

launch: try to make tets with ROS working again

px4_defines: fix after wrong merge deconflicting

px4_defines: get paths for POSIX correct

cmake: fix cmake arguments

This was fine with cmake 3.6 but did not work with cmake 3.2.2

cmake: use cp instead of cmake -E copy

cmake -E copy does not support copying multiple files with versions <
3.5. Therefore, just use cp for now.

ROMFS: fix build error after rebase

cmake: fix paths in configs

launch: use `spawn_model` again

cmake: various fixes after big rebase

param: path fixes after rebase

posix platform: fixes after rebase

test_mixer: fix screwed up rebase
2018-08-08 21:09:39 +02:00
Bob-F 2ece14bad1 Port PX4 to BeagleBone Blue Board using library librobotcontrol instead of a submodule 2018-08-06 13:32:36 +02:00
vkotaru 96920e0370 AUTOPILOT_HOST address for Raspberrypi2/3 included in posix CMakeLists.txt 2018-07-18 22:31:32 +02:00
Anthony Lamping 780d147c01 cmake: package don't use bin and share dirs 2018-05-25 01:32:26 -04:00
Anthony Lamping ef5de4de87 cmake: package create tarball 2018-05-25 01:32:26 -04:00