the new docker images are defaulting to a hardcoded tag that can be
traced back to source code which is why we are adding the string to the
build and run scripts
The new build script can pass arguments directly to ubuntu.sh when
building, this is good for when you want a special build for example
when you don't need RTPS or Simulation
```
./Tools/docker_build.sh --no-sim-tools
```
In the future it can be extended if needed to generate multiple docker
images based on the same Dockerfile, if for example we only want to
build arm targets
To run the image you need to use the docker_run.sh script found in the
Tools directory as shown below:
./Tools/docker_run.sh make all_variants_px4_fmu-v5x
I double checked each new dependency and made sure to build each target
with the new install script as well as test FastRTPS and Simulations
* removed unused dependencies
* settled on the absolute most updated JDK we could possibly use given
our dependencies (JDK 14)
* added conditional support for use in a container environment via a new
flag --from-docker
* added multi-platform build tools for development
I don't think the PX4 setup script should decide whether a user is to
use ccache or not. Anecdotally, I've heard from some in the dev team
that they are not using it themselves, so I don't think there is a good
basis to push it onto others.
That being said, we can of course still use ccache as part of the CI
builds nevertheless.
- cmake NuttX build wrapper compile in place instead of copying source tree to build directory
- slightly faster skipping necessary copying (depending on system)
- allows debugging in place
- easier to work directly in NuttX following official documentation
- simplifies overall build which should make it easier to resolve any remaining NuttX dependency issues in the build system
- the downside is switching back and forth between different builds always require rebuilding NuttX, but I think this is worth the improved developer experience
- also no longer builds px4io and bootloader in every single build, for most users these rarely change and we're wasting a lot of build time
- mavlink/mavlink is now directly included as a submodule instead of the generated mavlink/c_library_v2
- this also switches to mavlink development.xml by default
This fixes running the Ubuntu setup script in a Python virtual
environment. This was failing because pip doesn't allow the --user
option in virtual environments.
I usually called it using `source arch.sh`
but if it's executable it could also be called using `./arch.sh`
and that's also what's done for the ubuntu setup script.
Script failed for me with following error
PX4-Autopilot/Tools/setup/arch.sh: line 159: syntax error near unexpected token `else'
PX4-Autopilot/Tools/setup/arch.sh: line 159: ` else'
Seems like there is nothing to do in case of positive if case.
Changed code should maintain logic
- Spaces -> tabs.
- Remove "brew install python" because it's already a dependency of the
px4-dev tap.
- Remove "brew install ccache" as we can also add it to the px4-dev tap.
- Don't try to update pip installation, it works fine as is.
- Install pip dependencies as user, no need for system-wide install.